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

Shared Variable Data Types (DSC Module)

The ways in which you can configure shared variables varies depend on the data type. Specify the data type of a shared variable on the Variable page of the Shared Variable Properties dialog box. You can use features the LabVIEW DSC Module adds with shared variables of the following data types:

  • Double—A continuous value representation of a connection to a real-world input/output point. This type of shared variable can vary continuously over a range of values within a signal range. Use a double shared variable when you want to express a continuous value, such as 0 to 100.
  • Boolean—A two-state (ON/OFF) value representation of a connection to a real-world input/output point. This type of shared variable can have a value of either 1 (TRUE) or 0 (FALSE). Use a Boolean shared variable when you want to express a two-state (ON/OFF) value.
  • U32 Bit Field—A multiple-bit value representation of a connection to a real-world input/output point. This type of shared variable can consist of up to 32 discrete values. Use a U32 bit field shared variable when you have a multiple-bit value in which each of the bits represents a flag or single value that is turned on or off. The maximum length of a U32 bit field shared variable is 32. LabVIEW stores a bit field as a number that you can see in the National Instruments Shared Variable Monitor, but the bit field is an array of bit values.
  • String—A string shared variable is an ASCII or binary character representation of a connection to a real-world input/output point. Use a string shared variable when you have binary information or an ASCII value. When you configure a string shared variable, you must select whether to treat the data in the shared variable as text or binary information. For example, you can use a string shared variable to obtain values from a bar code reader or if you have data that does not fit into any other data type. You also can use a string shared variable for PLC control strings and PLC reporting strings. You cannot use scaling or add alarming other than bad status alarms with string shared variables.

LabVIEW also includes many additional data types for shared variables. Support of DSC Module features, such as scaling and alarming, for the additional shared variable data types is limited. National Instruments recommends that you use one of the above shared variable data types if you want to use the data logging features included with the DSC Module.


Resources


 

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