Industry Online Support
Technical Forum
10/9/2014 7:38 PM | |
Posts: 2 Rating:
|
Dear all, We have a CPU315-2PN/DP rack and we want this CPU to communicate with a Saia PCD3 (M3330 or equal) PLC using Modbus TCP/IP. The first ethernet port on the CPU is already in use and connected to a SCADA PC running winCC ( TCP/IP protocol). So we want to use the second port for the modbus tcp/ip communication. ( possible?) The CPU315-2PN/DP project was migrated from TIA V12 To TIA V13 (update4), so i was able to use the most recent Modbus_PN instruction. I inserted the instruction in OB100 and OB1 and configured it with the help of the manual: http://cache.automation.siemens.com/dnl/TY/TY1ODE4ODcA_22660304_FAQ/ModbusTCPPNCPU_en.pdf I configured the CPU315 ( modbus server) as follows using the MB_PN_PARAM DB: connection ID: 1 connection type: B#16#11 active connection est.: FALSE local device id: B#16#2 local_tsap_id_len: 2 ( passive connection) rem_staddr_len: 0 (passive connection) local_tsap_id: (502) [1]: B#16#01 [2]: B#16#F6 rem_tsip_id: : (502) [1]: B#16#01 [2]: B#16#F6 next-staddr: B#16#0 ( use of integrated PN interface) server_client: TRUE (S7 is server) single_write = FALSE data area: DB303 containing two WORDS mapped to holding register adress 0 & holding register adress 1 We don't manage to read out something from the CPU315 on the SAIA side and the the modbus function in the CPU 315 keeps returning the following status "A003" => "A DB on which MODBUS adresses are to be mapped is too short ( S7 = server: incorrect adress range in the client request message). Meanwhile the 'connection established bit stays false. The modbus client function on the Saia PCD3 plc is configured using following manuals: http://ely.pg.gda.pl/~lkuczkowski/PCD_Manual/26-866_EN_Manual_Modbus.pdf http://ely.pg.gda.pl/~lkuczkowski/PCD_Manual/Getting%20started%20with%20Modbus.pdf It uses three simple functions to set up the communication and we were able to set up a communiction between two Saia PLC's already using the instructions in those manuals. What i fiend strange is that it seems like the saia instructions do use the unit identifier to adres the connection partner while it isn't actualy neccesarry in this apllication. Maybe that could be the problem? Also our CPU is not yet licenced for the modbus_pn instruction so we have the error in our diagnostic buffer with SF LED flashing. Are we able to test the connection without licence? The manual for the MODBUS_PN instruction says to insert the function in OB100 and a cyclic OB, do they have to be parametrized with the same parameters in both OB100 and cyclic OB? Because in the example projects (TIA V12) i saw some parameters only be filled in in OB100 while others being filled in in the cyclic OB (OB1). I hope someone with a little more experience on this subject can maybe aswer these questions or give me a push in the right direction. Thanks in advance |
10/10/2014 9:24 AM | |
Joined: 10/21/2011 Last visit: 7/15/2021 Posts: 57 Rating:
|
Hi, yes, you can use the function blocks without a license. As you already stated the error A003 means that a DBon which MODBUS adresses are to be mapped is too short. How long is you DB303? According to the manual your DB303 for the twoholding registermust be at least For registers: ( end - start + 1 ) * 2 + 2 => (1-0 +1) *2 +2 = 6 bytes long. If your DB is shorter than that you will get the error A003. If there is an error during the initialisation the connection will not be established. The ID and DB_PARAM parameters are int parameters. That means that these two have to be wired in OB100. Theremainingparameters are runtime parameters. |
Follow us on