Jump to content

Multiple modbus communication


Recommended Posts

Hi all

I need some help in setting up a 485 Modbus communication.

I have several power meters with 485 outputs.

By using the communication example I can set up 1 meter and obtain the readings.

My problem is how do I communicate with all seven.

Do I need to set up a modbus configuration for all meters and if so what will be the network ID in each.

How do I initialise them, a single one is initialised with a power up bit after the com init block.

No matter what I do I seem to loose comms on the one that is running.

If someone has done this before I would appreciate some help.

Regards

Denis

Link to comment
Share on other sites

Thanks Joe

That explains why I stop communicating with one when I try to configure the second.

I cant really upload anything at the moment as all I have is the UNITRONICS example with some additional configurations.

I will attempt to do what you suggest and cycle the slave ID.

Regards

Denis

Link to comment
Share on other sites

Hi all

I need some help in setting up a 485 Modbus communication.

I have several power meters with 485 outputs.

By using the communication example I can set up 1 meter and obtain the readings.

My problem is how do I communicate with all seven.

Do I need to set up a modbus configuration for all meters and if so what will be the network ID in each.

How do I initialise them, a single one is initialised with a power up bit after the com init block.

No matter what I do I seem to loose comms on the one that is running.

If someone has done this before I would appreciate some help.

Regards

Denis

Dear Mr.Denis,

One MODBUS config. is enough and the network ID is same for all 7, if you connected it in daisy chain serial method with a single PLC.

Now just change the slave ID in the RHS Fn.Block. and fetch the data one after another from the slaves(Power meters.) simple.

Jerin.

Link to comment
Share on other sites

Thanks Jerin

I am just doing some testing with a single unit at present and I am able to communicate.

However when I add a second read function block with another slave address the communication stops.

Maybe this will be ok in the field when i have seven units.

I was just wondering how you would set up the net to only read from 1 unit at a time.

Do you set a bit and only reset after a successful scan?

The sample program is good but implimenting a second or third unit is causing problems.

Regards

Denis

Link to comment
Share on other sites

  • MVP 2014
Do you set a bit and only reset after a successful scan?

Which ever method you use to address multiple slaves, one thing is the the same - you do need to ensure that each Modbus function is complete before starting the next.

The "standard" method is to use the "Function in Progress" MB that gets linked to the Modbus Config block. This bit will stay on while a function is in progress, so you can use the "off" state of this bit (via normally closed contact) to enable the next function.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...