From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

When is project deployment really finished?

Hi all! In my quest for programmatic control of all things Veristand using LabVIEW, I've run across a rather annoying problem: The Deploy Project VI is apparently more than a bit ignorant of when my project has actually finished deploying and starting up. I say this because the VI will complete and allow my code to move on, but my downstream code won't actually take effect for some amount of time afterwards. I deploy the project, then move on to set a couple of VS channels and move into a simulate engine start function. This will fail and exit because even though the new VS channel values appear to have been applied correctly (no errors generated), they still haven't actually done so.

 

I watched the RT console and timed from the start of deployment to when the CPU utilization dropped to normal operating levels. It's about 30 seconds in total (I'm sure this will very from project to project), and by this time my LV code has already failed because it's not seeing the conditions that indicate a successful engine start, obviously, because nothing's actually happened yet.

 

I either need to find a different VI that has a Boolean output indicating REAL completion of project deployment/startup, or go through the hassle of monitoring the CPU utilization levels, which I don't feel like doing from the Windows level, because reasons. Note that I'm always assuming that I have to deploy the SDF, given that I'm using a bunch of different ones at the moment. Not, mind you, that the Run Project VI has the output I seek.

 

Any help will be appreciated!

 

Wraith

0 Kudos
Message 1 of 10
(4,893 Views)

Hello,

 

I know there are some events that can be got from the API (in .NET) but I'm not sure if they reflects the real state of the end of deployement. Perhaps you could try to watch (connectivity and value) of some channel to detect this condition.

 

Best regards

0 Kudos
Message 2 of 10
(4,886 Views)

Do you have an idea of what .NET class I could start testing? There are SO many of them and I find it very frustrating to just use trial and error to accomplish what I want to do, but your suggestion intrigues me.

0 Kudos
Message 3 of 10
(4,878 Views)

Using the NationalInstruments.VeriStand.ClientAPI, using the static "GetIWorkspace2" method to obtain an IWorkspace2 proxy. At this point you have access to the state and event notifications, but I think this is also available in the LabVIEW "Veristand/Workspace" tool palete, aswell as the "readChannel".

0 Kudos
Message 4 of 10
(4,875 Views)

OK, I'll dig in to that and see what I can find out. Thanks!

0 Kudos
Message 5 of 10
(4,814 Views)

Well, I don't seem to be having much luck with this approach. I found it easier to just use the NI Veristand - Open Workspace Manager Reference VI instead of a .NET constructor, but unfortunately the availble methods aren't what I need. I've tried watching the values of the System State, Engine State, and Target State, and the first two show "Active" before the VS Workspace even opens, and the last isn't of any use at all.

 

I'll keep looking, but if you've got any other suggestions, I'm all ears.

0 Kudos
Message 6 of 10
(4,805 Views)

Regarding your tries, I fear there are finally no simple way to do that. I rmember we had a similar problem with a custom device that took a few minutes to get initialized. The only way we've found to be sure that the system was ready, was to scrutinize one watchdog output channel of that custom device.

0 Kudos
Message 7 of 10
(4,794 Views)

I was afraid of that. It looks like it's watching CPU utilization or nothing, not that that's going to be a reliable method. Oh well.

 

Thanks!

 

Wraith

0 Kudos
Message 8 of 10
(4,769 Views)

you can also use the system time channel and pick some threshold. like after 10 seconds of run you're happy to call it finished

Stephen B
0 Kudos
Message 9 of 10
(4,756 Views)

That actually sounds like a far simpler method than trying to implement host-layer monitoring of CPU utilization, even though the time will still vary from deployment to deployment. I'd love the luxury of being able to leave an SDF deployed and just connect to it, but given what I've got to do at the moment it doesn't look to be happening any time soon. I have to make too many changes too often to the SDF that can only be done prior to deployment. 

 

I'll see if I can work up a reasonable system time threshold.

 

Thanks!

 

Wraith

0 Kudos
Message 10 of 10
(4,754 Views)