10/1/2020 10:52 AM | |
Joined: 4/26/2016 Last visit: 9/18/2023 Posts: 41 Rating: (0) |
Hello, Could you please help me? I have similar problem. I have 2 servers and CPU 315-2 PN/DP is the client. (1) Server1 = 192.168.1.100 (2)Server2 = 192.168.1.112 i am using one MODBUS_PARAM[DB2] where used "Connection_100" and "Connection_112" structure for modbus parameter servers with connection id 1 and 112, and saperate control instance DB CONTROL_DAT100[DB100] and CONTROL_DAT112[DB112] and saperate instance DB MODBUSPN_DB[DB70 and MODBUSPN_DB_112[DB72] I am callind MODBUSPN[FB70] for both server in the OB1 only. Server1 CALL MODBUSPN, "MODBUSPN_DB" id:="MODBUS_PARAM".Connection_100."connection Setting".id db_param := "MODBUS_PARAM" RECV_TIMEOUT:= "CONTROL_DAT100".RECV_TIME .....................................etc Server 2 CALL MODBUSPN, "MODBUSPN_DB_112" id:="MODBUS_PARAM".Connection_112."connection Setting".id db_param := "MODBUS_PARAM" RECV_TIMEOUT:= "CONTROL_DAT112".RECV_TIME .....................etc If i start reading data from only first server with rising edge of ENQ_ENR it works fine. But if i start second both starts giving error first gives an error code A009. all time single modbus connection works fine for me. Thanks Vishnu ------------------------------------------------------------------------------------------ |
Last edited by: Jen_Moderator at: 10/01/2020 12:45:11New subject after splitting |
|
10/2/2020 1:08 PM | |
Joined: 4/26/2016 Last visit: 9/18/2023 Posts: 41 Rating: (0) |
Hi, What about local_device_id and local_tsap_ip_len? Should it not be blank? Thanks Vishnu |
10/5/2020 9:32 AM | |
Joined: 4/26/2016 Last visit: 9/18/2023 Posts: 41 Rating: (0) |
Dear Sir, i tried as you suggested. But still have same problem. i have attached my full project for your reference. Thanks AttachmentLCPCComp_ModBus_DATA6_SingleMBTest.zip (454 Downloads) |
10/6/2020 12:03 PM | |
Joined: 4/26/2016 Last visit: 9/18/2023 Posts: 41 Rating: (0) |
Dear sir, I have used all Modbus call and declaration in "MODBISControl(FC6)" for both TCP connection and This FC6 has been called in the OB1. Network 1 is call for modbus device IP address :- 192.168.1.100 Network 2 is call for modbus device IP address :- 192.168.1.112 Is it ok to call all modbus call in OB1/ Thanks AttachmentMODBUSControl_FC6.pdf (442 Downloads) |
10/9/2020 1:43 PM | |
Joined: 4/26/2016 Last visit: 9/18/2023 Posts: 41 Rating: (0) |
How to change the block version? Thanks |
10/16/2020 8:54 AM | |
Joined: 10/3/2008 Last visit: 5/22/2024 Posts: 957 Rating: (123)
|
For writing you must only change the runtime parameter WRITE_READ to TRUE. Change also the runtime parameters START_ADDRESS and LENGTH and set ENQ_ENR to TRUE. You don't need an additional modbus block instance for writing. You can use 1 modbus block for reading and writing to the same communication partner. In the parameter datablock you parameterize in which datablock the modbus register should be mapped. |
Last edited by: Wüstenräuber at: 10/16/2020 08:55:23Last edited by: Wüstenräuber at: 10/16/2020 08:56:06 |
|
Follow us on