LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

NSV Async Read Callbacks

For some reason this mechanism is forbidden in LV but seems to be supported in CVI. It appears that
you can do an async read on a NSV and specify a callback function which gets invoked when the NSV value changes.
Does anyone know if it is possible to wrap this functionality up in a dll that would allow me to specify a NSV by URL
and a callback vi to execute.

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

Hi Sachsm,

 

Firstly, there is a way to do this in LabVIEW, but it requires the DSC module: http://decibel.ni.com/content/docs/DOC-4375

 

If you don't have the DSC module then this probably can be done with CVI although it would be complicated.  What you would have to do is make a dll in CVI with the function to be called in LabVIEW.  This function will register the NSV callback and will poll for a value change variable which gets set by the NSV callback.  LabVIEW will then call the function and trigger a user event when the function returns.  However, it should be noted that at this point you are polling in CVI, and you might as well just create a loop in LabVIEW that is continually polling for the value change.  

Regards,

Hassan Atassi
Senior Group Manager, Digital Support
0 Kudos
Message 2 of 4
(3,544 Views)

How does CVI create a NSV callback?  Is this an SVE API call?  Can it be done in LV without the DSC?  Don't get me wrong, I like and own the DSC toolkit, but I would like to better understand what is really going on under the hood in the SVE.  Somehow the DSC can register with the SVE for NSV events and then, I presume via a callback, generate a NSV type user event.  I currently use the DSC for doing this.  I then grab the generated User Event Refnum and register that with the Register Callback node for the purposes of having it call a LV vi that will send a notification.

 

 

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

Hi sachsm,

 

You can check out the following example to see how you can potentially program NSV in CVI: http://decibel.ni.com/content/docs/DOC-3806

Regards,

Hassan Atassi
Senior Group Manager, Digital Support
0 Kudos
Message 4 of 4
(3,516 Views)