If you press F1 key, then the EXM will upload the AF1-AF3 value to the server(slave1) as follows:
Server software get the data like this:
00 01 00 00 00 0D 01 10 00 00 00 03 06 00 64 03 E8 27 10
The request and response are prefixed by six bytes as follows
byte 0: transaction identifier - copied by server
byte 1: transaction identifier - copied by server
byte 2: protocol identifier = 0
byte 3: protocol identifier = 0
byte 4: length field (upper byte) = 0 (since all messages are smaller than 256)
byte 5: length field (lower byte) = number of bytes following
byte 6: unit identifier (previously ‘slave address’)
byte 7: MODBUS function code
byte 8: Register of slave start address
byte 9: Register of slave start address
byte 10:number of registers
byte 11:number of registers
byte 12:data length field (lower byte) = number of bytes following
So, AF1 = 00 64 (DECIMAL 100)
AF2 =03 E8 (DECIMAL 1000)
AF3 = 27 10 (DECIMAL 10000)
The the server end(slave1) do response
00 01 00 00 00 06 01 10 00 00 00 03
So if the "Trg" input keeps high, the the output will be high also after the EXM get the above correct response.
Note: The Modbus code 16 is used to upload the analog value(includes analog inputs, analog outputs, analog
flag and REG), Modbus code 15 is used to upload the digital status for digital flag, digital output, and digital
input.
B. customize Modbus
For example,configuration in program like this:
B. Standard Modbus
For example,configuration in program like this: