Grz
Hello everyone,

What do you think of the UNO Q board?

Has anyone had a chance to try this board?

Will it be integrated into OpenPLC V4?

Thanks in advance for your replies.
 
Best regard .
Pierre
Reply 0 0
thiagoralves
I got a Uno Q but didn’t have a chance to play much with it. We’re planning to integrate it with v4, including embedding the editor in the board itself
Reply 1 0
davenardella
While waiting for OpenPLC v4, you can safely install OpenPLC v3 (in Linux mode). 😉
 
openplc_unoq.png
Reply 0 0
fg71
Arduino like to combine Arduino API with Python to build what they call bricks in special IDE (Arduino App Lab).
The hardware is hybrid (dual chip), little different from SoC (Single-on-Chip). In short the hybrid is a general-purpose computer (SBC) with interconnection to the MCU real-time tasks. This is what Arduino calls the bridge and the API do not tell anything else.
 
It use RPC (Remote Procedure Calls) to communicate with SBC (Qualcomm QRB2210)
 
Simple approach for Arduino Uno Q could be to running the sensor data from Arduino API (MCU) and use Python (MPU) to build you dashboard.
Reply 0 0
thiagoralves
Good follow up @fg71. I did manage to get Uno Q working (both sides) on the OpenPLC Editor, although that unfortunately was not very straightforward. There were significant changes on the Arduino MCU side for the Q that made things quite harder for this one. But it is all working now on the development branch and should be available on the next official build. Users will be able to program the STM32 side from the editor and the Linux side using the runtime v4 (editor to runtime v4). The cool part is that you can upload different projects to each side and have them communicate internally using Modbus 🙂
Reply 0 0
fg71
I do not have this board and I'm not sure I'm interested to get one its slower and Raspberry Pi 4.
Its fine to use Modbus but I believe its more simple and that.
 
With your MCU you use Arduino API
#include <Arduino_Bridge.h>

void setup() {
  Bridge.begin();  //  initialize class object
}

void loop() {
// Send to Linux side via Bridge
// the variable my_value is e.g. sensor data
  Bridge.put("key_name", String(my_value));
}
 
On the SBC (Debian Linux) you could use Python and module arduino_bridge
from arduino_bridge import Bridge

bridge = Bridge()

while True:
    value_str = bridge.get("key_name")
    value_float = float(value_str)

    # next you include a placeholder for your web-ui to update with value find in value_float
 
I believe the API is kind of simple when you have a template of web-ui for different widgets.
Reply 0 0
thiagoralves
The Arduino Bridge API is quite broken. That was the obvious choice, but unfortunately it is not mature enough for any serious work. Works well for blinking LED examples from the Arduino AppLab but that’s about it. All my experiments failed when I tried to push its boundaries further. So I decided to ditch it (you literally have to disable the Arduino bridge service) and let OpenPLC take over the comms. This worked on the first shot. No extra modifications required.
Reply 0 0
plcwill
The Arduino Bridge API is quite broken. That was the obvious choice, but unfortunately it is not mature enough for any serious work. Works well for blinking LED examples from the Arduino AppLab but that’s about it. All my experiments failed when I tried to push its boundaries further. So I decided to ditch it (you literally have to disable the Arduino bridge service) and let OpenPLC take over the comms. This worked on the first shot. No extra modifications required.
I don't have one but, from what I see in order to make this work with OpenPLC did you have too treat these as two separate controllers?
Reply 0 0
davenardella
I don't have one but, from what I see in order to make this work with OpenPLC did you have too treat these as two separate controllers?
Unfortunately, it's not uncommon for Arduino to keep software in beta indefinitely.
For example, OPTA's loading issues seem to still be unresolved, which is why Finder now sells OPTA-Codesys.
 
I agree with Thiago.
 
In my opinion, trying to force something to work just to "cover the platform" isn't a good idea; it runs the risk of needlessly complicating the code.
 
Furthermore, I'm not entirely sure that the RPC mechanism (assuming it works) is more efficient than dedicating a core as a communications processor, and then just using the Linux part without much effort.
Reply 0 0
fg71
The Arduino Bridge API is quite broken
I was going little deeper it looks like Arduino use wrapper for Arduino RPClite
 
From the above link we understand it use MessagePack-RPC communication
 
MessagePack-RPC is inter-process message protocol the purpose is to send small/fast message in binary form.
 
Question we could ask if MessagePack-RPC fast enough for Industrial Automation...
In Industrial Automation we also measure the latency of communication. In benchmark we could get
1 - 3ms latency for MessagePack-RPC. Meaning if the cycle time is 100ms its enough.
 
It make me to think, but I could be wrong.
STM32 MCU is hard real-time and Qualcomm (MPU) is soft real-time and use baud-rate of 115200.
 
The name RPClite could maybe mean it is a lightweigh implementation of MessagePack-RPC
 
And if we category the implementation as embedded system for IoT application there < 100ms is enough for latency.
 
This message is based on speculation from my part and reading what other have said. 🙂 meaning I have not doing any testing.
Reply 0 0
thiagoralves
The point is that the spec might seem good on paper, which I think it truly is, but is serves to no purpose if it doesn’t work. After fiddling with it for a while trying to understand why things weren’t working the way I wanted, I realized that messages were being corrupted (skipping bytes) or mixed with other messages if you send messages too frequently. There are bugs in the buffering mechanism and possibly other parts and I was not up for finding an fixing that. So I just removed the whole thing and let OpenPLC handle the scones as a regular serial link, which resolved all problems. This was my impression when I was testing it, and could even be outdated now. I know Arduino has been pushing updates to the firmware/software very frequently, so maybe this has been fixed already.
 
Answering @plcwill question, yes they are treated as two separate processors, connected by a serial + SPI link.
Reply 0 0
Reply