nimcConfigureMotionIOMap |
Configure Motion I/O Map
Usage
status = nimcConfigureMotionIOMap(TnimcDeviceHandle deviceHandle, TnimcAxisHandle axisHandle, TnimcMotionIOMap attribute, i32 ioAxis, TnimcMotionIOMapLineType lineType, u32 line);
Purpose
Maps a general purpose I/O line to an alternate function of an axis.
Parameters
Name | Type | Description |
---|---|---|
deviceHandle | TnimcDeviceHandle | assigned by Measurement & Automation Explorer (MAX) |
axisHandle | TnimcAxisHandle | axis to configure |
attribute | TnimcMotionIOMap | the attribute to map to for the input axis |
ioAxis | i32 | axis that specifies the digital I/O line to map |
lineType | TnimcMotionIOMapLineType | line type to map |
line | u32 | digital line number of the axis |
Parameter Discussion
axisHandle is the axis to configure with this function. Valid values are 1 through 8. On motion controllers that support fewer than eight axes, configuring non-existent axes returns error 70006 (NIMC_badResourceIDOrAxisError). Refer to Axes for axis resource IDs.
attribute is the action to map to a digital I/O line. The following are valid attributes:
attribute | Description |
---|---|
TnimcMotionIOMapDefaultInput | Maps a general purpose I/O line as the default input line. |
TnimcMotionIOMapDefaultOutput | Maps a general purpose I/O line as the default output line. |
TnimcMotionIOMapShutdown | Maps a general purpose input line as the shutdown (E-Stop) line. Refer to Enable Shutdown for more information about the shutdown (E-Stop) functionality of the controller. |
TnimcMotionIOMapInhibitOut | Maps a general purpose output line as an inhibit-out line. Refer to Write Motion I/O Data for more information about the inhibit outputs. |
TnimcMotionIOMapAlarmClear | Maps a general purpose output line as an alarm clear line. Refer to Write Motion I/O Data for more information about alarm clear. |
TnimcMotionIOMapInhibitIn | Maps a general purpose input line as an inhibit-in line. Refer to Write Motion I/O Data for more information about the inhibit inputs. |
TnimcMotionIOMapDriveReady | Maps a general purpose input line as a drive ready line. Refer to Write Motion I/O Data for more information about the drive ready signal. |
TnimcMotionIOMapInPosition | Maps a general purpose input line as an in-position line. Refer to Write Motion I/O Data for more information about the in-position inputs. |
ioAxis is the axis of the digital I/O line to map.
lineType line type to apply the selected attribute to. The following is the valid attribute:
attribute | Description |
---|---|
TnimcMotionIOMapLineTypeDigitalIO | Maps a digital I/O line. |
line is line of the ioAxis to map.
Using This Function
This function maps a general-purpose I/O line to an alternate function of an axis such as inhibit output. For example, to map axis 3 general-purpose output bit 1 to the inhibit output of axis 3, the function call appears as
status = nimcConfigureMotionIOMap(boardID, 3, TnimcMotionIOMapInhibitOut, 3, TnimcMotionIOMapLineTypeDigitalIO, 1);
Notes
|
The following table lists the drive signals and their implementation on the controller:
Signal Name | Signal Direction |
Controller Support | ||||
---|---|---|---|---|---|---|
Controller | Drive | 7330 | 7340 | 7350 | 7390 | |
Inhibit-Out | Servo On | Output | Dedicated | Dedicated | Dedicated | Mappable |
Inhibit-In | Servo Alarm | Input | Mappable | Mappable | Mappable | Dedicated |
Drive Ready | Servo Ready | Input | Mappable | Mappable | Mappable | Mappable |
In-Position | In-Position | Input | Mappable | Mappable | Mappable | Dedicated |
Alarm Clear | Alarm Clear | Output | Mappable | Mappable | Mappable | Mappable |
The active state of a dedicated signal is directly configurable using this function. The active state of a mappable signal is determined by the active state of the line being used.
For example, to set the active state of the Alarm Clear signal, a mappable signal on all controllers, set the active state of the line the signal is mapped to using the Write Digital I/O Data function.
To set the active state of the inhibit-in signal on a PCI-7390, which has a dedicated line for this signal, use the TnimcMotionIODataInhibitInActiveState attribute of the Write Motion I/O Data function.
You cannot use this function to map signals on NI 7330/7340/7350 controllers on lines greater than line 7. For example, on an NI 7356 controller, you can use this function to configure axis 5, lines 0 through 7 (port 5), but you cannot configure lines 8 through 15, which are on the second port (port 7) of axis five. Refer to the Remarks section of Write Digital I/O Data for the port to axis and line mapping for these controllers.