Filters
Filter values by
Protocol type
  • Robot controller protocol
  • Profinet protocol
  • EtherNet/IP protocol
  • CC-Link IE Field Basic protocol
| Customize Help
| Save Settings

McomInquire



Function Map
Synopsis
Inquire about an Industrial Communication context setting.
Syntax
MIL_INT McomInquire(
MIL_ID ComId, //in
MIL_INT64 InquireType, //in
void *UserVarPtr //out
)
Description

This function inquires about a setting of the Industrial Communication context.

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.

InquireType

Specifies the setting about which to inquire.

See the Parameter associations section for possible values that can be specified.

UserVarPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type MIL_TEXT_CHAR [optionally, in C++: a reference to a MIL_STRING]
  • MIL_BOOL
  • MIL_ID
  • MIL_INT
  • MIL_INT64
  • MIL_UINT64

Specifies the address of the variable in which to return the value of the inquired setting. Since the McomInquire() function also returns the requested information, you can set this parameter to M_NULL.

See the Parameter associations section for possible values that can be returned.

The following InquireType parameter settings can be specified for any Industrial Communication context type, to inquire the system on which the context was allocated.

function map For inquiring about the system
Click to summarizeInquireType Description MIL system-specific
tooltip (‡)
UserVarPtr
- Possible values returned
Click to summarize M_OWNER_SYSTEM

Inquires the identifier of the system on which the Industrial Communication context was allocated. SET

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_ID
a t
U28
w
U53
Click to summarize M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

a t
U28
w
U53
Click to summarize MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

a t
U28
w
U53

The following InquireType parameter settings can be specified for any Industrial Communication context type.

function map For any type of Industrial Communication context
Click to summarizeInquireType Description MIL system-specific
tooltip (‡)
UserVarPtr
- Possible values returned
Click to summarize M_COM_DEVICE_DESCRIPTION +

Inquires the description of the device. SET

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: array of type MIL_TEXT_CHAR [optionally, in C++: MIL_STRING ] MORE
a t
U28
w
U53
Click to summarize MIL_TEXT("IPOrName:Port") 1

Specifies the IP address and port on the robot controller to use to communicate with it. INFO

a t
U28
w
U53
Click to summarize MIL_TEXT("M_DEFAULT") 1

Specifies to communicate with the default device described in MILConfig that uses the specified protocol. INFO

a t
U28
w
U53
Click to summarize M_COM_GET_CONNECTION_STATE

Inquires whether the device is connected.

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_BOOL
a t
U28
w
U53
Click to summarize M_FALSE

Specifies that the device is not connected.

a t
U28
w
U53
Click to summarize M_TRUE

Specifies that the device is connected.

a t
U28
w
U53
Click to summarize M_COM_INIT_VALUE

Inquires how the Industrial Communication context was initialized. SET

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_UINT64
a t
U28
w
U53
Click to summarize M_DEFAULT

Specifies the default behavior. INFO

a t
U28
w
U53
Click to summarize M_COM_NO_CONNECT

Specifies not to automatically connect to the robot controller.

a t
U28
w
U53
Click to summarize M_COM_IS_HARDWARE

Inquires if the MIL system is using a hardware-assisted acceleration device to communicate with the target device.

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_BOOL
a t
U28
w
U53
Click to summarize M_FALSE

Specifies that the system is not using a hardware-assisted acceleration device.

a t
U28
w
U53
Click to summarize M_TRUE

Specifies that the system is using a hardware-assisted acceleration device.

a t
U28
w
U53
Click to summarize M_COM_PROTOCOL_TYPE

Inquires the type of protocol for which the context was allocated. SET

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT64
a t
U28
w
U53
Click to summarize M_COM_PROTOCOL_ABB

Specifies an ABB robot controller protocol.

a t
U28
w
U53
Click to summarize M_COM_PROTOCOL_CCLINK

Specifies a CC-Link IE Field Basic protocol.

a t
U28
w
U53
Click to summarize M_COM_PROTOCOL_DENSO

Specifies a DENSO robot controller protocol.

a t
U28
w
U53
Click to summarize M_COM_PROTOCOL_EPSON

Specifies an Epson robot controller protocol.

a t
U28
w
U53
Click to summarize M_COM_PROTOCOL_ETHERNETIP

Specifies an Ethernet/IP protocol.

a t
U28
w
U53
Click to summarize M_COM_PROTOCOL_FANUC

Specifies a Fanuc robot controller protocol.

a t
U28
w
U53
Click to summarize M_COM_PROTOCOL_KUKA

Specifies a KUKA robot controller protocol.

a t
U28
w
U53
Click to summarize M_COM_PROTOCOL_MODBUS

Specifies a Modbus protocol.

a t
U28
w
U53
Click to summarize M_COM_PROTOCOL_PROFINET

Specifies a PROFINET protocol. INFO

a t
U28
w
U53
Click to summarize M_COM_PROTOCOL_STAUBLI

Specifies a Staubli robot controller protocol.

a t
U28
w
U53
Click to summarize M_COM_TIMEOUT

Inquires the maximum amount of time to wait for a receiving function (for example, McomRead() or McomWaitPositionRequest()) to finish its execution. SET

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a t
U28
w
U53
Click to summarize Value

Specifies the maximum amount of time to wait, in msecs.

a t
U28
w
U53

1 If the value was passed in a variable, it won't be returned enclosed in MIL_TEXT().

The following InquireType parameter settings can be specified for an Industrial Communication context allocated to communicate with a robot controller.

function map For an Industrial Communication context for use with a robot controller
Click to summarize
InquireType
Description MIL system-specific
tooltip (‡)
UserVarPtr
- Possible values returned
Click to summarize M_COM_REMOTE_ADDRESS +

Inquires the IP address of the robot controller. SET SET

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: array of type MIL_TEXT_CHAR [optionally, in C++: MIL_STRING ] MORE
a t
U28
w
U53
Click to summarize MIL_TEXT("n.n.n.n") 1

Specifies the IP address of the robot controller.

a t
U28
w
U53
Click to summarize M_COM_REMOTE_PORT

Inquires the port on the robot controller to use to communicate with it. SET SET

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a t
U28
w
U53
Click to summarize Value > 0

Specifies the port on the robot controller.

a t
U28
w
U53
Click to summarize M_COM_ROBOT_CONNECT_RETRY

Inquires the maximum number of times to attempt to reconnect to the robot controller. SET

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a t
U28
w
U53
Click to summarize Value

Specifies the maximum number of times to attempt to reconnect.

a t
U28
w
U53
Click to summarize M_COM_ROBOT_CONNECT_RETRY_WAIT

Inquires the amount of time to wait between attempts to connect to the robot-controller. SET

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a t
U28
w
U53
Click to summarize Value

Specifies the amount of time to wait, in msecs.

a t
U28
w
U53
Click to summarize M_COM_ROBOT_ISCONNECTED

Inquires whether the robot controller is connected.

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_BOOL
a t
U28
w
U53
Click to summarize M_FALSE

Specifies the robot controller is not connected.

a t
U28
w
U53
Click to summarize M_TRUE

Specifies the robot controller is connected.

a t
U28
w
U53

1 If the value was passed in a variable, it won't be returned enclosed in MIL_TEXT().

You can add the following value to the above-mentioned values to get the string's length.

function map For getting the string size
Click to summarizeInquireType Description MIL system-specific
tooltip (‡)
UserVarPtr
- Possible values returned
Click to summarize M_STRING_SIZE

Retrieves the length of the string, including the terminating null character ("\0").

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a t
U28
w
U53

The following InquireType parameter settings can be specified for an Industrial Communication context allocated to communicate using the PROFINET protocol (McomAlloc() with M_COM_PROTOCOL_PROFINET).

function map For an Industrial Communication context for use with a PROFINET device
Click to summarize
InquireType
Description MIL system-specific
tooltip (‡)
UserVarPtr
- Possible values returned
Click to summarize M_COM_PROFINET_GET_MODULE_INSIZE +

Inquires the amount of memory that the PROFINET controller expects to be allocated to the module in local memory, which can be used to send input data to the controller (for example, a PLC). The expected module's size can be modified using the Siemens Totally Integrated Automation (TIA) portal of the controller.

Note that if the PROFINET controller is not currently connected, the module's last known size is returned.


You must specify a combination value from the following table:
(summarize)
a t
U28
w
U53
MIL system specific

Note that the Host system is only supported on the Matrox 4Sight GPm and EV6 platforms. Support for the Matrox 4Sight EV6 platform requires driver update 93.

a
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a t
U28
w
U53
Click to summarize Value

Specifies the expected input module's size, in bytes.

a t
U28
w
U53
Click to summarize M_COM_PROFINET_GET_MODULE_OUTSIZE +

Inquires the amount of memory that the PROFINET controller expects to be allocated to the module in local memory, to which the controller can write. The expected module's size can be modified using the Siemens Totally Integrated Automation (TIA) portal of the controller.

Note that if the PROFINET controller is not currently connected, the module's last known size is returned.


You must specify a combination value from the following table:
(summarize)
a t
U28
w
U53
MIL system specific

Note that the Host system is only supported on the Matrox 4Sight GPm and EV6 platforms. Support for the Matrox 4Sight EV6 platform requires driver update 93.

a
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a t
U28
w
U53
Click to summarize Value

Specifies the expected output module's size, in bytes.

a t
U28
w
U53
Click to summarize M_COM_PROFINET_GET_PLC_STATE

Inquires the state of the PROFINET controller (PLC) connected to the local computer. The inquired controller state is the state as of the last alarm transfer cycle.

(summarize)
a t
U28
w
U53
MIL system specific

Note that the Host system is only supported on the Matrox 4Sight GPm and EV6 platforms. Support for the Matrox 4Sight EV6 platform requires driver update 93.

a
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a t
U28
w
U53
Click to summarize M_COM_PROFINET_STATUS_RUN +

Specifies that the PROFINET PLC is running.

a t
U28
w
U53
Click to summarize M_COM_PROFINET_STATUS_STOP +

Specifies that the PROFINET PLC has stopped.

a t
U28
w
U53
Combination values for M_COM_PROFINET_STATUS_RUN (when InquireType=M_COM_PROFINET_GET_PLC_STATE and UserVarPtr=M_COM_PROFINET_STATUS_RUN); M_COM_PROFINET_STATUS_STOP (when InquireType=M_COM_PROFINET_GET_PLC_STATE and UserVarPtr=M_COM_PROFINET_STATUS_STOP).

One of the following values might be combined with the above-mentioned values to specify in which redundant mode the PLC is running.

function map For a PROFINET PLC in a redundant mode
Click to summarize
Combination value
Description MIL system-specific
tooltip (‡)
Click to summarize M_COM_PROFINET_STATUS_BACKUP

Specifies that the PROFINET PLC, running in a redundant mode, is using the backup network channel.

(summarize)
a t
U28
w
U53
MIL system specific

Note that the Host system is only supported on the Matrox 4Sight GPm and EV6 platforms. Support for the Matrox 4Sight EV6 platform requires driver update 93.

a
Click to summarize M_COM_PROFINET_STATUS_PRIMARY

Specifies that the PROFINET PLC, running in a redundant mode, is using the primary network channel.

(summarize)
a t
U28
w
U53
MIL system specific

Note that the Host system is only supported on the Matrox 4Sight GPm and EV6 platforms. Support for the Matrox 4Sight EV6 platform requires driver update 93.

a

You must add the following value to the above-mentioned values to specify the module's index in the local computer.

function map To specify the module's index in a Matrox PROFINET automation device
Click to summarize
Combination value
Description MIL system-specific
tooltip (‡)
Click to summarize 0 <= Index <= 15

Specifies the module's index in the local computer.

(summarize)
a t
U28
w
U53
MIL system specific

Note that the Host system is only supported on the Matrox 4Sight GPm and EV6 platforms. Support for the Matrox 4Sight EV6 platform requires driver update 93.

a

The following InquireType parameter settings can be specified for an Industrial Communication context allocated to communicate using the EtherNet/IP protocol (McomAlloc() with M_COM_PROTOCOL_ETHERNETIP).

function map For an Industrial Communication context for use with a EtherNet/IP device
Click to summarize
InquireType
Description MIL system-specific
tooltip (‡)
UserVarPtr
- Possible values returned
Click to summarize M_COM_ETHERNETIP_CONFIG_SIZE

Inquires the amount of memory that is allocated to the configuration assembly in local memory, from which the controller can read EtherNet/IP configuration data that you have written about the local computer.

Note that the size of this assembly can be changed using the MILConfig utility. The controller must be configured to recognize this size.

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a t
U28
w
U53
Click to summarize Value

Specifies the size of the configuration assembly, in bytes.

a t
U28
w
U53
Click to summarize M_COM_ETHERNETIP_CONSUMER_SIZE

Inquires the amount of memory that is allocated to the consumer assembly in local memory, to which the controller can write.

Note that the size of this assembly can be changed using the MILConfig utility. The controller must be configured to recognize this size.

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a t
U28
w
U53
Click to summarize Value

Specifies the size of the consumer assembly, in bytes.

a t
U28
w
U53
Click to summarize M_COM_ETHERNETIP_PRODUCER_SIZE

Inquires the amount of memory that is allocated to the producer assembly in local memory, from which the controller can read.

Note that the size of this assembly can be changed using the MILConfig utility. The controller must be configured to recognize this size.

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a t
U28
w
U53
Click to summarize Value

Specifies the size of the producer assembly, in bytes.

a t
U28
w
U53

The following InquireType parameter settings can be specified for an Industrial Communication context allocated to communicate using the CC-Link IE Field Basic protocol (McomAlloc() with M_COM_PROTOCOL_CCLINK).

function map For an Industrial Communication context for use with a CC-Link IE Field Basic device
Click to summarize
InquireType
Description MIL system-specific
tooltip (‡)
UserVarPtr
- Possible values returned
Click to summarize M_COM_CCLINK_TOTAL_OCCUPIED_STATION

Inquires the number of stations occupied by the CC-Link IE Field Basic protocol instance. This determines the size of the register and flag data tables available for the controller to read from and write to. For each station, there are 32 input registers, 32 output registers, 64 input flags, and 64 output flags.

Note that the number of stations occupied by the protocol instance can be changed using the MILConfig utility. The controller must be configured to make this number of stations available.

(summarize)
a t
U28
w
U53
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
a t
U28
w
U53
Click to summarize Value

Specifies the number of stations.

a t
U28
w
U53
Return value
The returned value is the requested information, cast to a MIL_INT. If the requested information does not fit into a MIL_INT, this function will return M_NULL or truncate the information.
Compilation information
Header Include mil.h.
Library Use mil.lib; milcom.lib.
DLL Requires mil.dll; milcom.dll.
OWNER SYSTEM DEFAULT HOST COM DEVICE DESCRIPTION DEFAULT" COM GET CONNECTION STATE FALSE TRUE COM INIT VALUE DEFAULT COM NO CONNECT COM IS HARDWARE FALSE TRUE COM PROTOCOL TYPE COM PROTOCOL ABB COM PROTOCOL CCLINK COM PROTOCOL DENSO COM PROTOCOL EPSON COM PROTOCOL ETHERNETIP COM PROTOCOL FANUC COM PROTOCOL KUKA COM PROTOCOL MODBUS COM PROTOCOL PROFINET COM PROTOCOL STAUBLI COM TIMEOUT COM REMOTE ADDRESS COM REMOTE PORT COM ROBOT CONNECT RETRY COM ROBOT CONNECT RETRY WAIT COM ROBOT ISCONNECTED FALSE TRUE STRING SIZE COM PROFINET GET MODULE INSIZE COM PROFINET GET MODULE OUTSIZE COM PROFINET GET PLC STATE COM PROFINET STATUS RUN COM PROFINET STATUS STOP COM PROFINET STATUS BACKUP COM PROFINET STATUS PRIMARY COM ETHERNETIP CONFIG SIZE COM ETHERNETIP CONSUMER SIZE COM ETHERNETIP PRODUCER SIZE COM CCLINK TOTAL OCCUPIED STATION COM PROTOCOL PROFINET COM PROTOCOL ETHERNETIP COM PROTOCOL MODBUS COM PROTOCOL CCLINK COM PROTOCOL PROFINET COM PROTOCOL ETHERNETIP COM PROTOCOL CCLINK