Hi everyone,
I have some problems when listening to two EVR in one VME. I want
to read EVR event respectively and storage them in two waveform
record. So I used the method which described in this link
https://epics.anl.gov/tech-talk/2008/msg00241.php
Basically, my records is like this:
record(longout,
"$(P):event$(EvtNum)"){
field(DESC, "Event $(EvtNum)")
field(SCAN, "I/O Intr")
field(TSE, "-2")
field(DTYP, "EVR Event")
field(VAL, "$(EvtNum)")
field(OUT, "@OBJ=$(OBJ),Code=$(EvtNum)")
field(FLNK, "$(P):SvEvt$(EvtNum)")
}
record(longout, "$(P):SvEvt$(EvtNum)") {
field(SCAN, "Passive")
field(VAL, "$(EvtNum)")
field(OMSL, "closed_loop")
field(DOL, "$(P):event$(EvtNum)")
field(OUT, "$(P):EventCode PP")
}
record(longin, "$(P):EventCode"){
field(DESC, "EPICS Event Code Received")
field(SCAN, "Passive")
field(VAL, "0")
field(FLNK, "$(P):Event-Wf")
}
"$(P):Event-Wf" is the target waveform record which I rewrite the
device support to storage numbers of event and its INP field points
to "$(P):EventCode". When I only use one EVR, the program goes good,
the records in IOC is kind of like this:
test:evr1:event1
test:evr1:SvEvt1
test:evr1:event2
test:evr1:SvEvt2
......(many other event numbers)
test:evr1:EventCode
test:evr1:Event-Wf
But when I test two EVR, both test:evr1:Event-Wf and
test:evr2:Event-Wf will receive the same event twice. For example,
in test:evr1:Event-Wf, the event number is like this: event "38" is
received twice and event "19" is not supposed to received by evr1.
But when I monitored the value of test:evr1:EventCode and
test:evr2:EventCode, their value is correct and received the event
sequence which they should received. It is very weird.
I do not know if there is some wrong with my waveform device
support but since EventCode record can separate different EVR why
Event-Wf record receives two EVR's event?
...38 36 37 2 1 35 32 33 184 181 180 19 15 38 36 37 2 1 35 32
33 184 181 180...
EPICS base version is 3.15.5, IOC is compiled in Linux and run on
VxWorks, mrfioc2-2.2.0, EVRs are EVR-230-RF
mrmEvrSetupVME("tstevr1", 3, 0x08000000, 5, 0xc0)
mrmEvrSetupVME("tstevr2", 5, 0x08040000, 7, 0xc1)
Sorry for my terrible typesetting.
-----
Di Wang <[email protected]>
High Energy Accelerator Research Organization (KEK), Japan
|