Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Why Do Shared Variables Placed On The Front Panel of My Real-Time VI Not Work?

Primary Software: LabVIEW Modules>>Real-Time Module
Primary Software Version: 8.5.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
If I create a new shared variable and then drag it onto my real-time VI or create a new front panel control or indicator and bind it to a shared variable, it doesn’t work when I run the VI. Why?

Solution:
When you create a bound front panel control or indicator, either by dragging a shared variable onto the front panel or by using the “Data Binding” property tab, you are linking a front panel control directly to a variable. Because real-time VIs are intended to be run headlessly, without an active front panel, the bound front panel object is not created correctly and does not connect to the shared variable at runtime.

If you do wish to view shared variables in the real-time VI during development, you can employ a shared variable on the block diagram and create an indicator for its value on the front panel. This correctly creates the variable in the real-time VI, but allows you to view it in the hosted front panel for development purposes.

Related Links:
KnowledgeBase 454FH4NF: Shared Variable Error Explanations
Developer Zone Tutorial: Using the LabVIEW Shared Variable

Attachments:





Report Date: 09/12/2008
Last Updated: 09/12/2008
Document ID: 4PBB9TMO

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit