flex_setu32 |
Set u32
Usage
status = flex_setu32(u8 boardID, u8 resource, u16 attr, u32 value);
Purpose
Sets the general software settings.
Parameters
Name | Type | Description |
---|---|---|
boardID | u8 | assigned by Measurement & Automation Explorer (MAX) |
resource | u8 | resource selector |
attr | u16 | type of information you want to set |
value | u32 | new value to which attribute is set |
Parameter Discussion
resource is the resource that the attribute you selected is set to.
attribute is the selector for the type of data you want to set. Legal values are defined as constants in the NI-Motion header files MotnCnst.h (for C/C++ users) and motncnst.bas (for Visual Basic users) and are listed in the following section.
value is the new value to which the data you selected is set.
Using This Function
The Set u32 function sets selected software settings as specified by attribute. This function can set values that are stored as integers.
The following table includes the attributes you can set, their descriptions, possible values, and the devices they work on.
Attribute | Resource | Constant | Description | Values | ||
NIMC_BP_ 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.
|
0 to 255 | ||
NIMC_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 | ||
NIMC_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 NIMC_PULL_IN_WINDOW or until it reaches this maximum. The default is 3. | 0 to 32,767 | ||
NIMC_STOP_TYPE_ ON_SWITCH |
Axis | 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.
|
0 to 2 | ||
NIMC_STEP_ DUTY_CYCLE |
Axis | 0x0600 | Duty cycle of the step output. This function sets the duty cycle to either 25% or 50%. | 25 or 50 | ||
NIMC_DECEL_ STOP_JERK |
Axis | 0x0500 | When this attribute is set to 1, jerk is turned off when any of the following stop conditions are met:
|
0 or 1 |