Download AcuRev 2000
Transcript
2. Read the status of DI (Function Code 02) Query On top of slave device address and function code, query frame must contain the digital input register starting address and the number of registers to be read. DI register address starts from 0000H(DI1=0000H, DI2=0001H, DI3=0002H, DI4=0003H). Table 5-6 depicts of reading DI1 to DI4 status of the slave device with the address of 17. Addr Fun 11H 02H DI start addr hi 00H DI start addr lo 00H DI num hi 00H DI num lo 04H CRC16 hi 7BH CRC16 lo 59H Table 5-6 Query frame of reading DI status Response The slave device anwsers the master device's query. The response frame contains slave device address, function code, data quantity and CRC check.Each DI utilizes one bit(1 = ON , 0 = OFF).Table 5-7 depicts the response frame. Addr 11H Fun 02H Byte count 01H Data0 03H CRC16 hi E5H CRC16 lo 49H Data Bytes 0 0 0 0 0 0 0 0 DI4 0 DI3 0 MSB DI2 1 DI1 1 LSB Table 5-7 Response frame of reading DI status 87