1.项目中有一台控制器需送出一个电流(0-20mA,要求分辨率0.1mA)和一个电压信号,共2个,为节约打算选用CPU224XP,但224只能采样电压信号,是否可以加个500欧姆的精密电阻换成电压值采样,长期稳定性如何,有无其他不妥之处,请各位学长指教
2.另外控制器需要通过S7-200PLC去读取数据,控制器的具体协议不知道,说明书里有一张字符表,例如长度第11位是“T
”这个字符,如下可以看到是ASCII字符串,并且控制器为广播方式,每隔10S自动发送一串数据,PLC程序该如何处理呢,希望得到
各位学长的指导,如有类似例程,方便的话可以发至我的邮箱,warren.wu@hotmail.com,谢谢。
监听串口数据如下:
# Time Function Data ( String )
1 [00164269] IOCTL_SERIAL_SET_BAUD_RATE Baud Rate: 9600
2 [00164270] IOCTL_SERIAL_SET_LINE_CONTROL StopBits: 1, Parity: No, DataBits: 8
3 [00164346] IRP_MJ_READ Length: 0001, Data:
4 [00164347] IRP_MJ_READ Length: 0003, Data: CO
5 [00164347] IRP_MJ_READ Length: 0001, Data:
6 [00164347] IRP_MJ_READ Length: 0005, Data:
7 [00164347] IRP_MJ_READ Length: 0005, Data: PT1
8 [00164348] IRP_MJ_READ Length: 0005, Data: p
9 [00164348] IRP_MJ_READ Length: 0001, Data: p
10 [00164348] IRP_MJ_READ Length: 0004, Data: mWAR
11 [00164348] IRP_MJ_READ Length: 0001, Data: M
12 [00164348] IRP_MJ_READ Length: 0003, Data: UP
13 [00164348] IRP_MJ_READ Length: 0001, Data:
14 [00164349] IRP_MJ_READ Length: 0004, Data:
15 [00164349] IRP_MJ_READ Length: 0005, Data:
16 [00164349] IRP_MJ_READ Length: 0005, Data:
17 [00164986] IRP_MJ_READ Length: 0001, Data:
18 [00164987] IRP_MJ_READ Length: 0003, Data: CO
19 [00164987] IRP_MJ_READ Length: 0001, Data:
20 [00164987] IRP_MJ_READ Length: 0003, Data:
21 [00164987] IRP_MJ_READ Length: 0001, Data:
22 [00164987] IRP_MJ_READ Length: 0003, Data: PT
23 [00164987] IRP_MJ_READ Length: 0004, Data: 1
24 [00164987] IRP_MJ_READ Length: 0003, Data:
25 [00164988] IRP_MJ_READ Length: 0003, Data: ppm
26 [00164988] IRP_MJ_READ Length: 0003, Data: WAR
27 [00164988] IRP_MJ_READ Length: 0003, Data: MUP
28 [00164988] IRP_MJ_READ Length: 0001, Data:
29 [00164988] IRP_MJ_READ Length: 0003, Data:
30 [00164989] IRP_MJ_READ Length: 0003, Data:
问题补充:
1.电阻的额定功率有要求吗?1W可以吗?
2.这款控制器是国外分公司的产品,通讯协议保密,但我这边又需要这种应用,也痛苦啊,按老外的说法,应该也不难,控制器是每10秒发个消息,一个消息40个字符,我只需要考虑怎么去取数据及存放,不需要询问控制器
最佳答案
做通讯靠监听数据??你设备不是买回来的吗??
提问者对于答案的评价:
谢谢大家,1/4W
原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc316916.html