06-09-2006 10:05 AM
06-09-2006 11:04 AM
Although you have can have any number of independent execution threads, there is only one GUI thread in the application handling UI messages from these threads. It can only handle one message at a time. If takes a long time to handle a synchronous message, it is going to block all other execution threads that are sending synchronous messages (for example, trace messages).
Thus you should immediately acknowledge the message that triggers the lengthy operation and then use some other method to notify the requesting thread when the operation completes. The methods you can use for this are endless, but they include TestStand globals or synchronization objects and environment specific globals or synchronization objects.
06-09-2006 11:35 AM
06-09-2006 11:51 AM
Refer to the SyncManager topic in the API online help (this help topic is in 3.5, I'm not sure about earlier versions).
After you have your sequence create and wait on a notification, I'm guessing you would put something like the following pseudo code in your UI:
ISyncManager mgr = Engine.GetSyncManager("MyNotificationName")
mgr.GetNotification("MyNotificationName").Pulse(dataObject, byRef, applyToAllWaiters)
or
mgr.GetNotification("MyNotificationName").Set(dataObject, byRef, autoClear)
To call into the sync manager from CVI, you'll to use the functions in the <TestStand>\API\CVI\tssync.fp instrument driver. So it would be more like:
TSSyncLib_ISyncManagerGetNotification (syncManagerHandle, NULL, "MyNotificationName", ¬ification);
etc.
06-12-2006 02:02 PM - edited 06-12-2006 02:02 PM
Message Edited by jlgeek on 06-12-2006 02:04 PM
06-12-2006 05:28 PM
06-12-2006 08:28 PM
06-13-2006 11:15 AM
06-13-2006 11:24 AM - edited 06-13-2006 11:24 AM
Message Edited by dug9000 on 06-13-2006 11:34 AM
06-13-2006 01:07 PM