如果传感器输出为4~20mA,怎么通讯?如果传感器输出为数字量信号RS485,又该怎么通讯?急急急!!!万分感谢!!!... 如果传感器输出为4~20mA,怎么通讯?
如果传感器输出为数字量信号RS485,又该怎么通讯?
急急急!!!万分感谢!!!
模拟量的程序:
LD SM0.0
ITD AIW0, AC0
DTR AC0, AC0
-R 6400.0, AC0
/R 25600.0, AC0
*R 1000.0, AC0
ROUND AC0, VD100
RS485(modbus协议)要设置存储地址否则会有错误
LD SM0.0
= L60.0
LD SM0.0
= L63.7
LD L60.0
CALL MBUS_CTRL_P1:SBR2, L63.7, 9600, 0, +1000, M8.1, MB14
LD SM0.5
= L60.0
LD SM0.5
EU
= L63.7
LD L60.0
CALL MBUS_MSG_P1:SBR3, L63.7, 2, 0, 30001, 2, &VB3000, M0.6, MB8