12-08-2015 01:27 PM
Hi,
I have a VeriStand project that has two tabs on the Workspace screen (the tabs are called Test Screen and Startup Screen). Test Screen is first tab and Startup Screen is second tab. I have some custom workspace objects on both tabs of the Workspace.
When I depoy the project, VeriStand shows the Test Screen tab by default as this is the first tab. This is fine as this is where the user will spend most of his time, but I want the Startup Screen to also start working even though it is not in view. The Startup Screen has a few startup related workspace objects that need to run immediately after the Project is deployed. But it appears that VeriStand does not start anything on the Startup Screen until I manually tab over to the Startup Screen atlease once. Then the Startup Screen objects get loaded and start running and continue to run if I switch back to the Test Screen.
Ideally I would like VeriStand to start running Workspace objects on both tabs when project is deployed. If that is not possible, is there a way to use the LabVIEW API to programmatically open the Startup Screen tab first so that it gets running, then tab over to the Test Screen tab?
Thanks!
Sundaram Raghuraman
12-09-2015 01:47 PM
Hi Sundaram,
Unfortunately the VeriStand API does not have a way to control the workspace screen that is currently visible. There is another forum post where people had previously discussed this here: http://forums.ni.com/t5/NI-VeriStand/Open-different-Workspace-files-with-VeriStand-API/td-p/1875539. The best solution would probably be to put those controls that need to be initialized at startup onto the first page of the workspace, or to follow Jarrod's suggestion about multiple workspaces.
Kevin
12-10-2015 12:44 AM
12-21-2015 10:53 AM
Thank you Kevin and StephenB for your replies.
The objects I have on the Startup screen should only run when the VeriStand Workspace is visible, so I cannot make them services that are running all the time. These are objects like Timers, Heartbeat signal, Data Logger etc. I want these to run only when the WS is running, but not necessarily put them on the main Tab of the WS as they take too much screen space. Anyway this seems like a VeriStand arhcitecture issue which I hope will be addressed in future versions.
Thanks
Sundaram Raghuraman
12-31-2015 03:29 PM
A couple notes that might help:
The example is source code for a service that accepts commands via the Project API and gets or sets the active workspace screen. It can also return the list of all screens available. It also shows the events you can listen for from the service to know if the workspace opens or closes. This example is programmed against VeriStand 2014 and LabVIEW 2014. It can easily be upgraded to VerIStand 2015.
Hope this helps!
12-31-2015 03:31 PM
Note that opening a reference to the Workspace VI and manually changing control values is not supported. Name changes or code changes could make this not work in a future version of VeriStand. However, at this point I find it unlikely to change. (This has worked for many years now.)