| Customize Help
| Save Settings

McomSendPosition



Function Map
Synopsis
Sends a position to the robot. This does not move the robot, but simply sends a found position to the robot controller.
Syntax
void McomSendPosition(
MIL_ID ComId, //in
MIL_INT64 OperationCode, //in
MIL_INT64 Status, //in
MIL_INT64 ObjectSpecifier, //in
MIL_DOUBLE PositionX, //in
MIL_DOUBLE PositionY, //in
MIL_DOUBLE PositionZ, //in
MIL_DOUBLE RotationX, //in
MIL_DOUBLE RotationY, //in
MIL_DOUBLE RotationZ, //in
MIL_INT64 ControlFlag, //in
MIL_DOUBLE ControlValue //in
)
Description

This function sends a position to the robot controller. It is typically used to change the robot's position to the specified coordinates.

You can only use this function when you specify an Industrial Communication context that has been allocated to communicate with a robot controller.

Use RotationX, RotationY, RotationZ to specify rotations about the different positional axes. The table below indicates how the robot controllers internally represent this data.

Robot type

Robot controller representation

RotationX

RotationY

RotationZ

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.

OperationCode

Specifies the operation code (opcode) of the command. This parameter must be set one of to the following values:

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

Specifies that the MIL application is sending a new position to the robot controller.

a t
U28
w
U53
Click to summarize 1024 <= Value <= 2047

Specifies the value of the user-defined operation code. Note that if you want to start the user operation code offset at 0 instead of 1024, you can use M_COM_USER_OPCODE + opcode value.

(summarize)
a t
U28
w
U53
Status

Specifies the status code to send to the robot controller.

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

Specifies that the MIL application was not successful in finding a new position or that the robot should stop.

a t
U28
w
U53
Click to summarize M_COM_SUCCESS

Specifies that the MIL application was successful in finding a new position.

a t
U28
w
U53
ObjectSpecifier

Specifies the user identifier associated with the object at the specified position. This should ideally correspond to the value received from ObjectSpecifierPtr during the previous call of the McomWaitPositionRequest() function.

PositionX

Specifies the X-position to the robot controller.

PositionY

Specifies the Y-position to the robot controller.

PositionZ

Specifies the Z-position to the robot controller.

RotationX

Specifies the rotation around the positional X-axis to the robot controller.

RotationY

Specifies the rotation around the positional Y-axis to the robot controller.

RotationZ

Specifies the rotation around the positional Z-axis to the robot controller.

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 ROBOT FIND POSITION RESULT COM ERROR COM SUCCESS