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