我用宏指令进行自由口读数据,在串口助手中能够读到返回值,宏指令中读不到数据。求大神帮忙解答,是哪边出了问题?
macro_command main()
char command[8],respond[10]
short return_value,read_data[2]
FILL(command[0],0,8)
FILL(respond[0],0,10)
command[0]=0x81
command[1]=0x81
command[2]=0x52
command[3]=0x00
command[4]=0x00
command[5]=0x00
command[6]=0x53
command[7]=0x00
OUTPORT(command[0],"free",8)
INPORT(respond[0], "free", 10, return_value)
SetData(respond[0],"Local HMI", LW,100,1)
end macro_command
串口助手中发送81 81 52 00 00 00 53 00 返回06 01 E8 03 50 60 E8 03 27 69 |