yCommandz |
|
yCommunicationz |
|
yUSEz |
X_RTU
|
X_RTU slave_address 6 REG_ADD~Wrd WRITE_DATA~Wrd X_RTU 10 5 "WW" RTU(REG_AD) |
yFORMATz |
yFUNCTIONz |
X_RTU adrs func DATA_LIST X_RTU adrs func Strings Araay
|
|
yEXPLANATIONz |
|
|
|
MODBUS 2 2 "38400b8pes1NONE" MOD_DLY=4 TIME 1000 '=============== ' 2byte write '=============== *QUERY_WRITE_REG _VAR REG_ADD WRITE_DATA 'PRINT "== WRITE ==" HEX$(REG_ADD) HEX$(WRITE_DATA) DO X_RTU slave_address 6 REG_ADD~Wrd WRITE_DATA~Wrd CRC_OK=R_RTU(6) IF CRC_OK==1 THEN : BREAK : END_IF LOOP RETURN '=============== ' 4byte read '=============== *QUERY_READ_REG_L _VAR REG_ADD 'PRINT "== READ ==" HEX$(REG_ADD) DO X_RTU slave_address 3 REG_ADD~Wrd 2~Wrd CRC_OK=R_RTU(7) IF CRC_OK==1 THEN : BREAK : END_IF LOOP RETURN '=============== |
|
|
[LASTMODIFY]2019-03-13 14:31:35 |
[CREATEDATE]2015-12-22 11:44:40 |
|
|
|