EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <20252026  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <20252026 
<== Date ==> <== Thread ==>

Subject: Re: Protocol format issues in StreamDevice during COMBIVAC CM 52 device commissioning.
From: "Hu, Yong via Tech-talk" <[email protected]>
To: Marco Filho <[email protected]>, "[email protected]" <[email protected]>, LONG FENG <[email protected]>
Date: Thu, 11 Dec 2025 15:09:42 +0000
Hi Feng,

In the mbbo record "$(P)$(R):Channel",  you are using field(ZRVL, "49") probably because of "The values 1, 2, and 3 are character digits". However, you will get "Illegal Value" if you type "caget $(P)$(R):Channel". You cannot assign any value greater 15 to the value fields (ZRVL, ONVL, etc.) 

Maybe you should use field(ZRVL, "1") instead? If you really want to use “49”, you have to use "Raw Soft Channel" for DTYP.

BTW, you should remove either field(FLNK, "$(P)$(R):RPV") OR field(SCAN, "1 second")

Cheers,
Yong
NSLS-2 Accelerator Controls

From: Tech-talk <[email protected]> on behalf of Marco Filho via Tech-talk <[email protected]>
Date: Wednesday, December 10, 2025 at 8:48 AM
To: [email protected] <[email protected]>, LONG FENG <[email protected]>, Marco Filho <[email protected]>
Subject: Re: Protocol format issues in StreamDevice during COMBIVAC CM 52 device commissioning.


Wait, sorry, I misread the manual. The command that needs a comma is the write one.
The original command seems indeed correct...


From: Tech-talk <[email protected]> on behalf of Marco Filho via Tech-talk <[email protected]>
Sent: Wednesday, December 10, 2025 14:45
To: [email protected] <[email protected]>; LONG FENG <[email protected]>
Subject: Re: Protocol format issues in StreamDevice during COMBIVAC CM 52 device commissioning.
 
out "RPV%(\$1:Channel)c?";

The manual says it should be in the format:
Reading command
S: Address Command <CR>
 E: [Parameter] <CR>

I think you are missing a comma?

I created an IOC with your db/test file combinations to test and my socket receives:

B'RPV3?\r' 

If I correctly understand the manual it should be:

B'RPV,3?\r' 

Is that right? If so,


out "RPV,%(\$1:Channel)c?";
Should fix the issue. Not sure though.


I really recommend connecting your IOC with some simple python socket server to see what it's actually sending:

import socket

HOST = '127.0.0.1' 
PORT = 5001

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
    s.bind((HOST, PORT))
    s.listen()
    conn, addr = s.accept()
    with conn:
        while True:
            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


From: Tech-talk <[email protected]> on behalf of LONG FENG via Tech-talk <[email protected]>
Sent: Wednesday, December 10, 2025 12:18
To: [email protected] <[email protected]>
Subject: Protocol format issues in StreamDevice during COMBIVAC CM 52 device commissioning.
 
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

Replies:
Re: Protocol format issues in StreamDevice during COMBIVAC CM 52 device commissioning. Hu, Yong via Tech-talk
References:
Protocol format issues in StreamDevice during COMBIVAC CM 52 device commissioning. LONG FENG via Tech-talk
Re: Protocol format issues in StreamDevice during COMBIVAC CM 52 device commissioning. Marco Filho via Tech-talk
Re: Protocol format issues in StreamDevice during COMBIVAC CM 52 device commissioning. Marco Filho via Tech-talk

Navigate by Date:
Prev: EPICs support for the Agilent 4UHV Ion pump controller Hudson, Lee (DLSLtd,RAL,TEC) via Tech-talk
Next: Re: Protocol format issues in StreamDevice during COMBIVAC CM 52 device commissioning. Hu, Yong via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <20252026 
Navigate by Thread:
Prev: Re: Protocol format issues in StreamDevice during COMBIVAC CM 52 device commissioning. Marco Filho via Tech-talk
Next: Re: Protocol format issues in StreamDevice during COMBIVAC CM 52 device commissioning. Hu, Yong via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <20252026 
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·