02-04-2010 03:19 AM
Hi Manooch H.
I've tried this 3.1 sequence but unfortunately I get another runtime error:
An error occurred calling 'GetInternalOption' in 'IEngine' of 'NI TestStand API 3.1'
Invalid internal options constant: '5'
Source: TSAPI
It's occurring on the Active X step just before the GUI is called. Do I need to change this parameter?
Thanks
Bruce
02-04-2010 09:42 AM
Bruce -
Unfortunately, after taking a look in 3.1, it looks like the API used in this example was not yet available in TestStand 3.1. What you could do is pass the Engine to the code module instead (RunState.Engine). This would involve then changing the input reference to the VI from an ApplicationMgr reference to an Engine reference. Then you would need to change the ActiveX Event Handler to handle the UIMessageEvent instead of UserMessage. This will then break the wire between the callback VI and the event handler. You will need to re-create the callback VI such that the inputs/outputs match the event arguments. Then you will have to copy the code from the original callback VI into the new callback VI.
On a side note, TestStand 3.1 is no longer supported, which means that most of our current examples and all new examples placed on the web will not be compatible with TestStand 3.1. I strongly suggest upgrading as it will surely save you time through the availability of many examples on the web, along with the improved features and functionality of the newer versions of TestStand.
07-12-2010 10:37 AM
Hi Manooch H
I’ve finally managed to get back to trying the changes you suggested (having finished another project), but I'm still struggling to get this to work. Attached is the modified code (TS 3.1 sequence & 3 LV 7.1 VIs). When I run this, the front panel comes up, but the progress bar doesn't update and the sequence doesn’t exit until I hit the ‘End of Sequence Reached?’ button. It seems as though the UI message events are being lost, but I can’t see why. Very much appreciate your thoughts.
Thanks
Bruce
07-12-2010 02:56 PM
Bruce -
I think you might be encountering this issue because you are attempting to call the sequence from the sequence editor as opposed to a UI that is built with the Engine. I have completely modified the GUI vi and made some modifications to the sequence such that it now uses the TestStand Notification synchronization object to notify the VI of the sequence progress and tells the GUI vi when to close.
Hope this helps.
07-16-2010 11:58 AM
Thanks Manooch H., that's been a great help.
Bruce