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

Initializing Shared Variable Values (DSC Module)

You can set the initial value for network-published shared variables only. Enable network publishing for a shared variable by selecting Network-Published from the Variable Type pull-down menu on the Variable page of the Shared Variable Properties dialog box.

Complete the following steps to initialize a shared variable to a known value when the Shared Variable Engine starts.

  1. Right-click a target or a LabVIEW project library in the Project Explorer window and select New»Variable from the shortcut menu to display the Shared Variable Properties dialog box. You also can right-click an existing shared variable in the Project Explorer window and select Properties from the shortcut menu to display this dialog box.
  2. Select the Initial Value from the list of this dialog box to display the Initial Value page of this dialog box.
  3. Place a checkmark in the Enable Initial Value checkbox.
  4. Enter the initial value you want the shared variable to have in the Initial Value control. The information you enter in this control depends on the data type of the shared variable.
    • Double—Enter a numeric value in the Initial Value text box.
    • String—Enter a text value in the Initial Value text box.
    • Boolean—Set the initial value by placing or removing a checkmark in the Initial Value checkbox. If the checkbox contains a checkmark, the initial value is TRUE. If the checkbox does not contain a checkmark, the initial value is False.
    • U32 Bit Field—Enter a numeric value in the Initial Value text box.
  5. Click the OK button.

Resources


 

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