Wait, sorry, I misread the manual. The command that needs a comma is the write one.
The original command seems indeed correct...
data = "">
print(data)
if not data:
break
conn.sendall(data)
(...)
drvAsynIPPortConfigure("$(PORT)", "127.0.0.1:5001", 0, 0, 1)
That might make your life easier 🙂
Cheers,
Marco
Hi all,
In the communication protocol of the COMBIVAC CM 52, there is a specification as follows:
S: RPV[a]<CR>
E: b[,][TAB]x.xxxxE±xx
Here, a represents the channel number .1 = Channel 1 ,2 = Channel 2 ,3 = Channel 3 (The values 1, 2, and 3 are character digits).b represents the status.
I want to use StreamDevice to read data. The contents of my .db file are as follows:
record(mbbo, "$(P)$(R):Channel")
{
field(DESC, "Select Channel")
field(ZRVL, "49")
field(ZRST, "Channel 1")
field(ONVL, "50")
field(ONST, "Channel 2")
field(TWVL, "51")
field(TWST, "Channel 3")
field(VAL, "51")
field(PINI, "YES")
field(FLNK, "$(P)$(R):RPV")
}
record(ai, "$(P)$(R):RPV")
{
field(DESC, "Reading pressure")
field(DTYP, "stream")
field(INP, "@test.proto readPressure($(P)$(R)) $(PORT)")
field(SCAN, "1 second")
field(FLNK, "$(P)$(R):Status")
}
record(mbbi, "$(P)$(R):Status")
{
field(DESC, "status of channel")
field(ZRVL, "0")
field(ZRST, "OK")
field(ONVL, "1")
field(ONST, "BelowRange")
field(TWVL, "2")
field(TWST, "AboveRange")
field(THVL, "3")
field(THST, "ErrLo")
field(FRVL, "4")
field(FRST, "ErrHi")
field(FVVL, "5")
field(FVST, "SensorOff")
field(SXVL, "6")
field(SXST, "HVon")
field(SVVL, "7")
field(SVST, "SensorErr")
field(EIVL, "9")
field(EIST, "NoSensor")
field(TEVL, "10")
field(TEST, "NoTrig")
field(TVVL, "12")
field(TVST, "ErrPi")
field(FFVL, "15")
field(FFST, "OkDegas")
}
The contents of my
.proto file are as follows:
OutTerminator = CR;
InTerminator = CR;
readPressure{
out "RPV%(\$1:Channel)c?";
in "%(\$1:Status)d,\t%g";
}
readVersion{
out "RVN";
in "%f";
}
However, the following error occurs:
2025/12/10 05:47:36.646640 Combivac1 Emission:fl:RPV: Input "?<09>P,<09>1" does not match format "%d"
2025/12/10 05:47:37.646725 Combivac1 Emission:fl:RPV: Input "?<09>P,<09>1" does not match format "%d"
2025/12/10 05:47:38.646532 Combivac1 Emission:fl:RPV: Input "?<09>P,<09>1" does not match format "%d"
2025/12/10 05:47:39.644943 Combivac1 Emission:fl:RPV: Input "?<09>P,<09>1" does not match format "%d"
What is the cause of this? Am I doing something wrong?Please help.
Feng