Following on the issue below. I forgot to provide more information:
The device is communicating with UDP. The socket is being initialized and open in the constructor. What I noticed is that no matter what, the asyn driver instance does not take the output record’s VAL field on
IOC startup, it always take the last value written (which I don’t know where it is being fetched even if the input record) is not loaded.
I tried using setIntegerParam in the constructor but it did not work, I tried using callParamCallbacks the same way as a previous working asynPortDriver, I played with asyn flags (multi-device and can block),
still on IOC startup the VAL value is not loaded. Communication-wise everything is working, I can read/write with no problem.
A workaround to this is to have separate parameters for set and get records and skip each one in the opposite asyn read/write functions. I don’t think this is a good solution in case of large number of parameters.
But what I did notice is that each time the IOC starts, readInt32 gets called then writeInt32 then readInt32 again.
Best Regards,
Abdalla.
From: Abdalla Ahmad
Sent: Wednesday, August 28, 2019 3:55 PM
To: [email protected]
Subject: Force AsynPortDriver to write an output record's value to the device instead of fetching it
Hi
We have output records that uses asynPortDriver-based driver, they all have an initial value on IOC startup through the VAL field and PINI is set to YES. Instead of this value being set to the device on startup, they somehow contain the
last value being set. It seems that it is discarding the record’s VAL field, even if the input record is not loaded. Is there a way to make it write the record’s value at startup instead of the last set value? What am I missing here?
Best Regards,
Abdalla.