Set u32

NI-Motion VI

Set u32

Sets the general software settings.

Details

Device Compatibility

DeviceCompatibility
7330
Y
7340
Y
7344
Y
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Accelnet
N
NI SoftMotion Controller for CANopen—Xenus
N
Board ID is a unique number assigned by Measurement & Automation Explorer (MAX) used to send and receive commands and data to or from a specific NI motion controller.
Resource is the Axis, Vector Space, ADC, or Encoder you wired into the VI. Use Resource Output to pass the resource to another VI and/or to display information about the device.
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:
status is TRUE if an error occurred before this VI was called, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.
Value is the selector for the type of data you want to set.
Attribute is the selector for the type of information you want to set.
Bd ID Out is provided for flow control. You can string together NI-Motion VIs by wiring the Bd ID Out terminal of one VI to the Board ID terminal of the next VI.
Resource Output is the Axis, Vector Space, ADC, or Encoder you wired into the VI. Use Resource Output to pass the resource to another VI and/or to display information about the device.
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.
status is TRUE if an error occurred, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.

Using This VI

The Set u32 VI sets selected software settings as specified by Attribute. This VI can set values stored in integer format.

The following table shows the attributes you can set, their descriptions, and possible values:

Attribute  Resource  Constant  Description  Values
Breakpoint Window Axis or encoder 0x0200 After the axis encounters a breakpoint, the axis must move outside the breakpoint window before it can rearm for another breakpoint. This is used to prevent oscillation from sending multiple breakpoint outputs from the same breakpoint position. The default is 0.
Note Note  The breakpoint window must be smaller than the breakpoint modulus or period. A modal error is generated when the breakpoint window is larger than the loaded breakpoint modulus or period.
0 to 255
Pull-in
Window
Axis 0x0400 For closed-loop stepper axes, an area around the target position that determines whether or not to do any more pull-in moves. Once within the area, the motion controller stops doing pull-in tries. The default is 1. 0 to 32,767
Pull-in
Tries
Axis 0x0401 The maximum number of times the closed-loop stepper axis tries to reach the target position. It will try until it is within the range specified by the Pull-in Window attribute or until it reaches this maximum. The default is 3. 0 to 32,767
Stop Type on Switch N/A 0x0403 Changes the behavior of the stop that is performed when a limit switch or home switch is encountered. This setting applies to all axes.
Caution  When selecting a stop type other than Halt, make sure that there is enough space between the limit switch and the physical end of travel for the axis to decelerate. Failure to do so could cause physical damage to the system.
The following attributes are available:
  • Decelerate (0)—the axis decelerates smoothly to a stop
  • Halt (1)—(default) the axis performs an immediate, full torque/stop (halt stop)
  • Kill (2)—zeroes the command and activates the inhibit/output
Tip  This attribute uses the same values as Stop Motion. Complete the following steps to use enum values instead of numeric values in the value parameter.
  1. Place Stop Motion on the block diagram.
  2. Create a constant on the Stop Type parameter.
  3. Set the enum to the desired value and use it for the Value parameter of Set u32.
0 to 2
Step Output
Duty Cycle
Axis 0x0600 Duty cycle of the step output. This VI sets the duty cycle to either 25% or 50%. 25 or 50
Deceleration Stop
S-curve Override
Axis 0x0500 When this attribute is set to 1, jerk is turned off when any of the following stop conditions are met:
  • calling Stop Motion with Deceleration as the Stop Type
  • encountering a software limit
  • encountering a hardware limit or home switch with the Set u32 attribute Stop Type on Switch set to Decelerate (0)
The default value of 0 means that the deceleration uses the s-curve time value defined in Load S-Curve Time.
0 or 1

Using Unlisted Resources

Complete the following steps to use this VI on resources that are not in the drop-down list:

  1. Open the VI in LabVIEW.
  2. View the block diagram.
  3. Right-click the Resource terminal and select Create»Constant.
  4. Click the drop-down arrow on the Resource constant and select Other.
  5. Type the appropriate resource number, in decimal, for the resource you want to configure. Refer to Axes, Vector Spaces, ADC Channels, and Encoders for resource numbers.
  6. Right-click the Attribute terminal, select Create»Constant, and select the appropriate attribute from the drop-down list.