Forum Home › Forums › Communicating with Devices › MQTT
- This topic has 13 replies, 2 voices, and was last updated 2 years, 10 months ago by Jure.
-
AuthorPosts
-
April 15, 2021 at 6:32 am #8753JureParticipant
I have problem with MQTT. I can connect to broker with client, but Rapid SCADA communicator is reporting error:
http://imgur.com/a/xyEmb84I tried different settings, but I don’t know what else can I try.
April 15, 2021 at 11:31 am #8758MikhailModeratorFirst, try to connect public MQTT broker according to the video. Does a public broker works or not?
The MQTT driver is difficult to diagnose.May 3, 2021 at 12:42 pm #8846JureParticipantFrom the last time I was able to make MQTT working. Data and commands are successfully transferred. But I have another question. Is it possible to use formulas for input channels that are using MQTT? Or should I use formulas inside mqtt.xml file? And how is with events and alarms?
May 3, 2021 at 1:45 pm #8847JureParticipantNow one formula is working, but it doesn’t execute just once, but whole time. So – operator works, but / doesn’t work.
I hope that you can see all three images: device, channels and web browser view.
- This reply was modified 2 years, 11 months ago by Jure.
May 3, 2021 at 2:18 pm #8850MikhailModeratorIs it possible to use formulas for input channels that are using MQTT?
Formulas are processed on the Server application level and they do not depend on a driver.
The result of formulas can be displayed by views, not in Communicator.May 4, 2021 at 6:25 am #8855JureParticipantAs you can see on my images I have two formulas:
Cnl – 10
It looks like it is done on each cycle of program. Because of that value gets lower on each cycle.
Cnl / 10
This formula is never caluclated. Value is all the time the same as in communicator.May 4, 2021 at 7:37 am #8856JureParticipantI also noticed that Rapid SCADA takes quite some time to read data from Mqtt broker. When around 80 variables is published to Rapid SCADA it takes more then 1 minute to show all the data.
If I send command from Rapid SCADA -> PC -> PLC communication is much faster.If we choose Rapid SCADA for our projects can we count on official support or is Mqtt community developed and so unofficial?
May 4, 2021 at 1:41 pm #8857MikhailModeratorAs you can see on my images I have two formulas
I don’t see any images that contains formulas. If you add them, I will check.
Value is all the time the same as in communicator
As wrote above, the result of formulas can be displayed by views, not in Communicator.
I also noticed that Rapid SCADA takes quite some time to read data from Mqtt broker. When around 80 variables is published to Rapid SCADA it takes more then 1 minute to show all the data.
Could you provide more info about that?
If we choose Rapid SCADA for our projects can we count on official support or is Mqtt community developed and so unofficial?
We also support the existing MQTT driver.
May 4, 2021 at 1:42 pm #8858MikhailModeratorNote: the MQTT driver update is coming soon. The driver will support generating of input channels according to the configuration, and JSON parsing will be improved.
May 5, 2021 at 6:34 am #8862JureParticipantI don’t see any images that contains formulas. If you add them, I will check.
Is imgur working OK for you? Because above I see one image view where if you move right or left you can swap images so in total are 3.
This is image with formulas:
http://i.imgur.com/SEZpypc.pngAs you can see, all that I do is Cnl / 10 and Cnl – 10.
As wrote above, the result of formulas can be displayed by views, not in Communicator.I know that you can see result of formulas, that is why there is also image of view. You can see in event log that formula is used multiple times per second, so probably is used on every program iteration:
http://i.imgur.com/y8fNCxn.png
Could you provide more info about that?
I am not sure what more info I can give, I will try to describe process in more details. I have two computer and PLC in same LAN.
Mqtt PC: It runs Mqtt client that is based on Mqtt Paho Java
Server PC: It runs SCADA and Mqtt broker
PLC from where we read values and change them1. Rapid SCADA is running.
2. I start mqtt client.
3. Mqtt client retrieves values and updates topic values. I don’t use .js just plain topic values.
4.Mqtt broker acknowledges new topic values and publishes them to Rapid Scada. Like I said in short time there are around 80 topics published. It can take up to 1 minute or probably even more for communicator to update all values.
I tried with just on topic and it can take from 4-10 seconds for topic to be updated in communicator.
We also support the existing MQTT driver.
That is great. Currently we made all of the testing in the office and SCADA was accessible just in LAN. But if we can solve problem with formulas and events there is plan to test on some real project where SCADA would be accessible from outside our LAN and we would monitor location in some other company.May 5, 2021 at 1:28 pm #8863MikhailModeratorAbout the formulas:
You should change channel type to “Real”. In this case, formulas are calculated when new value is coming from a controller or MQTT broker.May 5, 2021 at 1:34 pm #8864MikhailModeratorAbout performance:
Please wait a bit when we upload the driver update. The update will provide more details about received topics in the log.
Then we should compare the driver with another MQTT client that is installed on the same machine as Communicator and subscribes the same set of topics.May 5, 2021 at 1:35 pm #8865MikhailModeratorif we can solve problem with formulas and events there is plan to test on some real project where SCADA would be accessible from outside our LAN and we would monitor location in some other company
Nice. I’m sure that all the mentioned issues can be solved. And I’ll help.
June 9, 2021 at 11:42 am #9060 -
AuthorPosts
- You must be logged in to reply to this topic.