AdvancedHMI Software
General Category => Support Questions => Topic started by: AndrejusZ on August 02, 2021, 11:16:26 AM
-
Hello all. I need help, please. I am new in AHMI. My project target is control 16 similar devices via Modbus RTU RS485, so via one hw port. Any device have different PLC address. I begin test with one, test many things, buttons, indicators etc. All work fine, but only before I try to connect second one. I though that enough add one more driver with same com, but different PLC address. But... it not working. When I add communication is very bad and only with one of two devices. I read posts, finding some posts from 2017, where Archie say that this problem is solved. I have 399x version and have this problem. Than I find some post where man write some code to change station address for driver every time when need it. But I don't have experience with vb, so I understand that command some like plcAddressStation=...., but where I must put code I not understood. Please clarify me if it possible how to do it correctly.
-
You just add a separate driver instance for each device, set all properties with the same value except for StationAddress (which should go from 1 to 16).
Then in each of your controls you set the ComComponent property to the driver of the device it should get the value from.
-
Thank you Godra. But as I wrote, it not work for me. May be I need some driver upgrades?
-
Try using 3.99y Beta version instead.
-
Ok, thank you. Where I can download this version.
One more question, is it possible pooling data by time, I think may be some problem with conflict on bus.
-
You need to spend some time familiarizing yourself with this forum:
https://www.advancedhmi.com/forum/index.php?topic=2449.msg14752#msg14752
-
Thanks for the answers, I tried the latest version, but it also does not work correctly. I am an electronic engineer, so I studied this question with an oscilloscope. I have seen that if I use separate drivers with the same COM port and a different station number, either of these drivers works as asynchronous, so there are often conflicts on the bus.
Is it possible to synchronize the drivers or, alternatively, use one port driver and determine the station address for any element? Please help me how to do this.
-
I don't have any other suggestions for you.
Communicating with 1 or 2 devices over serial connection is challenging enough, not to mention 16 devices that you have to deal with.
Unless there is someone else with a similar setup to help you then you are out of luck.
-
How are you connecting your devices? show a diagram.
-
Issue when devices conected via standart RS485 in parallel to one COM port.
It work well if I use separate port for every device. But it not usable because additional converters need for every device and every time to reconnect to PC you have new virtual COM port numbering.
-
You could use a separate modbus ip to modbus serial gateway. These are cheap. But you also have to take care of the requests poll, it should be slow enough.
Depending on the time you have, you can also open the port, make a request, close it, change equipment id and so on. It it is just for temperature readings, it may work but anyway, with 16 serial equipments on 1 port, you won't have great performances.
-
Thank you profnova for answer and understanding my issue. So as I saw that collisions occured when few ModbusRtu is open in same time. Now I try to sinchronise this process enabling/ disabling port with disableSubscription by timer. In first view it work well, but not yet tested fully. I plan to test this with various baud rates and with more than 2 devices. If it interesting I will report about results.
-
Hi AndrejusZ
Did you get to solve the problem?