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
- A LabVIEW™ display element of the correct type is created and initialized
- Creating the reference to the element
- Passing the reference to the callback VI
- 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.