National Instruments NI-DNET User Manual page 40

National instruments devicenet ni-dnet user manual
Table of Contents

Advertisement

Byte
Byte
Bit 7
Bit 7
0
0
0
0
1
1
0
0
2
2
3
3
© National Instruments Corporation
Some device vendors provide comments about I/O assemblies in an
Electronic Data Sheet (EDS). The EDS file is a text file whose format
is defined by the DeviceNet Specification.
Ask the device's vendor if they have filled out a DeviceNet
compliance statement. This form is located at the front of the
DeviceNet Specification, and it provides information about the device,
including its I/O assemblies.
After you open an NI-DNET I/O Object and start communication, you use
the
ncWriteDnetIO
the
function to read an input assembly received from a
ncReadDnetIO
remote device. Both of these functions access the entire assembly as an
array of bytes.
In most cases, the array of bytes for an input or output assembly contains
more than one value. In DeviceNet terminology, an individual data value
within an I/O assembly is referred to as a member.
Documentation for the members of an input or output assembly includes
the position of each member in the assembly (often shown as a table with
byte/bit offsets) and a listing of the attribute in the device that each member
represents (often shown as class, instance, and attribute identifiers). For
standard device profiles, the I/O assemblies are documented in the device
profile's specification, and the actual attributes are documented in the
individual object specifications. Attribute documentation includes the
attribute's DeviceNet data type and a complete explanation of its meaning.
As an example of I/O assembly documentation, consider the standard
AC Drive device profile. For this device profile, the DeviceNet
Specification defines an output assembly called Basic Speed Control
Output (Assembly Object instance 20). This output assembly is used to
start/stop forward motion at a given speed and to reset faults in the device.
The bytes of this output assembly are shown in Figure 4-6, and the attribute
mapping is shown in Table 4-1.
Bit 6
Bit 6
Bit 5
Bit 5
Bit 4
Bit 4
0
0
0
0
0
0
0
0
Speed Reference (Low Byte)
Speed Reference (Low Byte)
Speed Reference (High Byte)
Speed Reference (High Byte)
Figure 4-6. AC Drive Output Assembly, Instance 20
Chapter 4
function to write an output assembly for a device and
Bit 3
Bit 3
Bit 2
Bit 2
0
0
0
0
Fault Reset
Fault Reset
0
0
0
0
0
0
4-9
NI-DNET Programming Techniques
Bit 1
Bit 1
Bit 0
Bit 0
0
0
Run Fwd
Run Fwd
0
0
0
0
NI-DNET User Manual

Advertisement

Table of Contents
loading

This manual is also suitable for:

Devicenet ni-dnet

Table of Contents