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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to know if a library on a FieldPoint is still deployed?

Hello,

I have code running embedded on a CFP-2100 using shared variable. When I reboot the cFP (via MAX), I belive that the library that my shared variables belongs to becomes undeployed (invalid) but that my code is still running for a little amount of time. At that moment, when I read the shared variables, I get some "0" (double) witch are wrong results...

Is that possible and correct?

Is there anyway to look programaticaly if the library is deployed? I'm able to deplou or undeploy programaticaly but not to check the state of it.

Thanks!

Vincent
0 Kudos
Message 1 of 8
(5,543 Views)
Hi,


There is a way for you to check the status of the shared variables, if you have the DSC module; however, the DSC module does not currently work with LVRT, so you are out of luck there.   You are reading "0" values since this is the default on the shared variable.  Do you have a vi or an executable that is running  programmatically on startup?  Are you residing your SVs on your cFP controller or on your host?


Regards,

Nadim
Applications Engineering
National Instruments
0 Kudos
Message 2 of 8
(5,507 Views)
Hello Nadim,

The shared variables are parts of an executable starting at cFP's startup.

What I did to solve my problem is simply check for errors when I read the shared variables (a thing that I should have done since the beginning) and ignore the value if I get an error.

If there is a better way, let me know...

Thanks for the help!

Vincent
Message 3 of 8
(5,499 Views)
Hi Vincent,

I think that is a valid way to do your application.  Make sure to ignore the error that you receive from the FP read and not the default value.  You can then use the clear error to flush the error out.

Let me know if you have any problems.


Regards,

Nadim
Applications Engineering
National Instruments
0 Kudos
Message 4 of 8
(5,282 Views)

Hi,

There are several ways to tell if a library is (still) deployed on an RT system. The easiest is probably to use Variable Manager. On the host computer go to tools->Shared variable->Variable Manager. You should be able to add your remote system by ip address.  This will allow you to see what libs / variables / IO Servers are currently down on the target (you can also create some test ones or delete them from here). You can then drag the variables to the top right pane and observe their current value and status.

If you reboot your target with max, then I would expect your variables to still be there on restart and if the Variables are not bound to a source then they should have the same value as when you shut down the target. Please let me know if this is not the behavior you are seeing.

Hope this helps
-Lorenz

0 Kudos
Message 5 of 8
(5,167 Views)
I have the same question as the OP but it never got answered here.  I would like to know if there is a way to check the status of a Library (Deployed/Undeployed).  I have the DSC Module.
0 Kudos
Message 6 of 8
(2,673 Views)

Hi,

 

Once the Library is deployed it becomes a running process and you can use the Get Process List.vi found in DSC Module >> Engine Control >> Libraries and Processes >> Get Process List.vi to see when your Library is deployed. It will show in the list when deployed and dissapear when not.

 

Regards,

 

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
Message 7 of 8
(2,645 Views)
Great suggestion, then you can do a comparison of the Processes array and check for your process there.  Fantastic!
0 Kudos
Message 8 of 8
(2,643 Views)