Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Using the Device Open VIs (Blackfin, Embedded Module)

Each different device driver has its own open VI. You call the open VI before any other device VI and pass the output reference to the other Device VIs. If you supply the callback VI reference input, the callback VI you reference executes when the device buffer is full. Use a Static VI Reference to obtain a callback VI static reference. Right-click the Static VI Reference and select Browse for path from the shortcut menu to assign a callback VI to the Static VI Reference. You must specify callback VIs as interrupt VIs in the Build Specification Properties dialog box, and you must configure the callback VI as an Interrupt Service Routine (ISR).

The functionality of callback VIs is limited because callback VIs run at the system interrupt level, which does not allow for memory allocations. You cannot use subVIs in callbacks because subVIs usually allocate memory. Analog Devices recommends setting a global flag in the callback if you use that callback elsewhere in the project. The global flag indicates that the device buffer is full and ready to be processed. You can test for the flag in the main application loop and process the buffer if the buffer is full. Alternatively, the callback VI can trigger a Timed Loop, which contains the code you want to execute.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit