Dear Mark,
Thanks for your reply and info.
I am also using PINI filed for output records only. By keeping the drvInfo field different for same type of input and output records i.e. IN_INT8 and OUT_INT8 for INT8 I can distinguish the record types.
I have tried other thing, as you have mentioned “bumpless reboot process”, I have checked interruptAccept flag in read function during its value “0” (before iocInit complete), I assume that whatever records are
processed during this time mush have PINI=YES. And if only output records have PINI=YES, than I can identify them now.
So please give your comments for this method.
Thanks and best regards,
Jignesh
Jignesh PATEL
Control Systems Integration Technician
CODAC Section
ITER Organization, Building 72/4115, CHD, Control System Division
Route de Vinon-sur-Verdon - CS 90 046 - 13067 St Paul Lez Durance Cedex – France
Phone: +33 4 42 17 84 72
Get the latest ITER news on
http://www.iter.org/whatsnew
Hi Jignesh,
Generally I don’t use PINI=YES on input records, I set them to SCAN=I/O Intr and then as long as your driver does callbacks on them in the constructor they will process
at least once when the IOC boots.
If an output record is processing because of PINI=YES then it will NOT call the read function in your driver, it will call the write function. However, it will call
the read function in your driver prior to the PINI=YES phase of iocInit when it attempts to read back the value from the driver to support “bumpless reboots”. I think you can probably distinguish whether the read is being called for an input record or an
output record by querying EPICS base to find out what phase of iocInit is being executed.
However, I think that is more complex than necessary, and I suggest that if you need to distinguish between output and input records then the simplest way is to use a
different drvInfo field in the record and a different parameter for input and output. Like the following:
record(bo, "$(P)$(R)SetGate")
{
field(PINI, "YES")
field(DTYP, "asynInt32")
field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))GATE_OUT")
}
record(bi, "$(P)$(R)GetGate")
{
field(PINI, "YES")
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))GATE_IN")
}
Mark
Hi,
In Asyn driver, for any record processing read function, during PINI=YES processing, can we distinguish between input and output records ?
I want to put some checks for address limits (i.e. typical db offset for PLC communication) which may be different for input and output records.
So during PINI processing, I want to check these limits for output records.
Can we use asynUser details, which may be different but not sure ? as its void pointer so difficult to use.
Thanks and best regards,
Jignesh
Jignesh PATEL
Control Systems Integration Technician
CODAC Section
ITER Organization, Building 72/4115, CHD, Control System Division
Route de Vinon-sur-Verdon - CS 90 046 - 13067 St Paul Lez Durance Cedex – France
Phone: +33 4 42 17 84 72
Get the latest ITER news on
http://www.iter.org/whatsnew