Главная » Просмотр файлов » CPM2A_PROGRAMMING MANUAL (W353-E1-2)

CPM2A_PROGRAMMING MANUAL (W353-E1-2) (986750), страница 13

Файл №986750 CPM2A_PROGRAMMING MANUAL (W353-E1-2) (Техническая документация) 13 страницаCPM2A_PROGRAMMING MANUAL (W353-E1-2) (986750) страница 132015-07-23СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 13)

Witheach interrupt, the data in DM 0000 to DM 0004 is incremented by one.Wiring (CPM2A)OrangeE6B2-CWZ6CRotary EncoderWhiteBlackBlueBrownWiring (CPM2C)Input terminalsBlueRotary encoderBrownOrangeWhiteBlackInput connectorBlueRotary encoderBrownOrangeWhiteBlack57SectionCPM2A/CPM2C High-speed CountersPC Setup15DM 6642001000: Differential phase input0: Reset by phase-Z signal + software reset01: Use as high-speed counter582-2SectionCPM2A/CPM2C High-speed Counters2-2ProgrammingON for 1 cycle at beginningof operation(71)(63) Register range comparison table and begin comparisonHigh-speed counterRegister range comparison table and begin comparisonBeginning word of comparison tableLower limit:9,000(92)Comparison 1Always ON(38)Comparison 1Upper limit:10,000Subroutine 040Lower limit:7,000(93)Comparison 2Upper limit:8,000(92)Subroutine 041Always ON(38)Comparison 2Lower limit:3,000Comparison 3Upper limit:–3,000(93)Subroutine 010Lower limit:–8,000(92)Comparison 4Always ONUpper limit:7,000(38)Comparison 3Subroutine 042Lower limit:–10,000(93)Comparison 5Upper limit:9,000(92)Subroutine 043Always ON(38)Comparison 4Comparison 6Not used.Comparison 7Not used.Comparison 8Not used.(93)(92)Always ON(38)(93)Comparison 5(01)59SectionCPM2A/CPM2C High-speed Counters2-22-2-2 Input Interrupts In Counter ModeThe four built-in interrupt inputs in the CPM2A/CPM2C’s CPU Unit can be usedin counter mode as inputs of up to 2 kHz.

These inputs can be used as eitherincrementing counters or decrementing counters, triggering an interrupt (i.e.,executing an interrupt subroutine) when the count matches the set value.CounterinputCounter inputNormalprogramInterruptprogramInput number(Note 2)00003000040000500006NoteCountSubroutineInterruptnumber0 to 655350(0000 to FFFF) 123SubroutineResponsenumber (Note 3)frequency2 kHz0000010020031. Input number 00005 and 00006 cannot be used in CPM2C CPU Units with10 I/O points.2. Input numbers 00003 to 00006 can be used for any of the following functions: interrupt inputs, interrupt inputs (counter mode), or quick-response inputs. When not being used for any of these, they can be used as ordinaryinputs.3.

Subroutine numbers 000 to 003 are the subroutine numbers for interruptprograms started up when interrupt inputs or count-up interrupts for interrupt inputs (counter mode) are generated. When not being used for this purpose, they can be used as ordinary inputs.60SectionCPM2A/CPM2C High-speed Counters! Caution2-2Although IORF(97) can be used in interrupt subroutines, you must be careful ofthe interval between IORF(97) executions. If IORF(97) is executed to frequently,a fatal system error may occur (FALS 9F), stopping operation. The interval between executions of IORF(97) should be at least 1.3 ms + total execution time ofthe interrupt subroutine.The following table shows the relationships between interrupt inputs (countermode) and the CPM2A/CPM2C’s other functions.FunctionInterrupt inputs (counter mode)Synchronized pulse controlCan be used simultaneously.Interrupt inputsSee note 1.Interval timer interruptsCan be used simultaneously.High-speed countersCan be used simultaneously.Interrupt inputs (counter mode)See note 1.Pulse outputsCan be used simultaneously.Quick-response inputsSee note 1.Input time constantSee note 2.ClockCan be used simultaneously.Note1.

The same input number (from 00003 to 00006) cannot be used for morethan one of the following functions: interrupt inputs, interrupt inputs (countermode), or quick-response inputs.2. When inputs 00003 to 00006 are set for use as interrupt inputs (countermode), the input time constants for the relevant inputs are disabled. The input time constants remain in effect, however, for the values for refreshingthe relevant input relay area.Procedure for Using Interrupt Inputs in Counter ModeSet the interrupt input number.Select either incrementing ordecrementing count.Wire the inputs.PC Setup (DM 6628)Create a ladder diagram program.Input numbers: 00003 to 00006 (00003 or 00004 for CPM2C CPUUnits with 10 I/O points)1: Use as interrupt input (interrupt input mode or counter mode)INI(61): Change counter PVINT(89): Refresh counter SV*PRV(62): Read counter PVSBN(92) and RET(93): For creating interrupt subroutines.**Used only for count-up interrupts.61SectionCPM2A/CPM2C High-speed CountersInterruptinputCounter (2 kHz) 0Interrupt input (counter mode)2-2Interrupt generatedSpecified subroutine executed.(Used only for count-up interrupts.)Ladder diagram programSBN(92)INTERRUPTCONTROLinstructionINT(89)Counter (2 kHz) 1RET(93)Change SV (increment/decrement)Counter (2 kHz) 2Counter (2 kHz) 3Counter SVCounter 0Counter 1Counter 2Counter 3PC SetupMODE CONTROLinstructionINI(61)DM 6628SR 240SR 241SR 242SR 243Change PVEvery scanCounter SVCounter 0Counter 1Counter 2Counter 3Setting the InterruptInput NumberImmediatelyPRV(62)HIGH-SPEED COUNTERPV READ instructionSR 244SR 245SR 246SR 247Read counter PVWith interrupt inputs in counter mode, the subroutine to be executed is determined by the interrupt corresponding to the input number.Input numberInterrupt numberSubroutine number00003000000004100100005*200200006*3003Note *Input numbers 00005 and 00006 cannot be used for CPM2C CPU Units with 10I/O points.The same input number (from 00003 to 00006) cannot be used for more thanone of the following functions: interrupt inputs, interrupt inputs (counter mode),or quick-response inputs.62SectionCPM2A/CPM2C High-speed CountersSelecting Incrementingor Decrementing Count2-2Either an incrementing or decrementing count can be used with interrupt inputsin counter mode.Incrementing Counter ModeAs the set value (SV) is refreshed, the count is incremented from 0, and the interrupt subroutine is executed when the present value (PV) matches the SV.PVThe subroutine is executed when the count is up,and the PV is reset to 0.SVIncrementingIncrementingTimeInterruptReturnSubroutine executed.InterruptSubroutine executed.Decrementing Counter ModeAs the set value (SV) is refreshed, the count is is decremented toward 0, and theinterrupt subroutine is executed when the present value (PV) reaches 0.PVThe subroutine is executed when the count is up,and the PV is reset to the SV.SVDecrementingDecrementingTimeInterruptSubroutine executed.Wiring the InputsReturnInterruptSubroutine executed.With the CPM2A, wire the input terminals as shown in the following illustration.Input 00003: Input interrupt (counter mode) 0Input 00004: Input interrupt (counter mode) 1Input 00005: Input interrupt (counter mode) 2Input 00006: Input interrupt (counter mode) 363SectionCPM2A/CPM2C High-speed Counters2-2With the CPM2C, wire the input terminals as shown in the following illustration.Input terminals00004: Input interrupt (counter mode) 100003: Input interrupt (counter mode) 0Input connector00006: Input interrupt (counter mode) 300005: Input interrupt (counter mode) 200004: Input interrupt (counter mode) 100003: Input interrupt (counter mode) 0Note Inputs 00006 and 00005 cannotbe used with CPU Units thathave only 10 I/O points.PC SetupThe following table shows the settings in the PC Setup area related to interruptinput usage.WordDM 6628Bits00 to 0304 to 0708 to 1112 to 15Interrupt setting forinput 00003Interrupt setting forinput 00004Interrupt setting forinput 00005*Interrupt setting forinput 00006*Function0: Normal inputSetting11: Interrupt input(interrupt input mode orcounter mode)2: Quick-response inputNote *Input number 00005 and 00006 cannot be used in CPM2C CPU Units with 10I/O points.The setting will go into effect when the mode is changed (from PROGRAM toMONITOR/RUN) or when the power supply is turned ON to the CPM2A/CPM2C.64SectionCPM2A/CPM2C High-speed CountersLadder DiagramProgramming2-2The following table shows the instruction operations related to interrupt input(counter mode) control.Instruction(@)INT(89)(@)INI(61)ControlOperationRefresh incrementingcounter SVRefresh decrementingcounter SVMask all interruptsRefreshes the counter’s SV and starts theincrementing count.Refreshes the counter’s SV and starts thedecrementing count.Prohibits all interrupts, including interruptinputs, interval timer interrupts, high-speedcounters, etc.Unmask all interruptsPermits all interrupts, including interruptinputs, interval timer interrupts, high-speedcounters, etc.Change PVChanges the counter’s PV.(@)PRV(62) Read PVReads the counter’s PV.The functions related to input interrupts (counter mode) are executed accordingto the data areas shown in the following table.Word240241242243244245246247Bits00 to 1500 to 1500 to 1500 to 1500 to 1500 to 1500 to 1500 to 15NameSV area for input interrupt (counter mode) 0SV area for input interrupt (counter mode) 1SV area for input interrupt (counter mode) 2SV area for input interrupt (counter mode) 3PV area for input interrupt (counter mode) 0PV area for input interrupt (counter mode) 1PV area for input interrupt (counter mode) 2PV area for input interrupt (counter mode) 3ContentsStores thecounter’s setvalue (SV).Stores thecounter’spresent value(PV).Refresh Incrementing Counter SV / Refresh Decrementing Counter SVThese functions store the counter’s set values in data areas and refresh them bymeans of INT(89).

Характеристики

Тип файла
PDF-файл
Размер
2,99 Mb
Тип материала
Высшее учебное заведение

Список файлов учебной работы

Свежие статьи
Популярно сейчас
Зачем заказывать выполнение своего задания, если оно уже было выполнено много много раз? Его можно просто купить или даже скачать бесплатно на СтудИзбе. Найдите нужный учебный материал у нас!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6367
Авторов
на СтудИзбе
309
Средний доход
с одного платного файла
Обучение Подробнее