MIL_ID ComId, | //in |
MIL_INT64 *OperationCodePtr, | //out |
MIL_INT64 *StatusPtr, | //out |
MIL_INT64 *ObjectSpecifierPtr, | //out |
MIL_DOUBLE *PositionXPtr, | //out |
MIL_DOUBLE *PositionYPtr, | //out |
MIL_DOUBLE *PositionZPtr, | //out |
MIL_DOUBLE *RotationXPtr, | //out |
MIL_DOUBLE *RotationYPtr, | //out |
MIL_DOUBLE *RotationZPtr, | //out |
MIL_INT64 ControlFlag, | //in |
MIL_DOUBLE ControlValue | //in |
This function waits to receive a robot's request for a new position. When a robot controller sends a request for a new position, it also sends it's current position and other relevant information.
You can only use this function when you specify an Industrial Communication context that has been allocated to communicate with a robot controller.
If the time to execute this function is greater than the value set using McomControl() with M_COM_TIMEOUT, an error occurs.
The robot's current rotation about the position axes is received in the RotationXPtr, RotationYPtr, and RotationZPtr parameters. The table below indicates how the robot controller internally represents this data.
Robot Type |
Robot controller representation |
||
ABB |
The orientation is converted by the robot controller to a quaternion. |
||
DENSO |
Roll |
Pitch |
Yaw |
Epson |
W |
V |
U |
Fanuc |
W |
P |
R |
KUKA |
C |
B |
A |
Staubli |
Rx |
Ry |
Rz |
This function is only available if you have the MIL Industrial Communication package, or another relevant update installed.
Specifies the identifier of the Industrial Communication context. The Industrial Communication context must have been allocated to communicate with a robot controller.
Specifies the address of the variable in which to write the operation code (opcode) received from the robot controller. This parameter will return the following value:
For specifying the operation code
|
|||||||||||||||||||||||||||||||||||||||
Value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
M_COM_FIND_POSITION_REQUEST |
Specifies that the robot controller requests a new position. |
‡ | a | t U28 |
w U53 |
||||||||||||||||||||||||||||||||||
1024 <= Value <= 2047 |
Specifies the robot controller requests to perform a user-defined operation, identified by the operation code. Note that you can compare the value returned to the specified address with a 0-based opcode using M_COM_USER_OPCODE + 0-based opcode. For example, an opcode of 1026 is equivalent to M_COM_USER_OPCODE + 2. (summarize)Specifies the robot controller requests to perform a user-defined operation, identified by the operation code. (more details...) |
‡ | a | t U28 |
w U53 |
Specifies the address of the variable in which to write the status code received from the robot controller. This status code indicates whether the robot was successful in moving/using the last specified position.
For specifying the status code returned by the robot
controller
|
|||||||||||||||||||||||||||||||||||||||
Value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
M_COM_ERROR |
Specifies that the robot controller returns a failure status. |
‡ | a | t U28 |
w U53 |
||||||||||||||||||||||||||||||||||
M_COM_SUCCESS |
Specifies that the robot controller returns a success status. |
‡ | a | t U28 |
w U53 |
Specifies the address of the variable in which to write the user identifier associated with the object on which to perform the specified operation; the identifier is established and received from the robot-side software. This is typically used for applications with multiple object types or multiple occurrences of objects.
Specifies the address of the variable in which to write the current X-position of the robot.
Specifies the address of the variable in which to write the current Y-position of the robot.
Specifies the address of the variable in which to write the current Z-position of the robot.
Specifies the address of the variable in which to write the rotation around the positional X-axis of the robot.
Specifies the address of the variable in which to write the rotation around the positional Y-axis of the robot.
Header | Include mil.h. |
Library | Use mil.lib; milcom.lib. |
DLL | Requires mil.dll; milcom.dll. |