| Customize Help
| Save Settings

McomWaitPositionRequest



Function Map
Synopsis
Waits to receive a robot's request for a new position.
Syntax
void McomWaitPositionRequest(
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
)
Description

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

RotationXPtr

RotationYPtr

RotationZPtr

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.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
ComId

Specifies the identifier of the Industrial Communication context. The Industrial Communication context must have been allocated to communicate with a robot controller.

OperationCodePtr

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:

function map For specifying the operation code
Click to summarizeValue Description MIL system-specific
tooltip (‡)
Click to summarize M_COM_FIND_POSITION_REQUEST

Specifies that the robot controller requests a new position.

a t
U28
w
U53
Click to summarize 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)
a t
U28
w
U53
StatusPtr

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.

function map For specifying the status code returned by the robot controller
Click to summarizeValue Description MIL system-specific
tooltip (‡)
Click to summarize M_COM_ERROR

Specifies that the robot controller returns a failure status.

a t
U28
w
U53
Click to summarize M_COM_SUCCESS

Specifies that the robot controller returns a success status.

a t
U28
w
U53
ObjectSpecifierPtr

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.

PositionXPtr

Specifies the address of the variable in which to write the current X-position of the robot.

PositionYPtr

Specifies the address of the variable in which to write the current Y-position of the robot.

PositionZPtr

Specifies the address of the variable in which to write the current Z-position of the robot.

RotationXPtr

Specifies the address of the variable in which to write the rotation around the positional X-axis of the robot.

RotationYPtr

Specifies the address of the variable in which to write the rotation around the positional Y-axis of the robot.

RotationZPtr

Specifies the address of the variable in which to write the rotation around the positional Z-axis of the robot.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

ControlValue

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; milcom.lib.
DLL Requires mil.dll; milcom.dll.
COM PROTOCOL PROFINET COM PROTOCOL ETHERNETIP COM PROTOCOL MODBUS COM PROTOCOL CCLINK COM FIND POSITION REQUEST COM ERROR COM SUCCESS