Configurator - Getting Started - 6. Develop DeviceNet Applications

DeviceNet Measurement & Automation Explorer

6. Develop DeviceNet Applications

NI-DNET Configurator can help you develop DeviceNet applications in LabVIEW, LabWindows™/CVI™, C, or Basic.

The two typical DeviceNet applications are accessing a device parameter and accessing device I/O data, described in the following tables.

Accessing a Device Parameter

Purpose Function(s) or VI(s) Comment
Configure and open an Explicit Messaging object to access parameters. ncOpenDnetExplMsg (Open DeviceNet Explicit Messaging) Needs the device MAC ID, which is in the DeviceNet Network window.
Read or write a parameter. ncGetDnetAttribute (Get DeviceNet Attribute) and ncSetDnetAttribute (Set DeviceNet Attribute) Needs the parameter class ID, instance ID, attribute ID, and size, which are in the Parameters tab of the Device Information window.
Decode or encode a parameter. ncConvertFromDnetRead (Convert From DeviceNet Read) and ncConvertForDnetWrite (Convert For DeviceNet Write) Needs the parameter data type, which is in the Parameters tab of the Device Information window.

Refer to the Get Identity Attributes example for more information.

Accessing Device I/O Data

Purpose Function(s) or VI(s) Comment
Configure and open an I/O object to access I/O data. ncOpenDnetIO (Open DeviceNet I/O) Needs the device MAC ID, I/O connection type, and input/output length. The MAC ID is in the DeviceNet Network window. The I/O connection type and input/output length are in the I/O Data tab of the Device Information window.
Read input data or write output data. ncReadDnetIO (Read DeviceNet I/O) and ncWriteDnetIO (Write DeviceNet I/O) Needs the input/output length, which is in the I/O Data tab of the Device Information window.
Decode the input data or encode the output data. ncConvertFromDnetRead (Convert From DeviceNet Read) and ncConvertForDnetWrite (Convert For DeviceNet Write). You can get the decode/encode hint in I/O Data»I/O Information in the Device Information window.

Refer to the Single Device example for more information.

Refer to Configurator Main Window, Device Information Window, NI-DNET User Manual, and NI-DNET Programmer Reference Manual for more information.