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

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

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

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

Neither instructions will affect the status of its operandbit when the execution condition is OFF.324SectionControlling Bit Status6-4SET will turn ON the operand bit when the execution condition goes ON, but unlike the OUTPUT instruction, SET will not turn OFF the operand bit when theexecution condition goes OFF. RESET will turn OFF the operand bit when theexecution condition goes OFF, but unlike OUTPUT NOT, RESET will not turn ONthe operand bit when the execution condition goes OFF.In the following example, IR 20000 will be turned ON when IR 00100 goes ONand will remain ON until IR 00101 goes ON, regardless of the status of IR 00100.When IR 00101 goes ON, RESET will turn IR 20000 OFF.Address00100SET2000000101RSET 2000000000000010000200003InstructionLDSETLDRSETOperands00100200000010120000Note SET and RSET do not have function codes.

To input them from the Programming Console, press the FUN and SET Keys or FUN and RSET Keys followedby the bit address.6-4-2DIFFERENTIATE UP and DIFFERENTIATE DOWNDIFFERENTIATE UP and DIFFERENTIATE DOWN instructions are used toturn the operand bit ON for one cycle at a time. The DIFFERENTIATE UPinstruction turns ON the operand bit for one cycle after the execution conditionfor it goes from OFF to ON; the DIFFERENTIATE DOWN instruction turns ONthe operand bit for one cycle after the execution condition for it goes from ON toOFF.

Both of these instructions require only one line of mnemonic code.00000DIFU(13) 20001AddressInstruction0000000001LDDIFU(13)AddressInstruction0000000001LDDIFD(14)Operands000002000100001DIFD(14) 20002Operands0000120002Here, IR 20001 will be turned ON for one cycle after IR 00000 goes ON. The nexttime DIFU(13) 20001 is executed, IR 20001 will be turned OFF, regardless of thestatus of IR 00000.

With the DIFFERENTIATE DOWN instruction, IR 20002 willbe turned ON for one cycle after IR 00001 goes OFF (IR 20002 will be kept OFFuntil then), and will be turned OFF the next time DIFD(14) 20002 is executed.6-4-3KEEPThe KEEP instruction is used to maintain the status of the operand bit based ontwo execution conditions. To do this, the KEEP instruction is connected to twoinstruction lines. When the execution condition at the end of the first instructionline is ON, the operand bit of the KEEP instruction is turned ON. When theexecution condition at the end of the second instruction line is ON, the operandbit of the KEEP instruction is turned OFF.

The operand bit for the KEEP instruction will maintain its ON or OFF status even if it is located in an interlocked section of the diagram.325SectionWork Bits (Internal Relays)6-5In the following example, HR 0000 will be turned ON when IR 00002 is ON and IR00003 is OFF. HR 0000 will then remain ON until either IR 00004 or IR 00005turns ON. With KEEP, as with all instructions requiring more than one instructionline, the instruction lines are coded first before the instruction that they control.0000200003S: set inputKEEP(11)HR 000000004R: reset input000056-4-4AddressInstruction0000000001000020000300004LDAND NOTLDORKEEP(11)OperandsHR000020000300004000050000Self-maintaining Bits (Seal)Although the KEEP instruction can be used to create self-maintaining bits, it issometimes necessary to create self-maintaining bits in another way so that theycan be turned OFF when in an interlocked section of a program.To create a self-maintaining bit, the operand bit of an OUTPUT instruction isused as a condition for the same OUTPUT instruction in an OR setup so that theoperand bit of the OUTPUT instruction will remain ON or OFF until changes occur in other bits.

At least one other condition is used just before the OUTPUTinstruction to function as a reset. Without this reset, there would be no way tocontrol the operand bit of the OUTPUT instruction.The above diagram for the KEEP instruction can be rewritten as shown below.The only difference in these diagrams would be their operation in an interlockedprogram section when the execution condition for the INTERLOCK instructionwas ON. Here, just as in the same diagram using the KEEP instruction, two resetbits are used, i.e., HR 0000 can be turned OFF by turning ON either IR 00004 orIR 00005.000020000300004HR 000000005HR 00006-5AddressInstruction00000000010000200003000040000500006LDAND NOTORAND NOTOR NOTAND LDOUTOperandsHRHR000020000300000000400005--0000Work Bits (Internal Relays)In programming, combining conditions to directly produce execution conditionsis often extremely difficult.

These difficulties are easily overcome, however, byusing certain bits to trigger other instructions indirectly. Such programming isachieved by using work bits. Sometimes entire words are required for these purposes. These words are referred to as work words.Work bits are not transferred to or from the PC. They are bits selected by theprogrammer to facilitate programming as described above.

I/O bits and otherdedicated bits cannot be used as works bits. All bits in the IR area that are notallocated as I/O bits, and certain unused bits in the AR area, are available for useas work bits. Be careful to keep an accurate record of how and where you usework bits. This helps in program planning and writing, and also aids in debuggingoperations.326SectionWork Bits (Internal Relays)Work Bit Applications6-5Examples given later in this subsection show two of the most common ways toemploy work bits. These should act as a guide to the almost limitless number ofways in which the work bits can be used.

Whenever difficulties arise in programming a control action, consideration should be given to work bits and how theymight be used to simplify programming.Work bits are often used with the OUTPUT, OUTPUT NOT, DIFFERENTIATEUP, DIFFERENTIATE DOWN, and KEEP instructions. The work bit is used firstas the operand for one of these instructions so that later it can be used as acondition that will determine how other instructions will be executed. Work bitscan also be used with other instructions, e.g., with the SHIFT REGISTERinstruction (SFT(10)).

An example of the use of work words and bits with theSHIFT REGISTER instruction is provided in 7-16-1 SHIFT REGISTER –SFT(10).Although they are not always specifically referred to as work bits, many of thebits used in the examples in Section 7 Instruction Set use work bits. Understanding the use of these bits is essential to effective programming.Work bits can be used to simplify programming when a certain combination ofconditions is repeatedly used in combination with other conditions. In the following example, IR 00000, IR 00001, IR 00002, and IR 00003 are combined in alogic block that stores the resulting execution condition as the status ofIR 21600.

IR 21600 is then combined with various other conditions to determineoutput conditions for IR 20000, IR 20001, and IR 20002, i.e., to turn the outputsallocated to these bits ON or OFF.Reducing ComplexConditions0000000001216000000200003216000000400005200002160000005200010000421600AddressInstruction0000000001000020000300004000050000600007000080000900010000110001200013000140001500016LDAND NOTOROR NOTOUTLDANDAND NOTOUTLDOR NOTANDOUTLD NOTOROROUTOperands0000000001000020000321600216000000400005200002160000004000052000121600000060000720002200020000600007327SectionProgramming PrecautionsDifferentiated Conditions6-6Work bits can also be used if differential treatment is necessary for some, but notall, of the conditions required for execution of an instruction.

In this example,IR 20000 must be left ON continuously as long as IR 001001 is ON and bothIR 00002 and IR 00003 are OFF, or as long as IR 00004 is ON and IR 00005 isOFF. It must be turned ON for only one cycle each time IR 00000 turns ON (unless one of the preceding conditions is keeping it ON continuously).This action is easily programmed by using IR 22500 as a work bit as the operandof the DIFFERENTIATE UP instruction (DIFU(13)). When IR 00000 turns ON, IR22500 will be turned ON for one cycle and then be turned OFF the next cycle byDIFU(13). Assuming the other conditions controlling IR 20000 are not keeping itON, the work bit IR 22500 will turn IR 20000 ON for one cycle only.00000DIFU(13) 2250022500200000000100002000046-60000300005AddressInstruction0000000001000020000300004000050000600007000080000900010LDDIFU(13)LDLDAND NOTAND NOTOR LDLDAND NOTOR LDOUTOperands000002250022500000010000200003--0000400005--20000Programming PrecautionsThe number of conditions that can be used in series or parallel is unlimited aslong as the memory capacity of the PC is not exceeded.

Therefore, use as manyconditions as required to draw a clear diagram. Although very complicated diagrams can be drawn with instruction lines, there must not be any conditions onlines running vertically between two other instruction lines. Diagram A shownbelow, for example, is not possible, and should be drawn as diagram B.

Mnemonic code is provided for diagram B only; coding diagram A would be impossible.0000000002Instruction 1000040000100003Instruction 2Diagram A: Not Programmable000010000400002AddressInstruction00000000010000200003000040000500006000070000800009LDANDORANDInstruction 1LDANDORAND NOTInstruction 2OperandsInstruction 100000000000000400003Instruction 200001Diagram B: Correct Version3280000100004000000000200000000040000100003SectionProgramming Precautions6-6The number of times any particular bit can be assigned to conditions is not limited, so use them as many times as required to simplify your program. Often,complicated programs are the result of attempts to reduce the number of times abit is used.Except for instructions for which conditions are not allowed (e.g., INTERLOCKCLEAR and JUMP END, see below), every instruction line must also have atleast one condition on it to determine the execution condition for the instructionat the right.

Again, diagram A , below, must be drawn as diagram B. If an instruction must be continuously executed (e.g., if an output must always be kept ONwhile the program is being executed), the Always ON Flag (SR 25313) in the SRarea can be used.InstructionDiagram A: Not Programmable for Most Instructions25313InstructionDiagram B: Correct VersionAddressInstruction0000000001LDInstructionOperands25313There are a few exceptions to this rule, including the INTERLOCK CLEAR,JUMP END, and step instructions.

Each of these instructions is used as the second of a pair of instructions and is controlled by the execution condition of thefirst of the pair. Conditions should not be placed on the instruction lines leading tothese instructions. Refer to Section 7 Instruction Set for details.When drawing ladder diagrams, it is important to keep in mind the number ofinstructions that will be required to input it.

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

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

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

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