Experimental Physics and
| |||||||||||||||||
|
Hi Gorka, I probably did not understand completely what you wanted. You want to be able to use *different* lo and hi values each time the record processed? If that is the case you have to store the values in some record. For example in an "ao" record. (There you can even scale it from "user units" in VAL to integers in RVAL. See "ao" documentation.) So let's now assume the two values are in stored in $(P):$(R):C4:LO.RVAL and $(P):$(R):C4:HI.RVAL. Then you can use redirection to access these values. You have to give the record names (or the common prefix) to the protocol as a parameter like this: field(INP, "@devwbc6600.proto c4($(P):$(R):C4) $(PORT) $(A)") and use the name in $1 for two redirections to fetch LO and HI: out 0xc0 0x04 0xfb "%(\$1:LO.RVAL)r%(\$1:HI.RVAL)r" 0x00 0x00 0x00 0x00 "%<xor>"; The %r converter just outputs the least significant byte of the mentioned record field. It would really help to know what the "C4" command actually does. Can you give me a link to the device documentation? Dirk
| ||||||||||||||||
ANJ, 16 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |