宏要寫對
// Write Multiple Registers
macro_command main()
char command[50], response[50]
short address, read_no
short checksum, write_value[30]
short return_value, i
PURGE(1)
FILL(command[0], 0, 50)// init
FILL(response[0], 0, 50)
write_value[0]=7003
write_value[1]=17152
HIBYTE(write_value[0], command[0])
LOBYTE(write_value[0], command[1])
HIBYTE(write_value[1], command[2])
LOBYTE(write_value[1], command[3])
OUTPORT(command[0], "Free Protocol", 3)// send command
給你個宏自己研究吧
[2133]
[7095]
[3508]
[8762]
[5964]
[4135]
[3874]
[2704]
[2384]
[2535]

客服
小程序
公众号