Event driven reading with data reference passing to Callback-vi

If only one variable is read via connect, the reference to the variable can be passed to the callback VI. This eliminates the need to use global variables. The callback VI writes directly to the variable of the calling VI by reference.

Sample files: Sample 009.zip

  1. A LabVIEW™ display element of the correct type is created and initialized
     
  2. Event driven reading with data reference passing to Callback-vi 1:
  3. Creating the reference to the element
     
  4. Event driven reading with data reference passing to Callback-vi 2:
  5. Passing the reference to the callback VI
     
  6. Event driven reading with data reference passing to Callback-vi 3:
  7. Accessing the reference variable in the callback VI
    The typeless variant variable must be converted to the correct data type, and then passed to the reference variable.
     
  8. Event driven reading with data reference passing to Callback-vi 4: