我用S7-200(型号:224XP)作为MODBUS主站,用口0与称重仪表通讯。口1与上位机通讯以监视数据的读取。程序如下:
LD SM0.0
= L60.0
LD SM0.0
= L63.7
LD L60.0
CALL MBUS_CTRL:SBR1, L63.7, 9600, 2, 1000, M0.0, VB1
LD SM0.0
= L60.0
LD M0.0
EU
= L63.7
LD L60.0
CALL MBUS_MSG:SBR2, L63.7, 8, 0, 40002, 2, &VB300, M0.1, VB2
不知是什么问题,数据读不上来,是什么原因?求助高手指导!