php 怎么监听设备获取串口里面的内容

不败少龙

DB9 COM Receiver
BaudRate:9600
SEND ASCII
e.g

这个是命令:


S No=00000 R B ES-R-R -05.50 -00.50 +150 65 ES-R-L +10.25 +10.10 +079 65 E

这个是对方文档给的实例:

SOFT SOURCE:
void Send232(void)
{
String str;
 double rs,rc,rca,rpd,ls,lc,lca,lpd;
 rs = -5.50; //RIGHT SPH
 rc = -0.50; //RIGHT CYL
 rca = 150; //RIGHT CYL AXIAL
 rpd = 32; //RIGHT PD
 ls = 10.25; //LEFT SPH
 lc = 10.10; //LEFT CYL
 lca = 79; //LEFT CYL AXIAL
 lpd = 32.5; //LEF PD
 str.sprintf("S No=00000 R B ES-R-R %+06.2f %+06.2f +.0f .0f ES-R-L %+06.2f %+06.2f +.0f .0f E",
 rs,rc,rca,(rpd+lpd),
 ls,lc,lca,(rpd+lpd) 
 );
// S No=00000 R B ES-R-R -05.50 -00.50 +150 65 ES-R-L +10.25 +10.10 +079 65 E
//Send232
}

怎么用php和workerman去获取设备上内容,设备只能局域网访问

2333 0 0
0个回答

年代过于久远,无法发表回答
×
🔝