01-26-2011 03:32 PM
Hi, I am using TS 4.1.1 and LV 8.6.1 - I would like to be able to use PostUIMessageEx to initiate my LV OI to get operator input and put into a TS variable, after one of several (standard LabView) buttons is pressed on the OI main panel.
My problem is that the OI Event Callback architecture (based on existing OI examples) does not appear to support polling of the OI control values via the control references passed to the callback - polling seems to lock up the OI until the Callback completes so the button state change can't be detected.
However upon receipt of a PostUImessageEx event I am able to pass button references into the callback event case, read the state of the buttons and poke the data into a TestStand variable - the piece that is missing is being able to poll for a button changing state.
Any ideas how to implement this kind of functionality? The only approaches I have thought of is a bit of a kludge - e.g. setting a TestStand variable in my main OI event handler when a button is clicked (ie not via a PostUImessageEx callback) and use some kind of synchronisation trick in the sequence to wait for the TS variable to update.
I need to use PostUImessageEx to set the button labels etc prior to the operator generating a click event anyway, so it would be preferable to set the buttons up, poll for a subsequent click event and then send click data back to a TS variable - all in one callback event. Not possible?
01-27-2011 03:18 PM
CIM1 -
I believe this might be an issue that was fixed in LabVIEW 2009. Would it be possible for you to test your User Interface with LabVIEW 2009? If the issue still persists in LabVIEW 2009, could you please post an example UI and sequence that reproduce this behavior so that we can investigate it?
01-28-2011 03:54 AM
In which case as we are planning to migrate directly to LV 2010 I will have to try in that version.
It may be a while before I am in a position to do so but if it does not work in 2010 I will report back.
Many thanks for the info.
01-28-2011 12:01 PM
CIM1 -
Sounds good. Please post back with the results of the upgrade (I would like to know that the upgrade did in fact fix the issue and it would be nice for other users to see that too).
Thank you!