flex_read_axis_status_rtn

NI-Motion Functions

flex_read_axis_status_rtn

Device Compatibility

Device Compatibility
7330
Y
7340
Y
7344
Y
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Xenus
Y
NI SoftMotion Controller for CANopen—Accelnet
Y

Read per Axis Status Return

Usage

status = flex_read_axis_status_rtn(u8 boardID, u8 axis, u16* axisStatus);

Purpose

Tip  Refer to the Remarks section for information about how the behavior of this function differs between controllers.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
axis u8 axis to read
axisStatus u16* bitmap of per-axis status

Parameter Discussion

axis is the axis to read. Valid values are NIMC_AXIS1 through NIMC_AXIS30. On motion controllers that support fewer than thirty axes, reading non-existent axes returns error –70006 (NIMC_badResourceIDOrAxisError). Refer to Axes for axis resource IDs.

axisStatus is a bitmap of motion status for the axis.

D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
MC BC Dir HSC IF HF BP VT WD S/W
Limit 
Home Limit FE MOff PC R/S

D0 Run/Stop Status (R/S):
   1 = Axis running
   0 = Axis stopped

D1 Profile Complete (PC):
   1= Profile complete
   0 = Profile generation in process

D2 Motor Off (Moff):
   1 = Motor off (killed)
   0 = Motor on

D3 Following Error (FE):
   1 = Axis exceeded the programmed following error limit
   0 = Axis following error is below the programmed following error limit

Note  If you are running a contoured move or slave axis move with a stepper axis, it is possible that the contour velocity or the slave axis geared velocity exceeds the maximum step rate of the controller. In this case, the controller kills the axis and sets the following error status to true. Refer to the Specifications section of your controller user manual for the maximum step rate of your controller.

D4 Limit Input (Limit):
   1 = Forward or reverse limit input active
   0 = Neither limit active

D5 Home Input (Home):
   1 = Home input active
   0 = Home input not active

D6 Software Limit (S/W Limit):
   1 = Forward or reverse software limit reached
   0 = Neither software limit reached

D7 Communication Watchdog (WD):
   1 = Watchdog occurred.
   0 = Watchdog did not occur.

D8 Velocity Threshold (VT):
   1 = Velocity above threshold
   0 = Velocity below threshold

D9 Breakpoint (BP):
   1 = Breakpoint occurred
   0 = Breakpoint pending or disabled

D10 Home Found (HF):
   1 = Home found during last Find Home
   0 = Find Home sequence in process or home not found

D11 Index Found (IF):
   1 = Encoder Index found during last Find Index
   0 = Find Index sequence in process or index not found

D12 High Speed Capture (HSC):
   1 = High speed capture occurred
   0 = High speed capture pending

Note  If configured as a digital input, the high-speed capture line state does not affect this bit.

D13 Direction (Dir):
   1 = Reverse
   0 = Forward

D14 Blend Complete (BC):
   1 = Blend complete
   0 = Blend pending

D15 Move Complete (MC):
   1 = Move complete
   0 = Move not complete

Using This Function

This function returns the trajectory and motion I/O status for the specified axis. The valid status information this function returns is shown in the bitmap in axisStatus.

This function also returns the success or failure status of the most recent Find Reference sequences.

Note  This function returns undefined values for axes that are currently performing find reference moves.
Note  You also can read individual item status in a multi-axis format with NI-Motion functions like Read Axis Limit Status, Read Trajectory Status, and so on.

Example

Read per Axis Status is called on axis 4 and the function returns axisStatus = 0xBE02.

The returned value 0xBE02 corresponds to the following bitmap:

D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
MC BC Dir HSC IF HF BP VT WD S/W
Limit 
Home Limit FE MOff PC R/S
1 0 1 1 1 1 1 0 0 0 0 0 0 0 1 0

Refer to the bitmap descriptions above for information about what each true (1) and false (0) value means in this example bitmap.

Remarks

This section includes information about how the behavior of this function differs among the controllers that support it.

NI 73xx Controller Considerations

The following list includes considerations you must make when you are using this function with a 73xx motion controller:

  • In the axisStatus bitmap, D7 Communication Watchdog (WD) is not supported by 73xx controllers.

NI SoftMotion Controller Considerations

The following list includes considerations you must make when you are using this function with the NI SoftMotion Controller:

  • When you are using the NI SoftMotion Controller with a device that supports multiple high-speed captures and breakpoints, the status for primary and secondary inputs is concatenated by a logical OR operation to populate axisStatus.
  • In the axisStatus bitmap, D7 Communication Watchdog (WD) is used for a communication status watchdog on the NI SoftMotion Controller.