flex_load_blend_fact |
Load Blend Factor
Usage
status = flex_load_blend_fact(u8 boardID, u8 axisOrVectorSpace, i16 blendFactor, u8 inputVector);
Purpose
Loads the blend factor for an axis or vector space.
Parameters
Name | Type | Description |
---|---|---|
boardID | u8 | assigned by Measurement & Automation Explorer (MAX) |
axisOrVectorSpace | u8 | axis or vector space to control |
blendFactor | i16 | the mode and/or dwell used during blending |
inputVector | u8 | source of the data for this function |
Parameter Discussion
axisOrVectorSpace is the axis or vector space to control. Valid values are NIMC_AXIS1 through NIMC_AXIS30 or NIMC_VECTOR_SPACE1 through NIMC_VECTOR_SPACE15. On motion controllers that support fewer than thirty axes, configuring non-existent axes or vector spaces returns error 70006 (NIMC_badResourceIDOrAxisError). Refer to Axes and Vector Spaces for axis and vector space resource IDs.
blendFactor is the blend factor mode and/or dwell time. –1 specifies normal blending (default), 0 specifies a start after the previous move is fully stopped, and values > 0 specify additional dwell time in milliseconds.
inputVector indicates the source of the data for this function. Available input vectors include immediate (0xFF), variable (0x01 through 0x78), or indirect variable (0x81 through 0xF8). Refer to Input and Return Vectors for more detailed information.
Using This Function
This function controls how the Blend Motion function operates. Blending automatically starts a pending move on an axis or vector space when the move in process completes. Exactly when the pending move starts is determined by the loaded blend factor.
A blend factor of –1 causes the pending move to start when the existing move finishes its constant velocity segment and starts to decelerate, as shown in the following figure. This blends the two moves together at the optimum blend point.
If the two moves are at the same velocity, in the same direction, and have matching acceleration and deceleration, they superimpose perfectly without a dip or increase in axis velocity. Vector velocity dips based on the amount of deflection from a straight line.
For a vector move, if all of the axes are continuing in the same direction, the vector velocity remains constant. But, if one of the axes changes direction, the vector velocity does not remain constant during the transition phase. A blend factor of zero (0) causes the pending move to start when the existing move fully completes its profile, as shown in the following figure.
Positive blend factors allow for a dwell at the end of the first move before the automatic start of the pending move, as shown in the following figure. The blend factor dwell is programmed in milliseconds.
The maximum value of the positive blend factor depends upon the PIDrate that you set in the Enable Axes function, because the DSP delays the trajectory generators based on PID sample periods. The formula used to determine the maximum positive blend factor is as follows:
where s is the time in sample periods, t is the positive blend factor value in milliseconds, and PID is the PID rate in microseconds (62.5, 125, 188, 250, 312, 375, 438, or 500).
If s > 32,767, it is coerced to 32,767 sample periods. At a PIDrate of 500 µs, the maximum value of the positive blend factor is 16,383 ms and at a PIDrate of 250 µs, the maximum value is 8,192 ms.
If the first move has already completed when the Blend Motion function is executed, the second move still waits the dwell time before starting.
You can load blend factors to individual axes or to a vector space for coordinated blending of all axes in the vector space. When sent to a vector space, the blend factor is broadcast to all axes in the vector space to change the per-axis blend factors. If you later want to operate an axis independently with a different blend factor, you must execute the Load Blend Factor function again for that axis.
Note All axes in a coordinate (vector) space must have the same blend factor. If the blend factors are different on each axis when you execute a Blend Motion function, an error is generated. |