AlejandroNunes

NJ101 Modbus TCP/IP Server with few clients

2 posts in this topic

Hi everyone, I'm new here. Thank you all in advance for the help you can give me.

I have one machine with PLC Omron NJ101-9000, and this is Server in the Modbus communication.

In the attachments, you can find the function block I used to communicate with 1 client. This work OK and I don't have problems, but I need to communicate with 2 clients at the same time.

This block only admits one connection at a time. How I can connect 2 at a time? If I create 2 of these blocks, does each client need to connect to a different port? Do I need "open" this port in PLC configuration?

 

Thanks!

Modbus block.jpg

Share this post


Link to post
Share on other sites

You can do this but you'll need to "clone" the MTCP_Server block and change the port inside. Once this is done you make an instance of the original and an instance of the cloned block. The code itself is locked but you can cut and paste it pretty easily. I have done this when I needed to increase the data size of the served data.

Capture.JPG

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now