|1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020||Index||1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020|
|<== Date ==>||<== Thread ==>|
|Subject:||RE: Force AsynPortDriver to write an output record's value to the device instead of fetching it|
|From:||Abdalla Ahmad via Tech-talk <email@example.com>|
|To:||"firstname.lastname@example.org" <email@example.com>, Mark Rivers <firstname.lastname@example.org>|
|Date:||Thu, 29 Aug 2019 11:24:29 +0000|
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.
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?