Profinet device interface configuration#
Interface description#
Refer to the DUCO CORE Hardware Manual for hardware interface descriptions.
The recommended Profinet data interaction period is 16ms, the Watchdog configuration is 5. The minimum Profinet data interaction period is 8ms.
script functions#
The robot provides corresponding script functions that can read or write the values of the data interface.
write_reg(number:num,number:type,val)
Function description:
This function modifies the value of the internal register.
Parameter description:
num: indicates the number of an internal register.
type: indicates that the register type 1 is a bool register, 2 is a word register, and 3 is a float register.
val: Specifies the val type based on the type type.
When type is 1, the val type is boolean,true is true, false is false, and num ranges from 1 to 64
When type is 2, the val type is number, the value ranges from 0 to 65535, and the value ranges from 1 to 32
When type is 3, the val type is number and num ranges from 1 to 32
The function does not change the internal register value when the argument is wrong.
Return value:
None
Example:
write_reg( 5, 1,true)
read_reg (number:num,number:type,number:in_out)
Function description:
This function reads the value of the internal register.
Parameter description:
num: internal bool Register number.
type: indicates that the register type 1 is a bool register, 2 is a word register, and 3 is a float register.
When type is 1, num ranges from 1 to 64.
When type is 2, num ranges from 1 to 32.
When type is 3, num ranges from 1 to 32.
The function does not change the internal register value when the argument is wrong.
in_out: 0 indicates that the input register is read, 1 indicates that the output register is read.
Return value:
When type is 1, the return value type is boolean, where true indicates true and false indicates false.
When type is 2, the return value is of type number and ranges from 0 to 65535.
When type is 3, the return value type is number.
Example:
Ret = read_reg,1,1 (10)
Configuration flow#
The following takes Siemens PLC as an example and uses TIA 14 software to briefly describe the configuration process of Profinet interface:
If you want to create a new project, click Create New Project. If you want to open an existing project, click Open Existing Project:
Click Open Project View:
Click “Install Device Description File (GSD)” in menu bar “Options” :
Select the path to the GSD file by clicking button 1 in the order of the following figure.
Select the two checkboxes to import GSDML-V2.35-siasunCobot-
IODevice-20200615.xml file, and finally click “Install” at 3.
Double click “Devices and Networks” and select “Hardware Catalog” in the leftmost column:
Double-click Other Field Devices ->PROFINET IO->I/O->siasun-cobot dev
“siasun-cobot Demo dev”, note that the version is just loaded
GSDML V2.35 - siasunCobot - IODevice - 20200615. The XML
As a Profinet Device, the configuration also requires the controller, which is shown in the figure above
Add the CPU1211C DC/DC/DC as the controller in the same way. Left click center The green box of one device does not loosen and then drag to the green box of another device to realize the device connection
Select a device and choose Properties >PROFINET Interface > Ethernet Address
Select Set IP address in the project, enter IP address and subnet mask, and add A device is configured in the same way.
On the siasun-cobot dev device, choose Properties >PROFINET Interface > Advanced Options > Real-time Settings >IO Cycle and select Manual Settings. The refresh time is 8ms
Click Device View.
Select the “siasun-cobot dev” device, double-click on different variable types of “Module” in different numbered slots to add modules:
The data type of each slot is shown in the following figure. For details, see below:
After adding, right-click controller, which is CPU1211C, and select “Download to Hardware Configuration for Device
Select PG/PC Interface Type, PG/PC Interface, and Interface/Subnet Connection
Then click “Start Search” (Note: The configuration computer running TIA needs to be connected with controller devices can be connected, for example, in the same network segment.
Select the controller device found (CPU 1121C in this case) and click Download:
Everything is fine, click “Download” and wait for the download to complete:
Click Finish and wait for startup:
Click Go Online. If there are no errors in the Diagnosis TAB, communication is normal.
Communication under normal conditions, all modules are “white checkmark on green background”