MIL_ID SysId, | //in |
MIL_INT64 ProtocolType, | //in |
MIL_CONST_TEXT_PTR DeviceDescription, | //in |
MIL_INT64 InitFlag, | //in |
MIL_INT64 InitValue, | //in |
MIL_ID *ComIdPtr | //out |
This function allocates an Industrial Communication context on the specified system. An Industrial Communication context allows you to communicate with a robot controller, with a generic controller that uses the specified industrial protocol (PROFINET, Modbus, EtherNet/IP, or CC-Link IE Field Basic), or with a slave Modbus automation device.
For a context allocated to communicate using the PROFINET, Modbus, EtherNet/IP, or CC-Link IE Field Basic protocol, a connection with the controller (or device) is established upon allocation of the context. As such, the protocol service must have been enabled and configured in MILConfig prior to allocating the context.
For a context allocated to communicate with a robot controller, you can choose to set the InitFlag parameter to M_COM_NO_CONNECT so that you do not connect automatically upon allocation. If this option is chosen, you must use McomControl() with M_COM_ROBOT_CONNECT to manually establish the connection with the robot controller.
This function is only available if you have the MIL Industrial Communication package, or another relevant update installed.
Specifies the system on which to allocate the Industrial Communication context. This parameter should be set to one of the following values:
For specifying the system
|
|||||||||||||||||||||||||||||||||||||||
Value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
M_DEFAULT_HOST |
Specifies the default Host system of the current MIL application. |
‡ | a | t U28 |
w U53 |
||||||||||||||||||||||||||||||||||
MIL system identifier |
Specifies a valid system identifier, previously allocated using MsysAlloc(). |
‡ | a | t U28 |
w U53 |
Specifies the type of protocol to use.
For specifying the type of protocol
|
|||||||||||||||||||||||||||||||||||||||
Value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
M_COM_PROTOCOL_ABB |
Specifies an ABB robot controller protocol. |
‡ | a | t U28 |
w U53 |
||||||||||||||||||||||||||||||||||
M_COM_PROTOCOL_CCLINK |
Specifies a CC-Link IE Field Basic protocol. |
‡ | a | t U28 |
w U53 |
||||||||||||||||||||||||||||||||||
M_COM_PROTOCOL_DENSO |
Specifies a DENSO robot controller protocol. |
‡ | a | t U28 |
w U53 |
||||||||||||||||||||||||||||||||||
M_COM_PROTOCOL_EPSON |
Specifies an Epson robot controller protocol. |
‡ | a | t U28 |
w U53 |
||||||||||||||||||||||||||||||||||
M_COM_PROTOCOL_ETHERNETIP |
Specifies an Ethernet/IP protocol. |
‡ | a | t U28 |
w U53 |
||||||||||||||||||||||||||||||||||
M_COM_PROTOCOL_FANUC |
Specifies a Fanuc robot controller protocol. |
‡ | a | t U28 |
w U53 |
||||||||||||||||||||||||||||||||||
M_COM_PROTOCOL_KUKA |
Specifies a KUKA robot controller protocol. |
‡ | a | t U28 |
w U53 |
||||||||||||||||||||||||||||||||||
M_COM_PROTOCOL_MODBUS |
Specifies a Modbus protocol. |
‡ | a | t U28 |
w U53 |
||||||||||||||||||||||||||||||||||
M_COM_PROTOCOL_PROFINET |
Specifies a PROFINET protocol. (summarize)Specifies a PROFINET protocol. (more details...) |
‡ | 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 | |||||||||||||||||||||||||||||||||||||
M_COM_PROTOCOL_STAUBLI |
Specifies a Staubli robot controller protocol. |
‡ | a | t U28 |
w U53 |
Specifies the description of the device with which to communicate. This parameter must be set to the following:
For describing the device
|
|||||||||||||||||||||||||||||||||||||||
Value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
MIL_TEXT("M_DEFAULT") 1 |
Specifies to communicate with the default device described in MILConfig that uses the specified protocol. If the protocol selected in the ProtocolType parameter is not enabled in the MILConfig utility (for the non-robot controller types of Industrial Communication contexts), an error is returned. (summarize)Specifies to communicate with the default device described in MILConfig that uses the specified protocol. (more details...) |
‡ | a | t U28 |
w U53 |
||||||||||||||||||||||||||||||||||
MIL_TEXT("IPOrName:Port") 1 |
Specifies the IP address and port on the robot controller to use to communicate with it. The MIL Industrial Communication module supports IPv4 addresses. A typical IPv4 string has the format n.n.n.n, where n is a number between 0 and 255. INQ(summarize)Specifies the IP address and port on the robot controller to use to communicate with it. INQ (more details...) |
‡ | a | t U28 |
w U53 |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
Specifies how to initialize the Industrial Communication context.
For specifying the type of
initialization
|
|||||||||||||||||||||||||||||||||||||||
Value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default behavior. This is the only possible setting when allocating a context to communicate with a non-robot controller device. (summarize)Specifies the default behavior. (more details...) |
‡ | a | t U28 |
w U53 |
||||||||||||||||||||||||||||||||||
M_COM_NO_CONNECT |
Specifies not to automatically connect to the robot controller. |
‡ | a | t U28 |
w U53 |
Header | Include mil.h. |
Library | Use mil.lib; milcom.lib. |
DLL | Requires mil.dll; milcom.dll. |