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

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

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

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

Use the differentiated form (@ROL(27)) or combine ROL(27) withDIFU(13) or DIFD(14) to shift just one time.FlagsER:Indirectly addressed DM word is non-existent. (Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)CY:Receives the data of bit 15.EQ:ON when the content of Wd is zero; otherwise OFF.7-16-6 ROTATE RIGHT – ROR(28)Ladder SymbolsOperand Data AreasROR(28)@ROR(28)WdWdWd: Rotate wordIR, SR, AR, DM, HR, LRLimitationsDM 6144 to DM 6655 cannot be used for Wd.DescriptionWhen the execution condition is OFF, ROR(28) is not executed.

When theexecution condition is ON, ROR(28) shifts all Wd bits one bit to the right, shiftingCY into bit 15 of Wd and shifting bit 00 of Wd into CY.PrecautionsCYBit15Bit0000 1 0 1 0 1 0 0 0 1 1 1 0 0 0 1Use STC(41) to set the status of CY or CLC(41) to clear the status of CY beforedoing a rotate operation to ensure that CY contains the proper status beforeexecution ROR(28).CY will be shifted into bit 15 every cycle if the undifferentiated form of ROR(28) isused. Use the differentiated form (@ROR(28)) or combine ROR(28) withDIFU(13) or DIFD(14) to shift just one time.FlagsER:Indirectly addressed DM word is non-existent. (Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)CY:Receives the data of bit 00.EQ:ON when the content of Wd is zero; otherwise OFF.377Section 7-16Shift Instructions7-16-7 ONE DIGIT SHIFT LEFT – SLD(74)Ladder SymbolsOperand Data AreasSt: Starting wordLimitationsSLD(74)@SLD(74)StStEEIR, SR, AR, DM, HR, LRE: End wordIR, SR, AR, DM, HR, LRSt and E must be in the same data area, and E must be greater than or equal toSt.DM 6144 to DM 6655 cannot be used for St or E.DescriptionWhen the execution condition is OFF, SLD(74) is not executed.

When the execution condition is ON, SLD(74) shifts data between St and E (inclusive) by onedigit (four bits) to the left. 0 is written into the rightmost digit of the St, and thecontent of the leftmost digit of E is lost.E8 F C 5Lost dataPrecautions...StD 7 9 10If a power failure occurs during a shift operation across more than 50 words, theshift operation might not be completed.A 0 will be shifted into the least significant digit of St every cycle if the undifferentiated form of SLD(74) is used. Use the differentiated form (@SLD(74)) or combine SLD(74) with DIFU(13) or DIFD(14) to shift just one time.FlagsER:The St and E words are in different areas, or St is greater than E.Indirectly addressed DM word is non-existent.

(Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)7-16-8 ONE DIGIT SHIFT RIGHT – SRD(75)Ladder SymbolsOperand Data AreasE: End wordLimitationsSRD(75)@SRD(75)EEStStIR, SR, AR, DM, HR, LRSt: Starting wordIR, SR, AR, DM, HR, LRSt and E must be in the same data area, and E must be less than or equal to St.DM 6144 to DM 6655 cannot be used for St or E.378Section 7-16Shift InstructionsDescriptionWhen the execution condition is OFF, SRD(75) is not executed.

When theexecution condition is ON, SRD(75) shifts data between St and E (inclusive) byone digit (four bits) to the right. 0 is written into the leftmost digit of St and therightmost digit of E is lost.St3 4 5 2...F 8 C 1Lost data0PrecautionsEIf a power failure occurs during a shift operation across more than 50 words, theshift operation might not be completed.A 0 will be shifted into the most significant digit of St every cycle if the undifferentiated form of SRD(75) is used.

Use the differentiated form (@SRD(75)) or combine SRD(75) with DIFU(13) or DIFD(14) to shift just one time.FlagsER:The St and E words are in different areas, or St is less than E.Indirectly addressed DM word is non-existent. (Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)7-16-9 REVERSIBLE SHIFT REGISTER – SFTR(84)Operand Data AreasC: Control wordLadder SymbolsIR, SR, AR, DM, HR, LRSFTR(84)@SFTR(84)CCStStEESt: Starting wordLimitationsIR, SR, AR, DM, HR, LRE: End wordIR, SR, AR, DM, HR, LRSt and E must be in the same data area and St must be less than or equalto E.DM 6144 to DM 6655 cannot be used for C, St, or E.DescriptionSFTR(84) is used to create a single- or multiple-word shift register that can shiftdata to either the right or the left. To create a single-word register, designate thesame word for St and E.

The control word provides the shift direction, the statusto be put into the register, the shift pulse, and the reset input. The control word isallocated as follows:15141312Not used.Shift direction1 (ON): Left (LSB to MSB)0 (OFF): Right (MSB to LSB)Status to input into registerShift pulse bitReset379Section 7-16Shift InstructionsThe data in the shift register will be shifted one bit in the direction indicated by bit12, shifting one bit out to CY and the status of bit 13 into the other end wheneverSFTR(84) is executed with an ON execution condition as long as the reset bit isOFF and as long as bit 14 is ON. If SFTR(84) is executed with an OFF executioncondition or if SFTR(84) is executed with bit 14 OFF, the shift register will remainunchanged. If SFTR(84) is executed with an ON execution condition and the reset bit (bit 15) is OFF, the entire shift register and CY will be set to zero.FlagsExampleER:St and E are not in the same data area or ST is greater than E.Indirectly addressed DM word is non-existent.

(Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)CY:Receives the status of bit 00 of St or bit 15 of E, depending on the shiftdirection.In the following example, IR 00000, IR 00001, IR 00002, and IR 00003 are usedto control the bits of C used in @SFTR(84).

The shift register is in DM 0010, andit is controlled through IR 00004.Address0000020012Direction20013Status to input20014Shift pulse20015Reset00001000020000300000000010000200003000040000500006000070000800009InstructionOperandsLDOUTLDOUTLDOUTLDOUTLD@SFTR(84)000002001200001200130000220014000032001500004DMDM0000420000100011@SFTR(84)200DM 0010DM 00117-16-10 ASYNCHRONOUS SHIFT REGISTER – ASFT(17)Operand Data AreasC: Control wordLadder SymbolsIR, SR, AR, DM, HR, LR, #ASFT(17)@ASFT(17)St: Starting wordCCIR, SR, AR, DM, HR, LRStStEEE: End wordIR, SR, AR, DM, HR, LRNote ASFT(17) is an expansion instruction for the SRM1(-V2).

The function code 17 isthe factory setting and can be changed for the SRM1(-V2) if desired.Limitations380St and E must be in the same data area, and E must be greater than or equal toSt.DM 6144 to DM 6655 cannot be used for St or E.Section 7-16Shift InstructionsDescriptionWhen the execution condition is OFF, ASFT(17) does nothing and the programmoves to the next instruction.

When the execution condition is ON, ASFT(17) isused to create and control a reversible asynchronous word shift register between St and E. This register only shifts words when the next word in the registeris zero, e.g., if no words in the register contain zero, nothing is shifted.

Also, onlyone word is shifted for each word in the register that contains zero. When thecontents of a word are shifted to the next word, the original word’s contents areset to zero. In essence, when the register is shifted, each zero word in the register trades places with the next word. (See Example below.)The shift direction (i.e.

whether the “next word” is the next higher or the next lower word) is designated in C. C is also used to reset the register. All of any portionof the register can be reset by designating the desired portion with St and E.Control WordBits 00 through 12 of C are not used. Bit 13 is the shift direction: turn bit 13 ON toshift down (toward lower addressed words) and OFF to shift up (toward higheraddressed words). Bit 14 is the Shift Enable Bit: turn bit 14 ON to enable shiftregister operation according to bit 13 and OFF to disable the register. Bit 15 is theReset bit: the register will be reset (set to zero) between St and E whenASFT(17) is executed with bit 15 ON.

Turn bit 15 OFF for normal operation.Note If the non-differentiated form of ASFT(17) is used, data will be shifted every cyclewhile the execution condition is ON. Use the differentiated form to prevent this.FlagsER:The St and E words are in different areas, or St is greater than E.Indirectly addressed DM word is non-existent. (Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)ExampleThe following example shows instruction ASFT(17) used to shift words in an11-word shift register created between DM 0100 and DM 0110 with C=#6000.Non-zero data is shifted towards St (DM 0110).00000ASFT(17)#6000DM 0100Address0000000001InstructionOperandsLDASFT(17)00000#DMDMDM 0110BeforeexecutionAfter oneexecutionDM 0100123412341234DM 0101000000002345DM 0102000023453456DM 0103234500004567DM 0104345634565678DM 0105000045676789DM 010645670000789ADM 0107567856780000DM 0108678967890000DM 01090000789A0000DM 0110789A00000000600001000110After sevenexecutionsNote The zeroes are shifted “upward” if C=4000, and the entire shift register is set tozero if C=8000.381Section 7-17Data Movement Instructions7-17 Data Movement Instructions7-17-1 MOVE – MOV(21)Ladder SymbolsOperand Data AreasS: Source wordMOV(21)@MOV(21)SSDDIR, SR, AR, DM, HR, TC, LR, #D: Destination wordIR, SR, AR, DM, HR, LRLimitationsDM 6144 to DM 6655 cannot be used for D.DescriptionWhen the execution condition is OFF, MOV(21) is not executed.

When theexecution condition is ON, MOV(21) copies the content of S to D.Source wordDestination wordBit statusnot changed.PrecautionsTC numbers cannot be designated as D to change the PV of the timer or counter.You can, however, easily change the PV of a timer or a counter by usingBSET(71).FlagsER:Indirectly addressed DM word is non-existent.

(Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)EQ:ON when all zeros are transferred to D.ExampleThe following example shows @MOV(21) being used to copy the content ofIR 001 to HR 05 when IR 00000 goes from OFF to ON.00000@MOV(21)001HR 05AddressInstruction0000000001LD@MOV(21)Operands00000HRIR 0000 1 1 1 0 0 1 1 1 0 0 0 0 1 0 1HR 050 1 1 1 0 0 1 1 1 0 0 0 0 1 0 1001057-17-2 MOVE NOT – MVN(22)Ladder SymbolsOperand Data AreasS: Source wordMVN(22)@MVN(22)SSDDIR, SR, AR, DM, HR, TC, LR, #D: Destination wordLimitations382DM 6144 to DM 6655 cannot be used for D.IR, SR, AR, DM, HR, LRSection 7-17Data Movement InstructionsDescriptionWhen the execution condition is OFF, MVN(22) is not executed. When theexecution condition is ON, MVN(22) transfers the inverted content of S (specified word or four-digit hexadecimal constant) to D, i.e., for each ON bit in S, thecorresponding bit in D is turned OFF, and for each OFF bit in S, the corresponding bit in D is turned ON.Source wordDestination wordBit statusinverted.PrecautionsTC numbers cannot be designated as D to change the PV of the timer or counter.However, these can be easily changed using BSET(71).FlagsER:Indirectly addressed DM word is non-existent.

(Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)EQ:ON when all zeros are transferred to D.ExampleThe following example shows @MVN(22) being used to copy the complement of#F8C5 to DM 0010 when IR 00001 goes from OFF to ON.00001@MVN(22)#F8C5DM 0010AddressInstruction0000000001LD@MOV(21)Operands00001#DM#F8C51 1 1 1 1 0 0 0 1 1 0 0 0 1 0 1DM 00100 0 0 0 0 1 1 1 0 0 1 1 1 0 1 0F8C500107-17-3 BLOCK TRANSFER – XFER(70)Operand Data AreasN: Number of words (BCD)Ladder SymbolsIR, SR, AR, DM, HR, TC, LR, #XFER(70)@XFER(70)NNSSDDS: Starting source wordLimitationsIR, SR, AR, DM, HR, TC, LRD: Starting destination wordIR, SR, AR, DM, HR, TC, LRS and S+N must be in the same data area, as must D and D+N.DM 6144 to DM 6655 cannot be used for D.383Section 7-17Data Movement InstructionsDescriptionFlagsWhen the execution condition is OFF, XFER(70) is not executed.

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

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

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

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