Write Digital I/O DataSets the attribute on a single digital I/O line.
| Device Compatibility
|
data in is a cluster of variables that contains the values for the selected attribute.
Based on the attribute, the correct member of data in must be set as follows:
|
|||||||
attribute is the attribute you want to load. The following are valid attributes:
|
|||||||
board in is a unique number assigned by Measurement & Automation Explorer used to send and receive commands and data to or from a specific NI motion controller. | |||||||
axis in is the axis you are controlling. | |||||||
line in is the digital line of the axis to read. Valid range is 1 to 32. | |||||||
error in (no error) describes error conditions that occur before this VI runs. The default input of this cluster is no error. If an error already occurred, this VI returns the value of error in in error out. The VI runs normally only if no incoming error exists. Otherwise, the VI passes the error in value to error out. The error in cluster contains the following parameters:
|
|||||||
board out is provided for flow control. You can string together NI-Motion VIs by wiring the board out terminal of one VI to the board in terminal of the next VI. | |||||||
axis out is provided for flow control. You can string together NI-Motion VIs by wiring the axis out terminal of one VI to the axis in terminal of the next VI. | |||||||
error out contains error information. If error in indicates an error, error out contains the same error information. Otherwise, it describes the error status that this VI produces.
|
Using This VI
Use this VI to set the attribute on a single digital I/O line. The digital I/O lines are divided among the axes.
Remarks
This section includes information about how the behavior of this VI differs among the controllers that support it.
NI 73xx Controller Considerations
The following includes considerations you must make when you are using this VI with a 73xx controller:
- The PCI-7390 does not support the configure as input attribute.
- The PCI-7390 has dedicated direction I/O lines. On these controllers, the pin you write to (input or output) is determined by the value specified in line in and attribute.
For example, to change the input active state of line 1 on axis 2, call Write Digital I/O Data with the following parameters:axis in = 2
line in = 1
attribute = input active stateThe active state is applied to axis 2 General-Purpose Input Bit 1.
To change the output active state of line 1 on axis 2, call Write Digital I/O Data with the following parameters:
axis in = 2
line in = 1
attribute = output active stateThe active state is applied to axis 2 General-Purpose Output Bit 1.
- 7330, 7340, and 7350 controllers have configurable direction I/O lines. On these controllers, the line number is translated to port and line number. For example, a call to Write Digital I/O Data on a four axis controller with eight digital I/O ports with
axis in = 2
line in = 15
attribute = input active stateapplies the polarity to port 6 bit 7.
- The following table lists the port to axis and line mapping for 7350 controllers:
Number of Axes Axis Number Line 0 to 7 Line 8 to 15 Line 16 to 23 Line 24 to 31 2 1 Port 1 Port 3 Port 5 Port 7 2 Port 2 Port 4 Port 6 Port 8 4 1 Port 1 Port 5 — — 2 Port 2 Port 6 — — 3 Port 3 Port 7 — — 4 Port 4 Port 8 — — 6 1 Port 1 — — — 2 Port 2 — — — 3 Port 3 — — — 4 Port 4 — — — 5 Port 5 Port 7 — — 6 Port 6 Port 8 — — 8 1 Port 1 — — — 2 Port 2 — — — 3 Port 3 — — — 4 Port 4 — — — 5 Port 5 — — — 6 Port 6 — — — 7 Port 7 — — — 8 Port 8 — — — - The following table lists the port to axis and line mapping for 7330 and 7340 controllers:
Number of Axes Axis Number Line 0 to 7 Line 8 to 15 2 1 Port 1 Port 3 2 Port 2 Port 4 4 1 Port 1 — 2 Port 2 — 3 Port 3 — 4 Port 4 —
NI SoftMotion Controller Considerations
The following includes considerations you must make when you are using this VI with the NI SoftMotion Controller:
The NI SoftMotion Controller does not support the configure as input attribute.