I haven't done this with the subarray record. With the acalcout record, I'd do it like this:
record(acalcout, "myacalc") {
field(NELM, "4")
field(NUSE, "4")
field(INAA, "optoRead")
field(CALC, "a:=aa[0,0];b:=aa[1,1];c:=aa[2,2];d:=aa[3,3];1")
field(FLNK, "opto1Binary")
}
record(bo, "opto1Binary")
field(DOL, "myacalc.A")
field(OMSL, "closed_loop")
field(FLNK, " opto2Binary")
}
record(bo, "opto2Binary")
field(DOL, "myacalc.B")
field(OMSL, "closed_loop")
field(FLNK, "opto3Binary")
}
...
Tim Mooney ( [email protected]) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab
Hello,
I have a waveform record with 4 elements with ftvl=USHORT. How to read a single element from waveform using subArray or acalcout record or any other record. I have tried using subarray as
record(waveform, optoRead) {
field(SCAN, "Passive")
field(NELM, "4")
field(FTVL, "USHORT")
field(DTYP, "wafoptosupport")
field(FLNK, "optolinks")
}
record(subArray, opto1) {
field(SCAN, "Passive")
field(DTYP, "Soft Channel")
field(FTVL, "USHORT")
field(INP, "optoRead")
field(INDX, "0")
field(FLNK, "opto1Binary")
field(MALM, "2")
field(NELM, "1")
}
record(subArray, opto2) {
field(SCAN, "Passive")
field(DTYP, "Soft Channel")
field(INP, "optoRead")
field(MALM, "4")
field(INDX, "1")
field(FLNK, "opto2Binary")
field(FTVL, "USHORT")
field(NELM, "1")
}
record(subArray, opto3) {
field(SCAN, "Passive")
field(DTYP, "Soft Channel")
field(INP, "optoRead")
field(MALM, "4")
field(INDX, "2")
field(FLNK, "opto2Binary")
field(FTVL, "USHORT")
field(NELM, "1")
}
record(subArray, opto4) {
field(SCAN, "Passive")
field(DTYP, "Soft Channel")
field(INP, "optoRead")
field(MALM, "4")
field(INDX, "3")
field(FLNK, "opto2Binary")
field(FTVL, "USHORT")
field(NELM, "1")
}
but it doesn't works. Everytime on doing caget it prints just the first element of waveform.
|