1/7/2016 12:01 PM | |
Joined: 3/17/2015 Last visit: 12/3/2024 Posts: 15 Rating:
|
Hello, I want to connect several (eg. two) ethernet devices to the PLC (CPU - 314C-2 PN/DP). I wrote some program, but when one connection is established the second coudn't be established and i can't receive date from two devices at the same time. The problems doesn't appear when one device established connection (no matter which).
In OB1, I call FB1 and FB2 (which are identical, previously there was one FB1 and I call it twice). FB1 and FB2 have instance DB1 and DB2. In DB67 I have a 4 structure with connection parameter for 4 devices ( LPR-DHP = Long Range, Highly-Precise Distance Measurements). LPR_0 ==> number_device = 0, connection_id = 1 IP:10.1.1.151 LPR_0 ==> number_device = 1, connection_id = 2 IP: 10.1.1.152 LPR_0 ==> number_device = 2, connection_id = 3 LPR_0 ==> number_device = 3, connection_id = 4 In FB1 (and FB2) I calculate the connection_id (based on number_device) and with structure with connection parameter i should use. I would like to have one FB1 (but it didnt work) so i create FB2 but it doesn't work to. Source of information: https://support.industry.siemens.com/cs/document/29737950/how-do-you-program-the-communication-blocks-fb63-tsend-fb64-trcv-fb65-tcon-and-fb66-tdiscon-in-order-to-use-the-tcp-protocol-for-data-exchange-by-means-of-the-integrated-profinet-interface-of-an-s7-300-s7-400-cpu?dti=0&lc=en-WW
AttachmentLpr_1dhp.zip (129 Downloads) |
Last edited by: Wasd at: 1/7/2016 12:01:41 PM |
|
1/7/2016 1:29 PM | |
Joined: 3/5/2014 Last visit: 8/5/2022 Posts: 5521 Rating:
|
what is the status-word showing while error-bit is true? |
FCK WAR! |
|
Follow us on