12/1/2022 11:57 PM | |
Joined: 1/5/2012 Last visit: 4/1/2024 Posts: 22 Rating: (0) |
Greetings, I am trying to create an outbound and an inbound TCP connection on 2 separate sockets (5000 out, 5001 in). Nominally this is for a connection with a Node-Red flow. I have also tried to test the same code between two S7-1212 CPU's (duplicated and inverted). When I go PLC to PLC,the outbound TCON fails with 16#80C5 on both sides. When I run the version to connect with the node red flow, I get a good outbound connection (as indicated in the "error" and in node red) but the inbound (TCON 2) fails with 16#80A2. This later version is the one i include here. Ive been looking in the forums, and documentation all day and trying different configurations with no luck. It acts like node red is hitting a firewall in the S7-1200. I thought however that the second TCON (port 5001) would open that. Either way I am at wits end. I need a bi-directional TCP connection somehow. It would be greatly appreciated if someone could take a look at my code and point out my error? Attachmentbench 1200 tcp 0.1.zip (811 Downloads) |
12/2/2022 3:28 PM | |
Joined: 1/5/2012 Last visit: 4/1/2024 Posts: 22 Rating: (0) |
Thanks for your attention on this. The original attached project is for the connection to Node Red (1 PLC, port 5000 (TCON_1) outgoing from PLC, port 5001 (TCON_2) incoming). To avoid confusion I will be addressing only the version attached that is supposed to talk to Node Red TCP. Here are screenshots of pretty much everything from the TCON code to the configuration to the result. This is the version that gives the status error 16#80A2 on the passive (incoming) port 5001. As for the active port (5000) that connects and transmits flawlessly to Node Red. Attachmenttcon.zip (690 Downloads) |
12/3/2022 2:26 PM | |
Joined: 1/5/2012 Last visit: 4/1/2024 Posts: 22 Rating: (0) |
Moving this to a new topic - "Open TCP with Node Red" |
12/3/2022 3:32 PM | |
Joined: 3/30/2020 Last visit: 11/18/2024 Posts: 4967 Rating: (1012) |
This is confusing. 2) The program you shared is incomplete.
Within the library is a template for TCP communication that has all the ins and outs. This may be of help to you quicker than a tutor session. Some hints:
|
Last edited by: qwazee at: 12/03/2022 15:39:14expanded text Activities of this user is voluntary. There is no obligation or liability placed on this user. Though optional, your 'please' and 'thank you' is highly valued. |
|
This contribution was helpful to1 thankful Users |
12/3/2022 4:05 PM | |
Joined: 1/5/2012 Last visit: 4/1/2024 Posts: 22 Rating: (0) |
Here is the 1212 to 1212 version of the project. Both listen on port 2000 and send on port 2000. Both fail the send to the other on error 16#80C4. This is what keeps me thinking its an issue in the 1200. Like there is a firewall blocking but I cant find any sort of setting to open the port for receiving.
Attachmentbench 1200 tcp 0.4 t-c.zip (811 Downloads) |
Follow us on