谢谢各位,通过两天努力我放弃了QD71C24N通信,为了感谢各位我把解决方案发给大家共享,现在我采用的是威伦屏的宏指令读取数据,读回的数据写入PLC的D寄存器即可。
macro_command main()
short return_value
short date[9]
char comand[4] ,count[22]
comand[0] = 0x81
comand[1] = 0x04
comand[2] = 0x41
comand[3] = 0x44
OUTPORT(comand[0], "Free Protocol", 4)
INPORT(count[0], "Free Protocol",6, return_value)
SetData(count[0], "Local HMI", LW, 0, 1)
SetData(count[1], "Local HMI", LW, 1, 1)
SetData(count[2], "Local HMI", LW, 2, 1)
SetData(count[3], "Local HMI", LW, 3, 1)
SetData(count[4], "Local HMI", LW, 4, 1)
SetData(count[5], "Local HMI", LW, 5, 1)
SetData(count[6], "Local HMI", LW, 6, 1)
SetData(count[0], "MITSUBISHI Q02/02H", D, 0, 6)
end macro_command