manowar

CJ1M+ETN21 Modbus TCP

4 posts in this topic

Hello.

I'm trying to use Omron ETN21 as master for ModbusTCP protocol.

I can communicate with 1 SLAVE UNIT (standard modbusTCP slave) using FB MTCP_ETN_Client.zip  from https://www.myomron.com/index.php?action=kb&article=1245.

It works perfectly.

But I have three SLAVE UNITS to communicate to.

I'm trying to do this using [524]Modbus_TCP_FB.zip sample.

I have copied SECTION1 to SECTION2 and changed IP number and SOCKET number.

But this doesn't work.

I would realy appriciate a working sample where OMRON PLC is MASTER for THREE (or more) SLAVES.

I'm attaching code file...

Thanks.

Best regards, Andrej.

Modbus_TCP_FB.cxp

Modbus_TCP_FB.opt

Share this post


Link to post
Share on other sites

Aside from changing the Socket Number and the IP Address, you also need to change the Function Block name for different connections.

So in the first section you had MUX1_Open FB. In the next section you need to give new name to the FB, e.g. MUX2_Open.

This also applies to the Send FB. Other than that I don't see why this is not possible, since I had previously used the same FBs for multiple devices with no problem

 

Share this post


Link to post
Share on other sites

Hello.

Thanks for answer.

By multiple devices you mean maximum of 8 devices?

This is the limit of available sockets.

If you can send me an example it would be a great help.

Thanks.

Best regards.

Share this post


Link to post
Share on other sites
On 1/7/2016 at 7:54 AM, manowar said:

Hello.

Thanks for answer.

By multiple devices you mean maximum of 8 devices?

This is the limit of available sockets.

If you can send me an example it would be a great help.

Thanks.

Best regards.

Hello, I try to establish the Modbus communication between a CJ1M+ETN21 and a gateway.
I tested the gateway using another program (kepserver driver).

In the CJ1M I use the FBs you use in this post but cant open the soket. Show error 49h.

In MUX1_Open I put:
1- Unit 0 (the ETN21 unit number)  
2- Soket 1
3- KeepAlive 1
4- TCP Port 502
5-  Gateway IP
6-  Gateway Port 502

Any idea about the possible problem....

Thanks for all.

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