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

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

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

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

In that case, reset the value so that it is within the permissible range.Communications mode:Host LinkCommunications format:Standard settings(1 start bit, 7-bit data; 2 stop bits, even parity,9,600 bps)Transmission delay:NoNode number:00243SectionSRM1(-V2) Communications FunctionsWordBitFunction4-4SettingRS-232C Port SettingsThe following settings are effective after transfer to the PC.DM 664500 to 03 Port settings0: Standard (1 start bit, 7-bit data, 2 stop bits, even parity, 9,600 bps)1: Settings in DM 664604 to 0708 to 11CTS control settings0: Disable; 1: SetWhen using a 1:1 PC Link: Sets the link words for 1:1 PC Link.0: LR 00 to LR 15Not 0: DisableTo matchhost parameters0When using a 1:N NT Link: Sets the maximum PT node number.1 to 712 to 15Communications mode0: Host Link; 1: No-protocol; 2: 1:1 PC Link Slave; 3: 1:1 PC Link Master; 4: 1:1 NTLink; 5: 1:N NT Link0(Any other setting specifies Host Link mode, causes a non-fatal error, and turns ONAR 1302.)DM 664600 to 0708 to 15DM 664700 to 15DM 664800 to 0708 to 1112 to 15DM 664900 to 0708 to 15The 1:N NT Link is supported by SRM1-C02-V2 only.Baud rate00: 1.2K, 01: 2.4K, 02: 4.8K, 03: 9.6K, 04: 19.2KTo matchhost parametersFrame formatStartLengthStopParity00:1 bit7 bits1 bitEven01:1 bit7 bits1 bitOdd02:1 bit7 bits1 bitNone03:1 bit7 bits2 bitEven04:1 bit7 bits2 bitOdd05:1 bit7 bits2 bitNone06:1 bit8 bits1 bitEven07:1 bit8 bits1 bitOdd08:1 bit8 bits1 bitNone09:1 bit8 bits2 bitEven10:1 bit8 bits2 bitOdd11:1 bit8 bits2 bitNoneTransmission delay (Host Link)0000 to 9999 (BCD): Set in units of 10 ms, e.g., setting of 0001 equals 10 msTo matchhost parametersNode number (Host Link, effective when bits 12 to 15 of DM 6645 are set to 0.)00 to 31 (BCD)Start code enable (RS-232C, effective when bits 12 to 15 of DM 6645 are set to 1.)0: Disable; 1: SetEnd code enable (RS-232C, effective when bits 12 to 15 of DM 6645 are set to 1.)0: Disable (number of bytes received)1: Set (specified end code)2: CR, LFStart code (RS-232C)00: 256 bytes01 to FF: 1 to 255 bytes00 to 31End code enable (RS-232C)AnyTo matchhost parametersAnyAnyAny00 to FF (BIN)Note If an out-of-range value is set, the following communications conditions will result.

In that case, reset the value so that it is within the permissible range.244Communications mode:Host LinkCommunications format:Standard settings(1 start bit, 7-bit data; 2 stop bits, even parity,9,600 bps)SectionSRM1(-V2) Communications FunctionsTransmission delay:Node number:Example Program10001010102010501060107010801090110011101120113011401150116011701180119012001210122012301240125012601270128012901300131013201330134013501360137013804-4No00This example shows a BASIC program that reads the status of the SRM1(-V2)’sinputs in IR 000. For more details, refer to 4-5 Host Link Commands.An FCS (frame check sequence) check isn’t performed on the received response data in this program. Be sure that the host computer’s RS-232C port isconfigured correctly before executing the program.’’SRM1 Sample Program for BASIC’’’Set value RS-232C SPEED:9600BPS,PARITY:EVEN,DATA:7,STOP:2OPEN ”COM:E73” AS #1*REPEAT’Transmission data inputINPUT ”send data:”,SEND$’FCS CalculationFCS=0FOR IFCS=1 TO LEN(SEND$)FCS=FCS XOR ASC(MID$(SEND$;IFCS,1)NEXTFCS$=RIGHT$(”0”+HEX$(FCS),2)’Communications executeZZZ$=SEND$+FCS$+”*”+CHR$(13)PRINT #1,ZZZ$;’Response checkRECCNT=0:TMP$=””*DRECLOOPIF LOC(1)<>0 THEN *DREC1RECCNT=RECCNT+1IF RECCNT=5000 THEN *DRECERR ELSE *DRECLOOP*DREC1TMP$=TMP$+INPUT$(LOC(1),#1)IF RIGHT$(TMP$,1)=CHR$(13) THEN *DRECEND ELSE RECCNT=0:GOTO *DRECLOOP*DRECERRTMP$=”No response!!”+CHR$(13)*DRECENDRECV$=TMP$PRINT ”receive data:”;RECV$’Go to transmission data inputGOTO *REPEAT’Processing completeCLOSE #1END4-4-2 No-protocol CommunicationsThis section explains no-protocol (RS-232C) communications.

No-protocolcommunications allow data to be exchanged with standard RS-232C devicessuch as printers and bar code readers. Data can be printed out by a printer orread by a bar code reader. Handshaking is not supported for no-protocol communications.Communications ProcedureTransmissions1, 2, 3...1. Check to see that AR 0805 (the RS-232C Port Transmit Ready Flag) hasturned ON.245SectionSRM1(-V2) Communications Functions4-42.

Use the TXD(48) instruction to transmit the data.(@)TXD(48)S: Leading word no. of data to be transmittedSC: Control dataCN: Number of bytes to be transmitted (4 digits BCD), 0000 to 0256NFrom the time this instruction is executed until the data transmission is complete,AR 0805 ( or AR0813 for the peripheral port) will remain OFF. (It will turn ONagain upon completion of the data transmission.)Start and end codes are not included when the number of bytes to be transmittedis specified. The largest transmission that can be sent with or without start andend codes in 256 bytes, N will be between 254 and 256 depending on the designations for start and end codes.

If the number of bytes to be sent is set to 0000,only the start and end codes will be sent.256 bytes max.Start codeDataEnd codeTo reset the RS-232C port (i.e., to restore the initial status), turn on SR 25209. Toreset the peripheral port, turn on SR 25208. These bits will turn OFF automatically after the reset.Receptions1, 2, 3...1. Confirm that AR 0806 (RS-232C Reception Complete Flag) or AR 0814 (Peripheral Reception Complete Flag) is ON.2. Use the RXD(47) instruction to receive the data.(@)RXD(47)D: Leading word no. for storing reception dataDCNC: Control dataBits 00 to 030: Leftmost bytes first1: Rightmost bytes firstBits 12 to 150: RS-232C port1: Peripheral portN: Number of bytes stored (4 digits BCD), 0000 to 02563. The results of reading the data received will be stored in the AR area.

Checkto see that the operation was successfully completed. The contents of thesebits will be reset each time RXD(47) is executed.RS-232CportAR 0800 toAR 0803PeripheralportAR 0808 toAR 0811ErrorAR 0804AR0812Communications errorAR 0807AR0815Reception Overrun Flag (After reception was completed, the subsequent data was received before thedata was read by means of the RXD(47) instruction.)AR 09AR10Number of bytes receivedRS-232C port error code (1 digit BCD) 0: Normalcompletion 1: Parity error 2: Framing error 3: Overrun errorTo reset the RS-232C port (i.e., to restore the initial status), turn ON SR 25209.To reset the peripheral port, turn ON SR 25208. These bits will turn OFF automatically after the reset.246SectionSRM1(-V2) Communications Functions4-4The start code and end code are not included in AR 09 or AR 10 (number of bytesreceived).The data will be as follows: “31323132313231323132CR LF”Peripheral Port SettingsWhen the peripheral port is used to conduct no-protocol communications, thefollowing settings must be made from the Programming Device to DM 6650 toDM 6653 in the SRM1(-V2).WordBitFunctionSettingPeripheral Port SettingsThe following settings are effective after transfer to the PC.DM 665000 to 03Port settings0: Standard (1 start bit, 7-bit data, 2 stop bits, even parity, 9,600 bps)1: Settings in DM 6651As required(Other settings will cause a non-fatal error, the default setting (0) will be used, andAR 1302 will turn ON.)04 to 0708 to 1112 to 15Not used.Not used.Communications mode0: Host Link; 1: No-protocol001: No-protocol(Other settings will cause a non-fatal error, the default setting (0) will be used, andAR 1302 will turn ON.)DM 665100 to 0708 to 15Baud rate00: 1.2K, 01: 2.4K, 02: 4.8K, 03: 9.6K, 04: 19.2KFrame formatStartLengthStop00:1 bit7 bits1 bit01:1 bit7 bits1 bit02:1 bit7 bits1 bit03:1 bit7 bits2 bit04:1 bit7 bits2 bit05:1 bit7 bits2 bit06:1 bit8 bits1 bit07:1 bit8 bits1 bit08:1 bit8 bits1 bit09:1 bit8 bits2 bit10:1 bit8 bits2 bit11:1 bit8 bits2 bitParityEvenOddNoneEvenOddNoneEvenOddNoneEvenOddNoneAs requiredAs required(Other settings will cause a non-fatal error, the default setting (00) will be used, andAR 1302 will turn ON.)DM 665200 to 15Transmission delay (Host Link)0000 to 9999 (BCD): Set in units of 10 ms.(Other settings will cause a non-fatal error, the default setting (0000) will be used,and AR 1302 will turn ON.)DM 665300 to 0708 to 1112 to 15Node number (Host Link)00 to 31 (BCD)(Other settings will cause a non-fatal error, the default setting (0000) will be used,and AR 1302 will turn ON.)Start code enable (RS-232C, effective when bits 12 to 15 of DM 6650 are set to 1.)0: Disable1: SetEnd code enable (RS-232C, effective when bits 12 to 15 of DM 6650 are set to 1.)0: Disable (number of bytes received)1: Set (specified end code)2: CR, LFTo matchhost parameters00 to 31As requiredAs required247SectionSRM1(-V2) Communications FunctionsWordDM 6654BitFunctionSetting00 to 07Start code (effective when bits 08 to 11 of DM6650 are set to 1.)00: 256 bytes01 to FF: 1 to 255 bytesAs required08 to 15End code (no-protocol)As requiredWhen bits 12 to 15 of DM6653 are set to 0:00: 256 bytes01 to FF: 1 to 255 bytes4-4When bits 12 to 15 of DM6653 are set to 1:Setting: 00 to FF (Hex)Note If an out-of-range value is set, the following communications conditions will result.

In that case, reset the value so that it is within the permissible range.Communications mode:Communications format:Transmission delay:Node number:RS-232C Port SettingsWordBitHost LinkStandard settings(1 start bit, 7-bit data; 2 stop bits, even parity,9,600 bps)No00When the RS-232C port is used to conduct no-protocol communications, the following settings must be made from the Programming Device to DM 6645 toDM 6649 in the SRM1(-V2).FunctionSettingRS-232C Port SettingsThe following settings are effective after transfer to the PC.DM 664500 to 03 Port settings0: Standard (1 start bit, 7-bit data, 2 stop bits, even parity, 9,600 bps)1: Settings in DM 664604 to 0708 to 11CTS control settings0: Disable; 1: SetWhen using a 1:1 PC link: Sets the link words for 1:1 PC Link.0: LR 00 to LR 15Not 0: DisableAs required0When using a 1:N NT Link: Sets the maximum PT node number.1 to 712 to 15The 1:N NT Link is supported by SRM1-C02-V2 only.Communications mode0: Host Link; 1: No-protocol; 2: 1:1 PC Link Slave; 3: 1:1 PC Link Master; 4: 1:1 NTLink; 5: 1:N NT Link1(Any other setting specifies Host Link mode, causes a non-fatal error, and turns ONAR 1302.)DM 664600 to 0708 to 15248The 1:N NT Link is supported by SRM1-C02-V2 only.Baud rate00: 1.2K, 01: 2.4K, 02: 4.8K, 03: 9.6K, 04: 19.2KFrame formatStartLengthStopParity00:1 bit7 bits1 bitEven01:1 bit7 bits1 bitOdd02:1 bit7 bits1 bitNone03:1 bit7 bits2 bitEven04:1 bit7 bits2 bitOdd05:1 bit7 bits2 bitNone06:1 bit8 bits1 bitEven07:1 bit8 bits1 bitOdd08:1 bit8 bits1 bitNone09:1 bit8 bits2 bitEven10:1 bit8 bits2 bitOdd11:1 bit8 bits2 bitNoneAs requiredAs requiredSectionSRM1(-V2) Communications FunctionsWordBitFunctionDM 664700 to 15DM 664800 to 07Transmission delay (Host Link)0000 to 9999 (BCD): Set in units of 10 ms, e.g., setting of 0001 equals 10 msNode number (Host Link, effective when bits 12 to 15 of DM 6645 are set to 0.)00 to 31 (BCD)Start code enable (RS-232C, effective when bits 12 to 15 of DM 6645 are set to 1.)0: Disable; 1: SetEnd code enable (RS-232C, effective when bits 12 to 15 of DM 6645 are set to 1.)0: Disable (number of bytes received)1: Set (specified end code)2: CR, LFStart code (RS-232C)00: 256 bytes01 to FF: 1 to 255 bytes08 to 1112 to 15DM 664900 to 0708 to 154-4SettingAs requiredAs requiredAs requiredEnd code enable (RS-232C)00 to FF (BIN)Note If an out-of-range value is set, the following communications conditions will result.

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

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

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

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