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  <20232024  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  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: [External] Re: Keysight 34980A SCPI StreamDevice
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "Leblanc, Gregory" <leblanc at ohio.edu>
Date: Tue, 24 Jan 2023 23:38:32 +0000
Hi Greg,

I think you will need a separate calc record for that.  The linear conversions in the ai record won't do the exponential you need.

Mark


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Leblanc, Gregory via Tech-talk <tech-talk at aps.anl.gov>
Sent: Tuesday, January 24, 2023 5:33 PM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: RE: [External] Re: Keysight 34980A SCPI StreamDevice
 

All right, now for the next hurdle.  I’ve got the raw data being pulled from the device, but I need to do some manipulation on it to get it into something that humans can consume.

 

I’ve got a record that looks like this:

 

record(ai, "$(P)$(R)getVacuumLevel") {

  field(DESC, "Alphatross Vacuum Level)")

  field(DTYP, "stream")

  field(INP, "@devswag6.proto getVoltageDC(10,0.1,5012) $(PORT) $(A)")

  field(PINI, "YES")

}

 

Which I can then query with:

$ caget swag6testgetVacuumLevel

swag6testgetVacuumLevel        2.7718

 

Now, the real vacuum level is 10^(swag6testgetVacuumLevel – 10). 

Can I do that directly in this database record, or do I need to add a separate calc record? 

 

I’ve started to read through https://docs.epics-controls.org/en/latest/guides/EPICS_Process_Database_Concepts.html#linear-conversions but it’s taking more brainpower than I have available this evening. 

     Greg

 

From: Andrew Johnson <anj at anl.gov>
Sent: Tuesday, January 24, 2023 1:18 PM
To: Leblanc, Gregory <leblanc at ohio.edu>; tech-talk at aps.anl.gov
Subject: [External] Re: Keysight 34980A SCPI StreamDevice

 

Use caution with links and attachments.

Hi Greg,

I'm not a StreamDevice expert at all, but it seems to me that your design is expecting the number 9.9e37 to fit into a longin record's VAL field. In EPICS the word "long" was set in the days when an int was only 16 bits wide, so a DBF_LONG is only an epicsInt32 with a maximum value of 2,147,483,648 ~ 2.15e9.

Changing the record into an ai should fix that.

- Andrew

On 1/24/23 11:59 AM, Leblanc, Gregory via Tech-talk wrote:

Hi again,
 
Still trying to run down some more details about talking to these lovely Keysight boxes via EPICS.  I've got the stock SCPI stuff working, so next I wanted to read some resistance values.  I added this to my protocol file: 
 
getResistance {
    out "measure:resistance? \$1,\$2,\$3";
    in "%E";
}
 
And added this to my .db file:
 
record(longin, "$(P)$(R)GetIG")
{
    field(DESC, "Get Alphatross Ion Gauge Value")
    field(DTYP, "stream")
    field(INP,  "@devswag6.proto getResistance(10,0.1,(@5012)) $(PORT) $(A)")
}
 
After starting the ioc, I can do ' dbtr swag6testGetIG`, which sends the correct string, and gets a reply from the mainframe.  What I'm stuck on is handing the reply.  The box replies with:
 
 +9.90000000E+37\n
 
But the way I have things configured I get:
 
2023/01/24 12:49:07.000698 LAN0 swag6testGetIG: Format "%E" has data type double which is not supported by "swag6testGetIG".
 
It seems like that should work, based on: https://paulscherrerinstitute.github.io/StreamDevice/formats.html  
I don't know if I managed to compile StreamDevice with some missing library, or if I've done something else wrong along the way.  
 
Thanks for any pointers,
     Greg
 
--
Gregory Leblanc
Accelerator Engineer
Edwards Accelerator Lab - Ohio University
123 University Terrace
Athens, OH 45701 USA
leblanc at ohio.edu
M: (401) 52-OUAL1 or (401) 526-8251
 



-- 
Complexity comes for free, Simplicity you have to work for.

References:
Keysight 34980A SCPI StreamDevice Leblanc, Gregory via Tech-talk
Re: Keysight 34980A SCPI StreamDevice Andrew Johnson via Tech-talk
RE: [External] Re: Keysight 34980A SCPI StreamDevice Leblanc, Gregory via Tech-talk

Navigate by Date:
Prev: RE: [External] Re: Keysight 34980A SCPI StreamDevice Leblanc, Gregory via Tech-talk
Next: Re: Keysight 34980A SCPI StreamDevice Zimoch Dirk 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  <20232024 
Navigate by Thread:
Prev: RE: [External] Re: Keysight 34980A SCPI StreamDevice Leblanc, Gregory via Tech-talk
Next: Re: Keysight 34980A SCPI StreamDevice Zimoch Dirk 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  <20232024 
ANJ, 25 Jan 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·