Jump to content

Recommended Posts

Posted

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

  • MVP 2023
Posted

You can only talk to one at a time. You'll need to write some logic to change the slave ID of your modbus interface to cycle through the meters.

If you want you can upload your code with more of a functional description and we can get you started.

Joe T.

Posted

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

Posted

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.

Posted

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

  • MVP 2014
Posted
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.

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.