Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to reset the RT Shared Variable Engine (LV2010)

I would like to be able to reset the SVE in a manner that is equivalent to what occurs during a hardware reset.

You might ask why I would  want to do such a thing? 

I have an cRIO app with lots of IOV's and NSV's that operate via the SV API and also with plenty of static nodes.  I am finding

that on first run, from the DE, my CPU%=~55%.  On all subsequent runs my CPU%=~65%.  If I do a hardware reset or redeploy one particular NSV library then

my cpu usage will return to ~ 55%.  I have tried isolating the area of code that accounts for this and have found that

the problem centers around my initialization of one library of NSV's where I set its init value via the SV API.  The NSV references

are all closed after writing without error.  So I am wondering if it is possible that the NSV ref's are not actually closing or possibly

the setting of the inital value has some effect on the SVE so that subsequent runs get bogged down.

 

Anybody have any ideas?

0 Kudos
Message 1 of 4
(3,565 Views)

sachsm,

 

It is possible to reset the SVE manually. If you look at the Stopping and Starting the Shared Variable Engine help there are two options for resetting the SVE.

 

I do believe we were working on an issue similar to this and when I attempted to run your code snippet I saw no increase in my CPU usage. Were you ever able to take a look at what I did? I also notice that from the time when we last spoke, the CPU usage increased to 65% and when we spoke it was increasing to 61%. Did your SV library become larger or is there a reason you can think of for the additional increase?

Stephanie A.
Americas Marketing Manager
National Instruments
0 Kudos
Message 2 of 4
(3,552 Views)

Hi Stephanie,

 

Actually, the cpu% increase varies slightly,  I would say it averages around 7-8%.  I also have tried to construct a simplified example that reproduces the problem but have not been successful yet.  Unfortunately the problem is very reproducible in my cRIO app.  It appears to have to do with my use of the SV API, perhaps references are not closing properly in the SVE?  What I do know is that after a hardware reset my cpu% is always around 55% and often after a soft restart of my rt app, my cpu usage will increase noticably.  This cpu increase will generally persist over multiple soft restarts until I do another hardware reset.  I attempt to always close any references that I open, but perhaps sometimes this does not happen.  My interest was to see if I could programmatically, upon startup of my rt app, to force the SVE to reset in a way that is the same as what happens during a HW reset.  I presume a HW reset forces the SVE to close all registrations and re-init from the deployed XML files that are persistant on the cRIO flash memory.

0 Kudos
Message 3 of 4
(3,550 Views)

There is a way to programatically stop and start the shared variable engine. Check out this KnowledgeBase for more information.

Stephanie A.
Americas Marketing Manager
National Instruments
0 Kudos
Message 4 of 4
(3,522 Views)