Y_GP_GetPrimeAxesRef
This function block takes a label for a group axis as an input and provides all the prime axes information (if any) for the given label.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | AxesGroup | AXES_GROUP_REF | A logical reference to a group of axes, which contains several additional substructures pertaining to the group. | |
| V | JointMap | Yt_GP_JointMap | Structure of data that holds information for Joint Index, Label, AxisName and AXIS_REF. | |
| VAR_INPUT | ||||
| B | Enable | BOOL | The function will continue to execute every scan while Enable is held high and there are no errors. | FALSE |
| V | Label | Yt_String16 | Label of a group axis, as defined in the group's mechanism configuration. | STRING#'' |
| VAR_OUTPUT | ||||
| B | Valid | BOOL | Indicates that the function is operating normally and the outputs of the function are valid. | |
| B | Error | BOOL | Set high if an error has occurred during the execution of the function block. This output is cleared when 'Execute' or 'Enable' goes low. | |
| E | ErrorID | UINT | If Error is true, this output provides the Error ID. This output is reset when 'Execute' or 'Enable' goes low. | |
| V | HasPrime | BOOL | Set TRUE if the Group contains at least one joint configured with more than one servo. | |
| V | Axes_Ref | Yt_GP_MotorArray | Array of #19516with the information of all the individual axes related to the input label. This includes the main axis and all prime axes. Only the 'AxisNum' and 'DriverType' fields are of relevance. Other #19516fields will be empty. | |
| V | LastMotor | INT | Number of prime axes for the given label. | |
| V | MainJoint | INT | Joint index of the input labelas seen in the group's mechanism configuration. | |
Notes
- This function block only supports locally hosted groups, not remotely hosted robots via MotomanSync
- This function block expects a populated JointMap structure. Execute #30285 before using this function block.
Error Description
See the Function Block ErrorID List.
Example
Executing Y_GP_GetPrimeAxesRef with 'Label' set to 'Y' will result in the following: 'HasPrime' is TRUE, indicating the presence of prime axes; 'LastMotor' is 2, indicating two prime axes; and 'MainJoint' is also 2, referencing the 'Index' number as seen in the mechanism configuration.
The 'Axes_Ref' lists all the axes associated with the input 'Label', starting by the main axis, followed by the prime axes.