Hi Dirk,
Thank you for replying.
First, a little explanation.
The instrument only sends the waveform data as ASCII coded string,
no raw data option is available.
I chose to use genSub to reformat the data only because I needed to
rescale it by adding offset and multiplying the result by a scale
factor. These come from longin epics records.
I implemented your suggestion for the protocol and also added
ReadTimeout=2000 to the protocol. This unfortunately did not cure
the interference I see between the two GPIB instruments as described
in my original note. So, now I have:
--------------------------------------------
record( waveform, "$(P)wfTrCh$(N)Data"){
field( DESC, "hist$(N) data")
field( DTYP, "stream")
# field( DISV, "0")
# field( SDIS, "$(P)wCh$(N)Enable.VAL NPP NMS")
field( INP, "@rfpmChan.proto rTDCh12($(N)) L$(L) $(A)")
field( EGU, "points")
field( NELM, "1000")
field( FTVL, "FLOAT")
field( FLNK, "$(P)gsCh$(N)WForm PP")
}
rTDCh12{ ReadTimeout=2000; Separator=",";
out "TRAC:SOUR CH\$1;:TRAC\$1:INDEX 1;:TRAC\$1:AVER:DATA?";
in "%f";}
--------------------------------------------
I suppose it is possible that I do not really know how to use the
ICS 8065 controller, or that this device has some implementation flaw.
Eric Norum suggested that perhaps merging these two IOC's into one
could lead to a working solution. What do you think? I have used
epicsMutex in a device driver I wrote, but I do not see how to use
something like a Mutex on the epics record level. Of course, a very
simple solution would be to use one ICS 8065 Ethernet - GPIB
controller for each IOC.
In the one IOC solution it might be possible to carefully arrange
record scanning such that no two data reading records can scan
simultaneously. It seems tricky.