7 Application Instructions API 50-99 Start word (STX): Fixed as ‘:’ (3AH) Address: ‘0’ ‘0’: Broadcasting to all drivers ‘0’ ‘1’: To the driver at address 01 ‘0’ ‘F’: To the driver at address 15 ‘1’ ‘0’: To the driver at address 16 ….and so on, maximum to the driver at address 254 (‘F’ ‘E’) Function code: ‘0’ ‘1’: Reading several bit devices ‘0’ ‘2’: Reading several bit devices (read-only devices) ‘0’ ‘3’: Reading several word devices ‘0’ ‘4’: Reading several word devices (read-only devices) ‘0’ ’5’: Writing a state in a single bit device ‘0’ ‘6’: Writing data in a single word device ‘0’ ’F’: Writing states in bit devices ‘1’ ‘0’: Writing data in word devices ‘1’ ‘7’:
Reading word devices and writing data in word devices Data characters: The data sent by the user. LRC checksum: LCR checksum is 2’s complement of the value added from Address to Data Content. For example: 01H + 03H + 21H + 02H + 00H + 02H = 29H. 2’s complement of 29H = D7H End word (END): Fixed as END Hi = CR (0DH), END Lo = LF (0AH) For example: Read 2 continuous data stored in the registers of the driver at address 01H (see the table below). The start register is at address 2102H. Inquiry message: Responding message: DVP-PLC APPLICATION MANUAL 7-114 STX ‘:
’ ‘0’ Slave station address ‘1’ ‘0’ Function code ‘3’ ‘2’ ‘1’ Start address ‘0’ ‘2’ ‘0’ Number of data ‘0’ (counted by words) ‘0’ ‘2’ ‘D’ LRC checksum ‘7’ CR END LF STX ‘: ’ ‘0’ Slave station address ‘1’ ‘0’ Function code ‘3’ Number of data ‘0’ (counted by byte) ‘4’ ‘1’ Content in start address ‘7’ 2102H ‘7’ ‘0’ ‘0’ Content of address ‘0’ 2103H ‘0’ ‘0’ ‘7’ LRC check ‘1’ CR END LF