Experimental Physics and Industrial Control System
|
Hi Gorka,
Please use the subject line. Otherwise your request may be ignored.
You can use protocol(param1,param2...) with up to 9 parameters (which
must neither contain space nor comma at the moment, sorry). No space
allowed before ( or inside ( and ).
The parameters appear as $1 ... $9 in the protocol. (Within quotes the $
must be escaped: "\$1" ... "\$9".)
I would write your example as follows:
field(INP, "@devwbc6600.proto c4(0x04,0x57) $(PORT) $(A)")
c4 {
out 0xc0 0x04 0xfb $2 $1 0x00 0x00 0x00 0x00 "%<xor>";
...
}
You probably want to use macros for LO and HI:
field(INP, "@devwbc6600.proto c4($(LO),$(HI)) $(PORT) $(A)")
LO and HI may as well be specified in decimal here if you like.
By the way, instead of "c4" I would also give the protocol a name that
someone who is not an expert in the wbc6600 (?) can understand.
Gorka Ronda wrote:
Hello everyone,
Using streamDevice, How can I run the command dbtr like a function with
parameters? Something like:
Function (parameter 1, parameter 2)
How do I have to write the protocol and record? There are currently as
follows:
HI = \x04;
LO = \x57;
cmd4 = \xC0\x04\xFB${HI}${LO}\x00\x00\x00\x00%<xor>;
c4 {
out "\$cmd4";
in "%*4r";
}
record(bi, "$(P):$(R):C4")
{
field(DESC, "Command 4")
field(DTYP, "stream")
field(INP, "@devwbc6600.proto c4 $(PORT) $(A)")
}
What I want is not to specify the values of the variables HI and LO in
the archive .proto. I want to give them values when I call the command
dbtr (another command to process the records?), to give these variables
the hexadecimal value I want, each time I run the command.
Thanks in advance,
Gorka
- Replies:
- RE: Stream Device With Parameters Gorka Ronda
- References:
- [no subject] Gorka Ronda
- Navigate by Date:
- Prev:
[no subject] Gorka Ronda
- Next:
RE: Strange gateway error message Jeff Hill
- 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:
[no subject] Gorka Ronda
- Next:
RE: Stream Device With Parameters Gorka Ronda
- 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
|
ANJ, 15 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|