Configuration interface
Configuration interface is exposed on Ethernet/IP service XML-RPC server, port 40000.
add_configuration(Robot_to_PLC_inst_id, Robot_to_PLC_inst_size, PLC_to_Robot_inst_id, PLC_to_Robot_inst_size)
Function creates one input, and one output instances that typically forms a Ethernet/IP connection object.
After function is called, external Ethernet/IP Scanner (on PLC, or CNC machine) can use new connection. Some PLCs require connection object to be defined in EDS (Electronic Data Sheet) file. Separate guide is available on request explaining how to add custom connections, and assemblies to existing Universal Robots EDS file.
Universal Robots built-in instances 100, and 112 cannot be overwritten. Attempt to configure those instances will result in an error.
Parameters
Robot_to_PLC_inst_id:
An integer, unique Robot→PLC instance ID.
Robot_to_PLC_inst_size:
An integer, Robot→PLC instance data size in bytes.
PLC_to_Robot_inst_id:
An integer, unique PLC→Robot instance ID.
PLC_to_Robot_inst_size:
An integer, PLC→Robot instance data size in bytes.
Returns
True:
If new assembly was created, or identical one already exists.False:
If one of the instances already exists, or parameter error.
Example command 1 (called from URCap code):
Refer to Flexible Ethernet/IP example URCap on Universal-Robots github
Example command 2 (called from URScript):
global eip_handle=rpc_factory("xmlrpc", "http://127.0.0.1:40000/RPC2")
global result = eip_handle.add_configuration(101, 88, 111, 44)
eip_handle.closeXMLRPCClientConnection()
# pause for 1s while Ethernet/IP service is configuring data exchange files for new instances
sleep(1)
Assembly with input and output instances is created in backend service.
is_instance_connected(PLC_to_Robot_inst_id)
Function checks if the given instance id has a connection.
The current implementation only checks for instance id for PLC_to_Robot.
Parameters
PLC_to_Robot_inst_id:
An integer, unique PLC→Robot instance ID.
Returns
True:
If the given instance id is connected.False:
If the given instance id is either not connected or not created.