On 25.05.2013 14:24, Sebastian Matkovich wrote:
rod gave me the right solution, in the first string i send i tell the
device which channel i want to speak to and in the next string i send my
command :)
Just make sure that the channel selection and the command happen in the
same record processing. Using 2 protocols in two records, one for
selecting the channel and one for the command is not reliable because
someone may change the channel before you can send the command.
If you have many protocols that need to select the channel you may
define your own string like this:
ch = "CHANNEL %(\1:CH)%d:";
commandA { out $ch "commandA %f"; }
commandB { out $ch "commandB %s"; }
commandC { out $ch "commandC %d"; }
or you can define a sub-protocol and call it like this:
setch { out CHANNEL %(\1:CH)%d"; }
commandA { setch; out "commandA %f"; }
commandB { setch; out "commandB %s"; }
commandC { setch; out "commandC %d"; }
Dirk
2013/5/22 Rod Nussbaumer <[email protected] <mailto:[email protected]>>
Or he may mean channels within a device or module, such as channels
within an oscilloscope or multichannel digitizer. In such cases, the
method should be documented by the vendor of the device. There is no
generic method or streamDevice-specific method for performing such
selections.
A couple of things may be worth noting. In some cases, there is a
specific SCPI command that effectively says 'for all subsequent
commands, use channel n'. Where you are monitoring more than one
channel on a periodic schedule, you can put that command into a
single streamDevice protocol that may contain other commands that
relate to that specific channel. You would probably do so for a
number of protocols where you want to address specific channels.
Moreover, a single protocol may be contrived that will work for all
channels, where the channel number (or other identifier) is a macro
variable (like \$1) that is passed to the protocol. The channel
identifier might also be a PV such as an analog record or a multibit
binary record, and this can be referenced an decoded in the protocol.
If Sebastian has a different meaning for the question, he should
rephrase and expand on his intention.
--- rod.
On 05/22/2013 07:18 AM, Mark Rivers wrote:
I think he probably means the asyn "addr" field, used to select
a specific address or channel of a device.
Mark
__________________________________________
From: [email protected]
<mailto:[email protected]>
[[email protected]
<mailto:[email protected]>__] on behalf of Dirk
Zimoch [[email protected] <mailto:[email protected]>]
Sent: Wednesday, May 22, 2013 4:24 AM
To: [email protected] <mailto:[email protected]>
Subject: Re: streamdevice
On 21.05.2013 18 <tel:21.05.2013%2018>:45, Sebastian Matkovich
wrote:
is it possible that you cannot access specific channels of a
device
through streamdevice? or does somebody know how to do that?
What do you mean with "specific channels of a device"?
Dirk
- References:
- streamdevice Sebastian Matkovich
- Re: streamdevice Dirk Zimoch
- RE: streamdevice Mark Rivers
- Re: streamdevice Rod Nussbaumer
- Re: streamdevice Sebastian Matkovich
- Navigate by Date:
- Prev:
Re: Motor record .RDBD field Tim Mooney
- Next:
Re: Motor record .RDBD field Pearson, Matthew R.
- 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
- Navigate by Thread:
- Prev:
Re: streamdevice Sebastian Matkovich
- Next:
Gauge controller with R232 serial port Vahe Sahakyan
- 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
|