Using the I/O Variables
- Updated2025-10-10
- 2 minute(s) read
When you configure the DeviceNet network successfully, you can create I/O variables.
Note
National Instruments recommends you use DeviceNet VIs instead of the I/O variables.
- Right-click a slave item and select Configure I/O....
- Click Add to add I/O variables for this slave. Refer to Add/Edit/Remove a DeviceNet I/O Variable for more information.
- The newly added I/O variables is visible in the LabVIEW Project Explorer
- I/O Variable—The physical channels of the slave device mapped to the I/O variables. A slave device can have several I/O variables.
- Right-click My Computer or the controller item and select New»VI to create a VI. Save the VI.
- Add the Set Scan Engine Mode VI to the VI diagram. You can find it in the LabVIEW palette Measurement I/O»NI Scan Engine»Set Scan Engine Mode VI.
Note Ensure that you use the Set Scan Engine Mode VI to set the NI Scan Engine Mode to Active before using any DeviceNet I/O variables or function blocks.
- Drag the I/O variable under the slave items and drop it in the VI block diagram. Connect a control or indicator to the I/O variable.
- Add a Timed Loop. You can find it in the LabVIEW palette Programming»Structures»Timed Structures»Timed Loop. Right-click the input node of the timed loop, and select Configure Input Node to show the Configure Timed Loop dialog box. In the Loop Timing Source section, ensure the Synchronize to Scan Engine is selected.
- Click Run to run the VI. You now can use a VI to access the DeviceNet network.