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  <20202021  2022  2023  2024  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Splitting a string in a protocol file
From: "Wang, Andrew via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 17 Dec 2020 19:47:12 +0000

Hi,

 

I’m relatively new to EPICS and I have been tasked with writing drivers for a Keysight oscilloscope. One of the commands that I need to set up is the following:

 

:CHANnel<N>:SCALe

 

This command requires a channel number and a value. So if I wanted to set the vertical scale of Channel 2 to 50 V, I would do

 

:CHANnel2:SCALe 50

 

I would like to work on both my protocol file and database file, but I am not sure how to go about it. This is what I currently have.

 

record(aao, "set_vert_scale")

{

              field(DESC, "Set vertical scale for a channel")

              field(DTYP, "stream")

              field(FTVL, "STRING")

              field(OUT, "@keysightOsc.proto setVertScale $(PORT)")

}

 

setVertScale

{

              separator = “,”

              out "%s:SCALe ";

}

 

My goal is for the user to enter a command such as caput set_vert_scale CHAN1,5 so that the string can be split in a manner such that CHAN1 and 5 can be concatenated to the beginning and end of :SCALe.

 

Any thoughts on how to do so?

 

Thanks,

Andy

 


Replies:
Re: Splitting a string in a protocol file Johnson, Andrew N. via Tech-talk
Re: Splitting a string in a protocol file Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: FW: synApps_6_1 build error on windows-x64 with EPICS 7 Mark Rivers via Tech-talk
Next: Re: Splitting a string in a protocol file Johnson, Andrew N. 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: FW: synApps_6_1 build error on windows-x64 with EPICS 7 Mark Rivers via Tech-talk
Next: Re: Splitting a string in a protocol file Johnson, Andrew N. 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  <20202021  2022  2023  2024 
ANJ, 17 Dec 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·