background image

 
 

USER MANUAL 

Z-KEY-P 

MODBUS TO PROFINET IO GATEWAY 

 

 

 

SENECA S.r.l. 

Via Austria 26 – 35127 – Z.I. - PADOVA (PD) -  ITALY  

Tel. +39.049.8705355 – 8705355  Fax +39 049.8706287 

www.seneca.it 

Introduction 

The content of this documentation refers to products and technologies described in it. 
All technical data contained in the document may be changed without notice. 
The content of this documentation is subject to periodic review. 
To use the product safely and effectively, read the following instructions carefully before use. 
The  product  must be used  only  for  the  use  for  which  it  was  designed and  manufactured: any  other  use  is 
under the full responsibility of the user. 
Installation,  programming  and  set-up  are  allowed  only  to  authorized,  physically  and  intellectually  suitable 
operators. 
Set-up must be performed only after correct installation and the user must follow all the operations described 
in the installation manual carefully. 
Seneca is not responsible for failures, breakages and accidents caused by ignorance or failure to apply the 
stated requirements. 
Seneca is not responsible for any unauthorized modifications. 
Seneca reserves the right to modify the device, for any commercial or construction requirement, without the 
obligation to promptly update the reference manuals. 
No liability for the contents of this document can be accepted. 
Use the concepts, examples and other content at your own risk. 
There  may  be  errors  and  inaccuracies  in  this  document  that  could  damage  your  system,  so  proceed  with 
caution, the author(s) will not take responsibility for it. 
Technical specifications are subject to change without notice. 
 

CONTACT US

 

 

Technical support 

[email protected]

  

Product information 

[email protected]

 

Summary of Contents for Z-KEY-P

Page 1: ...table operators Set up must be performed only after correct installation and the user must follow all the operations described in the installation manual carefully Seneca is not responsible for failures breakages and accidents caused by ignorance or failure to apply the stated requirements Seneca is not responsible for any unauthorized modifications Seneca reserves the right to modify the device f...

Page 2: ...I00572 1 EN Page 2 Document revisions DATE REVISION NOTES AUTHOR 19 05 2021 1 0 0 0 First revision MM 20 05 2021 1 0 0 1 Added Modbus TCP IP Server and Passthrough Chapter MM 07 06 2021 1 0 0 2 Added Z KEY 2ETH P and R KEY LT P MM This document is the property of SENECA srl Copies and reproduction are prohibited unless authorised ...

Page 3: ...SETUP SECTION 11 6 3 SAVING A CONFIGURATION ON A FILE 14 6 3 1 IMPORTING A CONFIGURATION FROM A FILE 15 6 3 2 TAG SETUP SECTION 15 6 4 FIRMWARE UPDATE SECTION 16 6 5 DATABASE UPDATE SECTION 16 6 6 MAPPING OF MODBUS TAGS ON PROFINET 17 7 SUPPORTED MODBUS COMMUNICATION PROTOCOLS 18 8 SUPPORTED MODBUS FUNCTION CODES 18 8 1 STEP BY STEP CONFIGURATION EXAMPLE OF THE DEVICE USING THE 9 WEBSERVER 19 STEP...

Page 4: ... if SENECA is well aware of these possible damages SENECA its subsidiaries affiliates group companies suppliers and distributors do not guarantee that the functions fully meet the customer s expectations or that the device firmware and software should have no errors or operate continuously DESCRIPTION 1 1 The products Z KEY P R KEY LT P Z KEY 2TH P autonomously read the registers of devices on a M...

Page 5: ...ation protocol Profinet IO Modbus TCP IP client Factory address Static address 192 168 90 101 RS485 RS232 SERIAL COMMUNICATION PORTS Number of ports 2 Type COM 1 RS485 port for IDC10 connector Terminal COM 2 RS485 RS232 port Baud rate From 1200 to 115200 bit s Protocol Modbus RTU master Modbus ASCII master Modbus TCP IP server USB COMMUNICATION PORT Number of ports 1 Type Driver Windows Linux Virt...

Page 6: ...RS232 terminal port Baud Rate From 1200 to 115200 bit s Protocol Modbus RTU master Modbus ASCII master USB COMMUNICATION PORT Number of ports 1 Type Driver Windows Linux Virtual Com CDC standard Protocol Modbus RTU Slave Configuration Not modifiable 115200 bit s 8 bit No parità 1 stop bit station address 1 1 3 R KEY LT P COMMUNICATION PORT SPECIFICATIONS ETHERNET COMMUNICATION PORT Type 1x Etherne...

Page 7: ...Easy Setup 2 software In order to access the internal webserver it is necessary to put the device into webserver mode using the Easy Setup2 or Seneca Device Discovery software it is also possible to change the operating mode by pressing the side button following the procedure To force the webserver mode 1 Switch on the device 2 Hold down the PS1 button until all the LEDs flash quickly 3 Release th...

Page 8: ...ARCH FOR THE DEVICE Run the software and press the SCAN button the software will search for the Ethernet devices in the network Locate the device factory address 192 168 90 101 STEP 4 CHANGE OF IP ADDRESS Select the device and press the Assign IP button set a configuration compatible with your PC for instance Confirm with OK Now the device can be reached via Ethernet from your PC STEP 5 ACCESS TO ...

Page 9: ...r information on the access to the webserver of a new device please refer to chapter 0 ATTENTION THE WEB BROWSERS WHICH HAVE BEEN TESTED FOR COMPATIBILITY WITH THE DEVICE WEBSERVER ARE MOZILLA FIREFOX AND GOOGLE CHROME THEREFORE THE OPERATION WITH OTHER BROWSERS IS NOT GUARANTEED ATTENTION AFTER THE FIRST ACCESS CHANGE USER NAME AND PASSWORD IN ORDER TO PREVENT ACCESS TO THE DEVICE TO UNAUTHORIZED...

Page 10: ...t displays the values of the configured tags in real time Setup It is the section that allows the device basic configuration Setup Tag It is the section that allows adding modifying the tags that is the variables of the Modbus devices connected to the gateway Firmware Update It is the section that allows updating the firmware and database Database Update It is the section that allows updating the ...

Page 11: ...STATIC IP MASK default 255 255 255 0 Sets the mask for the IP network STATIC GATEWAY default 192 168 90 1 Sets the gateway address WORKING MODE Sets the operation mode currently only gateway mode is supported TCP IP PORT default 502 Sets the communication port for the Modbus TCP IP client protocol TCP IP TIMEOUT ms default 512 ms Sets the waiting time for a request to be considered in timeout PORT...

Page 12: ...or the COM 2 serial communication port PORT 2 STOP BIT default 1 only per Z KEY P and Z KEY 2ETH P Sets the number of stop bits for the COM 2 serial communication port PORT 2 TIMEOUT ms only per Z KEY P and Z KEY 2ETH P Sets the wait time before defining fail PORT 2 DELAY BETWEEN POLLS ms only per Z KEY P and Z KEY 2ETH P Waiting time before making a new serial request PORT 2 WRITING RETRIES defau...

Page 13: ... 10 ADDRESS Sets the IP address for max 10 remote TCP IP Modbus servers MODBUS TCP IP CLIENT TIMEOUT ms Sets the timeout for remote TCP IP Modbus servers MODBUS TCP IP CLIENT DELAY BETWEEEN POLLS ms Sets the waiting time between one call and the next of the TCP IP client ModBUS MODBUS TCP IP CLIENT WRITING ATTEMPTS Selects the number of writing attempts to be made on a remote TCP IP Modbus server ...

Page 14: ...REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 14 SAVING A CONFIGURATION ON A FILE 6 3 1 A configuration that includes CONFIGURATION TAG It can be saved to a file this way Go to the Setup section and select the file to save press the Save config button ...

Page 15: ...e of data that will be converted into Profinet IO Using the ADD button you can add a new tag Using the MODIFY button it is possible to modify an existing tag Using the DEL button it is possible to delete an existing tag GATEWAY TAG NAME It is the identifying name of the tag TARGET MODBUS DEVICE It represents the Seneca Modbus device selected from those available in the database In the case of a no...

Page 16: ...odic or Data change Periodic writing is carried out continuously with the set time interval Data Change writing occurs only if the tag changes its value Periodic or data Change combines the two previous modes TARGET MODBUS WRITE PERIODIC TIME s It represents the time interval in the case of TARGET MODBUS WRITE MODE of the TIMED type FIRMWARE UPDATE SECTION 6 5 In order to improve add optimize the ...

Page 17: ...ents the incremental number of the TAG a maximum of 500 tags are supported GATEWAY TAG NAME It is the mnemonic name of the TAG GATEWAY MODBUS START REGISTER It is the ModBUS address of the TAG in the internal memory of the device for future use TAG VALUE It represents the current value of the tag TAG READING STATUS It represents the status of the tag whether OK or FAIL TAG DATA TYPE It represents ...

Page 18: ...ervers For more information on these protocols see the website http www modbus org specs php SUPPORTED MODBUS FUNCTION CODES 8 1 The following Modbus functions are supported Read Coils function 1 Read Discrete Inputs function 2 Read Holding Registers function 3 Read Input Registers function 4 Write Single Coil function 5 Write Single Register function 6 Write multiple Coils function 15 Write Multi...

Page 19: ...2 In the example we will use the product Z KEY P the steps are quite similar for the other devices R KEY LT P and Z KEY 2ETH The 10 digital inputs of the Z 10 D IN are from coil address 1 to coil address 10 of slave 1 device The 10 digital outputs of the Z 10 D OUT are from coil address 1 to coil 10 of slave 2 device Now we use the Easy Setup 2 software and select Z KEY P We add the first input of...

Page 20: ... 1 EN Page 20 We duplicate the tag for all 10 inputs and modify the INPU2 INPUT3 etc resources Same operation for the 10 outputs of Z 10 D IN on slave addresss 2 and serial port 1 in order to obtain the following table We check that the configuration is correct in the configuration test We can now move on to the configuration of the PLC ...

Page 21: ... Doc MI00572 1 EN Page 21 STEP BY STEP CONFIGURATION EXAMPLE WITH A SIEMENS PLC THROUGH TIA PORTAL 16 9 1 Let s start the configuration on the TIA Portal Creating a new project Install the GSD file of the Seneca product Point to the directory where the file is and press OK then the list of GSD files in the folder will appear ...

Page 22: ...User Manual Z KEY P ALL RIGHTS RESERVED NO PART OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 22 Then import the Seneca gsd file Press install ...

Page 23: ...Y P ALL RIGHTS RESERVED NO PART OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 23 Now insert the Siemens PLC in our example a SIEMATIC S7 1200 click on Add new device ...

Page 24: ...ESERVED NO PART OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 24 Confirm and the PLC will be added to the rack Now click on the PLC and select Profinet interface Ethernet addresses ...

Page 25: ...HTS RESERVED NO PART OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 25 Set the IP you want for the PLC in this case 192 168 90 44 and the PLC subnet Move on to the network view ...

Page 26: ...D NO PART OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 26 On the right select Hardware Catalogue and then under Additional Field Equipment PROFINET IO GATEWAY Seneca SRL Z KEY P Gateway ...

Page 27: ...User Manual Z KEY P ALL RIGHTS RESERVED NO PART OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 27 Drag the device to the network view ...

Page 28: ...IGHTS RESERVED NO PART OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 28 Now associate it with the PLC Click with the left mouse button on Not assigned and then select the PLC ...

Page 29: ...CED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 29 Click twice on the Seneca device and configure the IP address here too for example 192 168 90 48 In Profinet the devices are identified by their name so right click on the Seneca device and select Assign device name ...

Page 30: ...P ALL RIGHTS RESERVED NO PART OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 30 Scan the network with Update list and set if necessary the device name with Assign name ...

Page 31: ...Page 31 In our Modbus configuration we have 10 read only tags the 10 inputs of the Z 10 D IN and 10 write tags the 10 outputs of the Z 10 D OUT Each boolean Tag in profinet is converted into a byte so we will need 10 bytes to read for the Z 10 D IN and 10 bytes to write for the Z 10 D OUT So drag a 10 byte array to read And 10 Bytes to write ...

Page 32: ...00572 1 EN Page 32 Now the devices are configured all that remains is to compile and send the configuration to the PLC The first icon compiles the second sends the project Before sending the project to the PLC select the Ethernet interface and start the search select the PLC and press Load Once the project has been sent RUN the PLC ...

Page 33: ...WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 33 Go ON Line so as to check if there are any errors If everything is correct you will get a green icon next to the Seneca device It is also possible to read and write the IO for debugging purposes directly from the TIA portal ...

Page 34: ... PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 34 Define the PLC tags directly in the standard tag table Add the variables related to the IO 10 digital inputs and 10 digital outputs The addresses are written here ...

Page 35: ...www seneca it Doc MI00572 1 EN Page 35 Therefore the bytes from IB1 to IB10 contain the 10 inputs the bytes from QB1 to QB10 the outputs Define the following table by hand set the output tags as writable After this operation define a new control table Click on Add new control table and then insert the variables ...

Page 36: ... OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 36 Since you have already defined them previously just select the ones we want to monitor from the list Once you have added all of them you will get ...

Page 37: ...d the project and go online with the PLC all operations seen previously Once online press the glasses icon to update the status of the variables Under the Control value column you can read the I O value in real time To control the outputs it is necessary to enter 1 or 0 in the Command value column and then press the icon with the lightning bolt to order the writing ...

Page 38: ...OUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 38 STEP BY STEP CONFIGURATION EXAMPLE WITH A CODESYS 3 5 PLC 9 2 In Codesys create a new standard project Configure the PLC by selecting it in the tree on the left and then browsing the network Select the PLC after scanning the network ...

Page 39: ...UBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 39 The PLC is now connected to the system Now that the PLC has been detected move on to insert a profinet port on standard Ethernet Right click on device and add device ...

Page 40: ...ART OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 40 Then add the Profinet IO Master Double click on Ethernet set the Ethernet port and the IP address of the PLC in this case use 192 168 90 44 ...

Page 41: ...ERMISSION www seneca it Doc MI00572 1 EN Page 41 Set also the address range for the Profinet peripheral double click on PN_Controller Now you need to connect the Seneca slave device PROFINET IO to the profinet master controller First install the GSD file of the Seneca IO Select Tools Device Repository ...

Page 42: ...CED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 42 Now import the GSD file selecting Profinet IO Slave Press Install Now point to the correct folder and press OK Select the file type as GSDML PROFINET IO configuration file Codesys has now added the GSD file correctly ...

Page 43: ...VED NO PART OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 43 First compile the project and log in to the PLC Now we have verified the correct functioning of the connection with the PLC ...

Page 44: ... ALL RIGHTS RESERVED NO PART OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 44 At this point add the Z KEY P device right click under PN Controller and choose Add Device ...

Page 45: ...User Manual Z KEY P ALL RIGHTS RESERVED NO PART OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 45 Then select the Z KEY P and press Add Device ...

Page 46: ...DUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 46 Click on the Z KEY P device and configure the ip address Now insert the configuration 10 bytes of reading for the Z 10 D IN and 10 bytes of writing for the Z 10 D OUT Right click on Z KEY P and select Add device ...

Page 47: ...User Manual Z KEY P ALL RIGHTS RESERVED NO PART OF THIS PUBLICATION MAY BE REPRODUCED WITHOUT PRIOR PERMISSION www seneca it Doc MI00572 1 EN Page 47 Add the 10 read bytes and the 10 write bytes ...

Page 48: ...annot manage the profinet at maximum speed so we modify the values by setting safety parameters Check that everything is correct by compiling and running the PLC Now see how it is possible to read and write the Modbus IO from IO Profinet To write and read the status of the IO you have to insert a few code lines under PRG In the program read the inputs from the IB3 address to the IB12 address as it...

Page 49: ... it Doc MI00572 1 EN Page 49 And write in the address from QB0 to QB9 as it is obtained from here Declare an 8 bit variable Byte for each of the 10 inputs and a bit variable Byte for each of the 10 outputs In the program instead read the inputs from IB3 to IB12 and write the outputs from QB0 to QB9 Go into login and start ...

Page 50: ...it Doc MI00572 1 EN Page 50 The value of the inputs outputs can be read here while to write the outputs you just need to set the value in the bytes in the prepared value column For example set all the outputs to 1 then confirm on Debug Write values And then with Write values all the outputs of the Z 10 D OUT are activated ...

Page 51: ...ific Bytes to obtain the status of the Modbus communication from Profinet so that the PLC can possibly perform some specific operations in case of fail If at least one ModBUS tag is in fail the Global diagnostic byte goes to 1 if all the tags are read correctly the byte goes to 0 It is also possible to obtain the status of the individual tags using the 8 tags Diagnostic read byte bytes Each bit re...

Page 52: ... from the device 5 Set all DIP switches to OFF 6 At the next restart the device will have loaded the factory configuration EXCEL TEMPLATE 12 In the case of entering many variables it is convenient to use the excel template downloadable from the Seneca website in the Z KEY P section It is possible to insert the tags and then export them to the device s webserver MODBUS TCP IP SERVER AND MODBUS PASS...

Reviews: