VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Device Error System Shutdown

Hello!

 

Is it possible to shutdown (undeploy) a running VeriStand projekt when a custom device drops an error? I my case I handle a NI digital Output Card with a custom device. I created the custom device with the Custom Device Template Tool.  Everything works fine but i want to handle a possible error case with this custom device. If this DO card isn't plugged into the PXI chassis i create an error inside the custom device that will end the Data Loop. But this doesn't matter to the running projekt. When I undeploy the projekt manually the error is shown on the console, that's the expected behavior of the "Report Final Error VI". But I want to shut down (undeploy) the running projekt. I didn't find such a function in the VeriStand Custom Device API in LabVIEW.

Does anybody have an idea how to realize this?

0 Kudos
Message 1 of 3
(2,262 Views)

I believe the Initialization Status Notifier is what you're looking for. If you send an error to that VI, it stops the currently deployed definition file. This is the only way an asynchronous custom device can stop the definition file. While running, an async custom device should not preempt the global execution as its priority should be lower than the primary control loop.

 

If you're looking for a way to stop the whole engine from a custom device during "normal" execution, you should use an inline custom device. Its paradigm is different (it basically executes inside the primary control loop instead of in parallel), so make sure to read the documentation to check if this mode applies to your use case.

 

--Eric

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

0 Kudos
Message 2 of 3
(2,230 Views)

Side note:

 

Use this to create your custom devices 🙂

https://forums.ni.com/t5/NI-Labs-Toolkits/NI-VeriStand-Custom-Device-Project-Wizard/ta-p/3538685

 

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

0 Kudos
Message 3 of 3
(2,229 Views)