You can use an FPGA I/O Node, configured for reading or writing, with this device. All NI 9501 FPGA I/O operations execute in parallel when the I/O Node is configured with multiple I/O items.

You can select the following terminals for this device:

Table 571. Terminals in Software
Terminal Type Description
Step Write Sends step information to the motor as a series of digital pulses. Each positive edge on the Step output is considered a step. This output is available in a single-cycle Timed Loop. Steps cannot be generated at a rate faster than 5 MHz. The minimum pulse width of the Step output is 100 ns.
Note You cannot use this output when the drive is disabled. Executing this node when the drive is disabled does not generate a step signal and returns error –65631 (NIMCMM_driveNotEnabled).
For example programs, refer to Velocity Control (open loop) - NI 9501 and Setpoint Control (open loop) - NI 9501 in the labview\examples\CompactRIO\Module Specific\NI 9501 directory.
Direction Write Specifies the direction of the motor. Set Direction to TRUE for clockwise motion. Set Direction to FALSE for counterclockwise motion. This output is available in a single-cycle Timed Loop. The minimum pulse width of the Direction output is 100 ns. The following figure shows the direction of motion when changing the Direction signal level:


To ensure that step pulses adjacent to a direction edge are applied in the correct direction, set the direction output at least 100 ns before or after a positive edge of the step output, as shown in the following figure:

Note You cannot use this output when the drive is disabled. Executing this node when the drive is disabled does not change the direction of motion and returns error –65631 (NIMCMM_driveNotEnabled).
Refer to the Velocity Control (open loop) - NI 9501 and Position Control (open loop) - NI 9501 examples in the labview\examples\CompactRIO\Module Specific\NI 9501 directory for examples.
User LED Write Controls the User LED on the NI 9501 module. Set User LED to TRUE to turn the LED on. Set User LED to FALSE to turn the LED off. This terminal takes 5 µs to execute. Subsequent executions of this terminal or another property, method, or terminal in the same cycle wait until the previous request is complete before executing. For example, three subsequent calls to this terminal take 15 µs.

Arbitration

This device supports only the Arbitrate if Multiple Requestors Only option for arbitration. You cannot configure arbitration settings for this device.

Module Methods

Use the FPGA I/O Method Node to configure the following methods for this device. Refer to the Velocity Control (open loop) - NI 9501 and Position Control (open loop) - NI 9501 examples in the labview\examples\CompactRIO\Module Specific\NI 9501 directory for examples.

Table 572. Module Methods
Method Description
Clear Faults Clears module faults. This method blocks until the command is sent to the module. Module faults do not clear if the fault condition is still present; always resolve the cause of the fault before executing this method. This method takes 5 µs to execute. Subsequent executions of this method or another property, method, or terminal in the same cycle wait until the previous request is complete before executing. For example, three subsequent calls to this method take 15 µs.
Disable Drive Disables the drive. This method takes 5 µs to execute. Subsequent executions of this method or another property, method, or terminal in the same cycle wait until the previous request is complete before executing. For example, three subsequent calls to this method take 15 µs. The Disable Drive method takes priority over any other module method. If another method is called in the same cycle as the Disable Drive method, the Disable Drive method executes first.
Enable Drive Enables the drive. This method takes 5 µs to execute. Subsequent executions of this method or another property, method, or terminal in the same cycle wait until the previous request is complete before executing. For example, three subsequent calls to this method take 15 µs. If the Enable Drive and Disable Drive methods are called in the same cycle, the Disable Drive method executes and the Enable Drive method is ignored.
Note   Executing this method when the drive is disabled due to a fault or other hardware issue returns error –65632 (NIMCMM_driveDisabled). Use the Get Status method to determine the source of the fault, resolve the fault, clear the fault status using the Clear Faults method, then execute the Enable Drive method again.
Get Status Obtains status information from the drive. This method takes 5 µs to execute. Subsequent executions of this method or another property, method, or terminal in the same cycle wait until the previous request is complete before executing. For example, three subsequent calls to this method take 15 µs. The following items are available:
  • Drive Status—Returns the drive status in an enum value. Valid values are the following:
    • Drive Disabled (Rated Phase Current set to Zero)—The drive is disabled because the Rated Phase Current property is not initialized. You must set this property to the correct value before enabling the drive.
    • Drive Disabled (Disabled by fault)—The drive is disabled because a drive fault has occurred.
    • Drive Disabled (Disabled by software)—The drive is disabled by the Disable Drive method or because the Enable Drive method has not yet executed.
    • Drive Enabled—The drive is enabled.
  • Module Fault—Returns TRUE if a module fault is present. Returns FALSE if no fault is present.
  • Module Fault Code—Returns the module fault code. Convert the fault code to a binary number to determine which fault bits are true. For example, a fault code of 4 is the binary number 100, indicating a fault in bit 2 of the fault bitmap (Module Short Circuit).

Module Properties

Use the FPGA I/O Property Node to access the following properties with this device. Refer to the Velocity Control (open loop) - NI 9501 and Position Control (open loop) - NI 9501 examples in the labview\examples\CompactRIO\Module Specific\NI 9501 directory for examples using these properties.

Table 573. Module Properties
Property Type Description
Current Reduction Percentage Read/Write Sets or returns the percentage by which to reduce the maximum current when the motor is stopped after the specified Current Reduction Delay has passed. The following options are available:
  • 0% (No Reduction)—Disables the current reduction functionality.
  • 25% (default)—Reduces the current by 25% of the maximum.
  • 50%—Reduces the current by 50% of the maximum.
  • Current Reduction Delay (ms) Read/Write Sets or returns the time, in milliseconds, after the motor stops to wait before the current is reduced by the amount specified in the Current Reduction Percentage property. The default is 1,000 ms. Valid values are 0 ms to 216 ms.
    Microstepping Rate Read/Write Sets or returns the current microstepping rate. The NI 9501 supports full, half, and microstep rates up to 256. Microstepping provides higher positional accuracy and smoother motion at the expense of reduced torque.
    Caution Updating this property while a move is in progress will increase or decrease the velocity of the axis.

    Update the Microstepping Rate when the drive is enabled. This allows you to perform a move at higher speeds using a low microstepping rate, then perform a move using a much higher microstepping rate to achieve high precision when reaching the final target position.

    This property takes 5 µs to execute. Subsequent executions of this property or another property, method, or terminal in the same cycle wait until the previous request is complete before executing. For example, three subsequent calls to this property take 15 µs.

    The following options are available:
    • 1 (Full Step)—No microstepping.
    • 2 (Half Step)
    • 4
    • 8
    • 16 (default)
    • 32
    • 64
    • 128
    • 256
    Module ID Read Returns the module ID, 0x751D.
    Rated Phase Current Read/Write

    Sets or returns the rated phase current of the stepper motor you are using in amps. The default value is 0 A. Valid values are greater than or equal to 0 A and less than or equal to the maximum value specified in the product specifications.

    Setting this property below 0 or above the maximum value returns error -65634 (NIMCMM_ratedPhaseCurrentOutOfRange). Setting this property to 0 returns error -65633 (NIMCMM_invalidRatedPhaseCurrent). Use the motor datasheet to determine this setting, based on the following table.
    Connection Type Rated Phase Current (Amps/Phase)
    Bipolar 4-wire same as datasheet Amps/Phase
    6-wire series datasheet Amps/Phase x 0.707
    6-wire half-coil same as datasheet Amps/Phase
    8-wire series datasheet Amps/Phase x 0.707
    8-wire parallel datasheet Amps/Phase x 1.414
    8-wire half coil same as datasheet Amps/Phase
    This property takes 4.31 ms to complete execution. Subsequent executions of this property or another property, method, or terminal in the same cycle wait until the previous request is complete before executing. For example, three subsequent calls to this property take 12.93 ms.
    Note   Setting this property when the drive is enabled returns error –65630 (NIMCMM_onlyWhenDisabled). Disable the drive before updating this property.
    Serial Number Read Returns the unique serial number of the module.
    Vendor ID Read Returns the National Instruments vendor ID, 0x1093.

    Single-Cycle Timed Loop

    This device supports the single-cycle Timed Loop for the Step and Direction terminals of this device.

    FPGA Target Clock Support

    This device supports only top-level FPGA target clock rates and single-cycle Timed Loop clock rates that are multiples of 40 MHz, such as 40 MHz, 80 MHz, 120 MHz, and so on.