Jump to content

Reading 4 meters with MODBUS RS485


JOTA

Recommended Posts

 

Hello Unistream users:

 

This is my issue today. I am using a USP-156-B10 to control a pump station. This pump station has 3 electric motors. Each motor has a softstarter and a meter. A wiring configuration is shown below:

image.thumb.png.e4b436900dc0a877ceda34f88df6f53d.png

 

I need to read this devices. It is critical to me to read voltage at motor start and at motor stopping, and also to record motor amperes. Motor amperes samples can be read at rate of one sample every minute. But Voltage is critical. This is because this pump station is for agriculture purposes and power quality in rural zones is not so good.

This is how I have setup my communications in UNILOGIC:

image.thumb.png.15aca41322d0b9ea84180d9b77e7c79f.png

Please note Delay time:

This is how each meter is setup:

image.thumb.png.1cd6d8708572c322d899d770a41eb6d2.png

In order to avoid communication crashes I created a cycle that reads each device every second. So, in order to read Meter 1, M1 coil should be on, then M2, M3, M4 and then it starts again. Ladder is as follows:

image.thumb.png.ba00268ebe5da6e5c0e33ca890639e61.png

image.thumb.png.8bc23047094036b5caa89e4e23f6ca50.png

 

My problem is that I can´t read devices at the time. Most of the time, readings are crashed or takes too long to read. 

I know I do have readings, and readings are correct. But problem is when I need to read all devices together. 

Please help, and sorry any misspelling word on my text. 

 

Joaquin

Link to comment
Share on other sites

  • MVP 2023

Hi.

In my opinion, if you need almost instantaneous control of current or voltage and all frequency converters and control panel are installed in one cabinet - it is best to use analog outputs of frequency converters and analog inputs in the PLC.

There is at least one analog output on the frequency converter - you can probably program the voltage or current there.

If you still need to do it online - Ethernet or CANopen are standard and quick solutions.

In Unitronics you can also make a hybrid decision - read information about analog inputs value (voltage on VFD analog output) using the Ethernet extension URB-TCP.

 

P.S. We must state the fact that the Modbus through the two-wire RS485 line is quite slow and at the same time can not work at maximum speed in conditions of interference from the VFD inverter.

Link to comment
Share on other sites

Hello Kratmel. Thank you very much for your answer. 

It is a good idea to use the analog output of the Soft Starter, however, the equipment only has 1 analog output and I need to read a 3 phase current. A Meter will give me that information and something else. 

Reading in your post, you assure Modbus two wire RS485 line is quite slow. So I would like to focus on that quote. Is there any parameter in my configuration that could get a better reading? 

What about the Delay time at the Main configuration? This parameter should be set at a lower time? i.e. 500ms or 200 ms?

Thanks again to the community and help of anyone.

 

Joaquin

 

 

Link to comment
Share on other sites

  • MVP 2023

To solve your problem, you need to determine if the polling speed of one meter is sufficient (that is, if you connect only one).

If so, you can add three more RS485 modules to your PLC and communicate with all of them at the same time.

This is how a slightly different problem was solved in this way. But this is probably the only way in your case.

 

 

Link to comment
Share on other sites

Hello Kratmel:

 

The answer is YES, I can read 1 meter. As a matter of fact, I can read up to 2 devices, but when I connect the 3rd DROP REGISTER starts to increase. Below are some images that shows reading:

image.jpeg.886fb96f284e5e344b446918523ab5f0.jpeg

The mark in red M1 is showing voltage reading. Data is taken from meter 1. 

The Mark in read M2 is showing motor amperes. Data is taken from meter 2. 

image.jpeg.3e67c6ce3bc119dd1098d0945ff95e0a.jpeg

The image above shows Motor amp reading from Meter 2. 

I read the post you send me and I rescue from there the following:

  • "Thanks for your help, I posted my problem in the visilogic forum where I have 9 modbus rs485 slaves and with only one port I was able to convincingly connect up to 3 slaves. each slave has a timeout of 100 millisec to go to network failure" (This is telling me something)
  • "I think I lack knowledge to have a fast 485 network (with 9 slaves)" (I believe this too)

Link to comment
Share on other sites

  • MVP 2023

Hi,

as I thought - the addresses of the registers you need to read are nearby. I don't know if your meter supports sequential reading of a number of registers by one command. Therefore, I advise you to try to use an array of registers instead of one in the Unistream settings - for example 3 in the voltage read command.

If you manage to perform such a trick, you will need significantly fewer consecutive commands from all devices to read your parameters.

Probably faster to transfer a lot of apples in the basket than to send them one by one.

Link to comment
Share on other sites

  • MVP 2023

Hi,

In Unilogic you can download an example from Unitronics and find the Communication folder. Please use the aperiodic Modbus master as an example.

You can find a bit array in a tag, but you can also create a tag with the required array of voltage or current variables. As I saw from your photos, you read each variable at a separate address. Which at low transmission speeds significantly slows down the process.

The Modbus communication standard provides the ability to read many variables whose addresses are sequentially starting from a specific specified starting address. Unfortunately, I do not have a device similar to your device to try to do. Maybe someone from the forum tried to do it in Unistream.

I did things like that in Visilogic, but there was a slightly different approach to working with the Modbus network.

 

 

Link to comment
Share on other sites

Hello Kratmel:

The solution you suggest works!!!

THANK YOU VERY VERY VERY MUCH for your time, patience in reading and posting, for your help. Thank you very much for your help.

Now, some pictures:

 

image.jpeg.a0db24bb452154d0bc6b7d599e6fd54b.jpeg

 

 

image.jpeg.689611782e0dc20cd6f91c227ba15149.jpeg

I had same graphs for motor 12. Both trends work together, and that is what I was looking for. 

 

Thank you very very much..

 

Best regards!!!,

 

Joaquin 

Link to comment
Share on other sites

  • MVP 2023

Jota, there is no "solved" mechanism inherent in the forum.  But you can go back to your original post and change the heading. 

Marking an issue as solved does make the forum easier to use, but lots of people don't do such a thing.   And sometimes it doesn't hurt to learn a host of things going along the road to the solution.

cheers, Aus

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...