Jump to content

4 sockets 1 port - modbus tcp


Recommended Posts

  • External Moderators

Greetings all,

I've got a system with a V280 and 4 devices communicating over modbus TCP. Each requires a TCP connect, so each has it's own socket init, it's own IP Config block, it's own modbus busy bit.

I'm trying to optimize the communication traffic pattern. In CanOpen, the PDOs are buffered, and comms are handled at the chip level. The socket arrangment in Modbus TCP seems to bear some resemblance to this.

So here's a question:

If I were to send a PHR message on all four sockets within the same ladder scan, what would happen?

1. The socket traffic is independent and buffered in OS/hardware, ala CanOpen. Concurrent messages are not an issue.

2. The first message gets through and the rest get dumped.

3. Strange behavior and error messages.

4. V280 screen displays "Self-Destruct Sequence Initiated". Evacuate immediately.

Thanks,

TM

Link to comment
Share on other sites

Hi Tim,

All four socket are fully independent so you can think of it like you are using 4 independent com ports.

As each socket is independent so you can send all 4 messages at the same time (each message in each socket).

Note that for sending the next message on the same socket, you need to check the busy bit of the relevant MODBUS CONFIG.

Link to comment
Share on other sites

Greetings all,

I've got a system with a V280 and 4 devices communicating over modbus TCP. Each requires a TCP connect, so each has it's own socket init, it's own IP Config block, it's own modbus busy bit.

I'm trying to optimize the communication traffic pattern. In CanOpen, the PDOs are buffered, and comms are handled at the chip level. The socket arrangment in Modbus TCP seems to bear some resemblance to this.

So here's a question:

If I were to send a PHR message on all four sockets within the same ladder scan, what would happen?

1. The socket traffic is independent and buffered in OS/hardware, ala CanOpen. Concurrent messages are not an issue.

2. The first message gets through and the rest get dumped.

3. Strange behavior and error messages.

4. V280 screen displays "Self-Destruct Sequence Initiated". Evacuate immediately.

Thanks,

TM

Hi Tim,

I've got a handful of applications running that do exactly just what you are talking about. As long as each device has it's own socket, it treats them all like separate ports.

Without any artificial time delays built in, and working purely off handshaking, I have found that I can cyclicly both send and receive 10 ML's between four separate slaves in around a 12.5ms full cycle on a V570.

You can discount options 2,3, and 4 on your list, as if any were true i would be in serious trouble right now.

D

Link to comment
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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.