key="" cmd01=[0x01,0x03,0x00,0x00,0x00,0x01,0x84,0x0A] cmd02=[0x01,0x03,0x00,0x01,0x00,0x01,0xD5,0xCA] cmd03=[0x01,0x03,0x00,0x00,0x00,0x01,0x84,0x0A] cmd04=[0x01,0x03,0x00,0x01,0x00,0x01,0xD5,0xCA] num=0 TIMER HeartBeat 500 num=num+1 IF(num==1) SEND(UART,uart0,cmd01) key="CH1" END IF(num==2) SEND(UART,uart0,cmd02) key="CH2" END IF(num==3) SEND(UART,uart0,cmd03) key="CH3" END IF(num==4) SEND(UART,uart0,cmd04) key="CH4" num=0 END END RECV UART uart0 DATA=INPUT DATA_S=DATA.hexString() DATA_B="{"key":""+key+"","value":""+DATA_S+""}" SEND(SOCK,netp,DATA_B) END