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

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

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

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

If the executioncondition has not changed or has changed from ON to OFF, the PV of CNT willnot be changed. The Completion Flag for a counter is turned ON when the PVreaches zero and will remain ON until the counter is reset.CNT is reset with a reset input, R. When R goes from OFF to ON, the PV is resetto SV. The PV will not be decremented while R is ON.

Counting down from SV willbegin again when R goes OFF. The PV for CNT will not be reset in interlockedprogram sections or by power interruptions.Changes in execution conditions, the Completion Flag, and the PV are illustrated below. PV line height is meant only to indicate changes in the PV.Execution conditionon count pulse (CP)ONExecution conditionon reset (R)ONOFFOFFONCompletion FlagOFFSVSVPV0002SV – 1SV – 200010000364Section 7-15Timer and Counter InstructionsPrecautionsProgram execution will continue even if a non-BCD SV is used, but the SV willnot be correct.FlagsER:ExampleIn the following example, CNT is used to create extended timers by counting SRarea clock pulse bits.CNT 001 counts the number of times the 1-second clock pulse bit (SR 25502)goes from OFF to ON.

Here again, IR 00000 is used to control the times whenCNT is operating.Because in this example the SV for CNT 001 is 700, the Completion Flag forCNT 002 turns ON when 1 second x 700 times, or 11 minutes and 40 secondshave expired. This would result in IR 20002 being turned ON.Indirectly addressed DM word is non-existent. (Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)00000 25502AddressCPCNT00100001R#0700CNT 001Instruction00000000010000200003LDANDLD NOTCNT0000400005LDOUT20002! CautionOperands#CNT000002550200001001070000120002The shorter clock pulses will not necessarily produce accurate timers becausetheir short ON times might not be read accurately during longer cycles. In particular, the 0.02-second and 0.1-second clock pulses should not be used to createtimers with CNT instructions.7-15-6 REVERSIBLE COUNTER – CNTR(12)Definer ValuesN: TC numberLadder Symbol#IIDIRCNTR(12)NOperand Data AreasSVSV: Set value (word, BCD)IR, SR, AR, DM, HR, LR, #LimitationsEach TC number can be used as the definer in only one TIMER or COUNTERinstruction.

TC numbers run from 000 through 255 in the CPM2A/CPM2C PCsand from 000 through 127 in the CPM1/CPM1A/SRM1(-V2) PCs.DescriptionThe CNTR(12) is a reversible, up/down circular counter, i.e., it is used to countbetween zero and SV according to changes in two execution conditions, those inthe increment input (II) and those in the decrement input (DI).The present value (PV) will be incremented by one whenever CNTR(12) isexecuted with an ON execution condition for II and the last execution conditionfor II was OFF.

The present value (PV) will be decremented by one wheneverCNTR(12) is executed with an ON execution condition for DI and the last execution condition for DI was OFF. If OFF to ON changes have occurred in both II andDI since the last execution, the PV will not be changed.365Section 7-15Timer and Counter InstructionsIf the execution conditions have not changed or have changed from ON to OFFfor both II and DI, the PV of CNT will not be changed.When decremented from 0000, the present value is set to SV and the Completion Flag is turned ON until the PV is decremented again.

When incrementedpast the SV, the PV is set to 0000 and the Completion Flag is turned ON until thePV is incremented again.CNTR(12) is reset with a reset input, R. When R goes from OFF to ON, the PV isreset to zero. The PV will not be incremented or decremented while R is ON.Counting will begin again when R goes OFF. The PV for CNTR(12) will not bereset in interlocked program sections or by the effects of power interruptions.Changes in II and DI execution conditions, the Completion Flag, and the PV areillustrated below starting from part way through CNTR(12) operation (i.e., whenreset, counting begins from zero).

PV line height is meant to indicate changes inthe PV only.Execution conditionon increment (II)ONExecution conditionon decrement (DI)ONOFFOFFONCompletion FlagOFFSVPVSVSV – 1SV – 10001SV – 2SV – 200000000PrecautionsProgram execution will continue even if a non-BCD SV is used, but the SV willnot be correct.FlagsER:Indirectly addressed DM word is non-existent.

(Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)7-15-7 REGISTER COMPARISON TABLE – CTBL(63)Ladder SymbolsOperand Data AreasP: Port specifierCTBL(63)@CTBL(63)PPCCTBTB000C: Control data000 to 003TB: First comparison table wordIR, SR, AR, DM, HR, LRThis instruction is not supported by SRM1(-V2) PCs.LimitationsThe first and last comparison table words must be in the same data area. (Thelength of the comparison table varies according to the settings.)P must be 000 and C must be between 000 and 003.DescriptionWhen the execution condition is OFF, CTBL(63) is not executed. When theexecution condition is ON, CTBL(63) registers a comparison table for use withthe high-speed counter PV.

Depending on the value of C, comparison with thehigh-speed counter PV can begin immediately or it can be started separatelywith INI(61).366Section 7-15Timer and Counter InstructionsThe port specifier (P) specifies the high-speed counter that will be used in thecomparison. Always set P to 000.The function of CTBL(63) is determined by the control data, C, as shown in thefollowing table.

These functions are described after the table.CCTBL(63) function000Registers a target value comparison table and starts comparison.001Registers a range comparison table and starts comparison.002Registers a target value comparison table. Start comparison with INI(61).003Registers a range comparison table. Start comparison with INI(61).When the PV agrees with a target value or falls within a specified range, the specified subroutine is called and executed.

Refer to 2-3-5 High-speed Counter Interrupts for more details on table comparison.If the high-speed counter is enabled in the PC Setup (DM 6642), it will begincounting from zero when the CPM2A/CPM2C begins operation. The PV will notbe compared to the comparison table until the table is registered and comparison is initiated with INI(61) or CTBL(63). Comparison can be stopped andstarted, or the PV can be reset with INI(61).Common Characteristicsof Target Value andRange Comparisons1, 2, 3...The operation of a target value comparison is different from a range comparison,but the two functions share some common characteristics.1. Subroutine numbers 000 to 049 can be used and the same subroutine number can be used more than once in the table.2. An undefined subroutine number or FFFF can be set for the subroutinenumber if interrupt processing is not required.3.

Comparison can be stopped with INI(61). A registered table is valid until PCoperation stops or a new comparison table is registered.4. CTBL(62) cannot be executed if the high-speed counter is disabled in thePC Setup (DM 6642). (An error will occur if CTBL(63) is executed when thehigh-speed counter is disabled.)Target Value ComparisonA target value comparison table contains up to sixteen target values. A subroutine number is also registered for each target value. The corresponding subroutine is called and executed when the PV matches a target value. (When interruptprocessing is not required, an undefined subroutine number may be entered.)• In the CPM1/CPM1A, target value comparisons are performed one item at atime in order of the comparison table.

When the PV reaches the first target value in the table, the interrupt subroutine is executed and comparison continuesto the next value in the table. When processing has been completed for the lasttarget value in the table, comparison returns to the first value in the table andthe process is repeated.• In the CPM2A/CPM2C, the PV is compared to all of the target values in thetable each time CTBL(63) is executed.

When the PV matches a target valuethe corresponding subroutine is called and executed.The following diagram shows the structure of a target value comparison table.Target values must be unique; an error will occur if a target value appears in thetable more than once.TBTB+1TB+2TB+3Number of target values (0001 to 0016, BCD)Target value #1, lower 4 digits (BCD)Target value #1, upper 4 digits (BCD)Subroutine number for #1 (See note.)One targetvalue setting367Section 7-15Timer and Counter InstructionsNote The subroutine number can be F000 to F049 to activate the subroutine whendecrementing and can be 0000 to 0049 to activate the subroutine when incrementing.

An error will occur if the high-speed counter is set to increment modebut a decrementing subroutine number (F000 to F049) is specified.Range ComparisonA range comparison table contains 8 ranges which are defined by an 8-digit lower limit and an 8-digit upper limit, as well as their corresponding subroutine numbers. The comparison is performed once each cycle at the end of program execution and can be performed during program execution with INI(61).When the PV falls within a given range the corresponding subroutine is calledand executed. (When interrupt processing is not required, an undefined subroutine number may be entered.) Ranges can overlap, so the PV can fall withinmore than one range; in the PV is within two or more ranges, the subroutine forthe first of the ranges will be executed.The following diagram shows the structure of a range comparison table.

Alwaysset 8 ranges. If fewer than 8 ranges are needed, set the remaining subroutinenumbers to FFFF.NoteFlagsTBTB+1TB+2TB+3TB+4Lower limit #1, lower 4 digits (BCD)Lower limit #1, upper 4 digits (BCD)Upper limit #1, lower 4 digits (BCD)Upper limit #1, upper 4 digits (BCD)Subroutine number (See note 2.)First range settingTB+35TB+36TB+37TB+38TB+39Lower limit #8, lower 4 digits (BCD)Lower limit #8, upper 4 digits (BCD)Upper limit #8, lower 4 digits (BCD)Upper limit #8, upper 4 digits (BCD)Subroutine number (See note 2.)Eighth range setting1. Each range’s lower limit must be less than its upper limit. An error will occur ifthe lower limit is greater than the upper limit.2.

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

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

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

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