Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

Connecting Mango with Arduino OPC server


  • Hi there,

    I am still new with Mango. I would like to know how to connect Mango with Arduino OPC server. Hope someone can help me on the topics. Thank you in advance


  • Hi ramhuzanini, welcome to the forum!

    You would create an OPC data source on the Mango side. The contextual help, in the blue question mark (?) has a description for each data source of its properties. Have you attempted the connection yet?


  • Hi there,

    Thank you for your reply.

    Yes, I have tried to connect. But my first problem is that I could not find my OPC server while setting the OPC DA properties although I install the server on the same PC.
    I have set the host: localhost, domain: just blank (since I have not domain); user: blank (since I have set no user), password:blank (since I have set no password)

    Hope that someone can advice me on that matter


  • Ramhuzanini,

    I am not seeing a way to connect a serial OPC in Mango. Maybe I am missing something, but if you could find a serial to TCP/IP redirection software, it may work. Another option is using a protocol that uses serial ports. I personally use MODBUS for arduino communications. Am I missing something on the Arduino OPC? Is it purely serial?


  • @jvaughters It will be under Administration->modules-> "check for upgrades" where you do downloads and updates of Mango modules


  • @mattfox I am confused by your statement. Why are you directing me to module updates? Does OPC have a serial capability update? My Mango system shows up to date.


  • @jvaughters said in Connecting Mango with Arduino OPC server:

    I am not seeing a way to connect a serial OPC in Mango

    There is a datasource module in mango that allows you to do this, hence why I pointed to the modules section if you do not have it installed.


  • Wha? Mango does not currently support serial OPC to my knowledge...


  • @phildunlap Perhaps I'm confusing it with something else then....

    opcda Data source for OPC DA

    I take this that this must be something else then. Apologies gentlemen.


  • If the serial and the IP use the same actual bytes in the protocol it may be possible to use a virtual serial server socket with two serial data sources point linked together to bridge the OPC DA data source with the serial OPC device. But, i would tend toward jvaughters's suggestion of using Modbus as the communication protocol instead.


  • This post got me curious, so now I think I understand. It's not OPC over a serial link. There is an OPC proxy software that has a custom serial protocol between the arduino and the OPC proxy and talks OPC DA via ethernet, so it should be possible. It probably just needs the right config. I do not know OPC that well. I do however know MODBUS quite well and there is no OPC proxy between Mango and the Arduino with that method. Been using arduinos for years this way.


  • If it's talking via ethernet then perhaps a virtual serial source may also be of use...
    It's a pain because it's a legacy thing so you're a bit restricted in what you can do in comparison to OPC-UA which is platform agnostic. I know nothing about modbus, so if it goes that way I'll leave it to you guys.


  • Ramhuzanini,

    My recommendation is to utilize the Makitron free trial to test your OPC for Arduino. There is an example on exactly how to do that on the https://www.st4makers.com/ website. If you get that working you may be able to map the config back to Mango. From there @MattFox may be able to help also. I personally do not like OPC-DA in particular as it has some nasty config issues related to Windows. I have not used OPC-UA much. Mainly it is not heavily used. The concept is much better than OPC-DA as it eliminates all the nasty Windows configs.

    Question for @phildunlap: Any support for OPC-UA in the works?


  • Question for @phildunlap: Any support for OPC-UA in the works?

    No. Haven't had anyone knocking on our door about OPC-UA in some time. It'd be nice to have, but unlikely to spontaneously be a priority of ours (unless someone persuades the decider with $$$).

    I've actually not had an occasion to use the OPC DA module, so I don't know that much about it. I just saw that there is not contextual help for it. The underlying protocol implementation was written by openSCADA and we've been packaging org.openscada.opc version 0.9.0 via maven in the OPC module. It looks like there may be newer versions. It looks like they've not changed that library to support OPC UA from what I saw here: https://openscada.atlassian.net/wiki/spaces/OP/pages/6094892/HowToStartWithUtgard

    All I can really see from briefly looking at the code for the data source page in Mango is that the host, domain, username, and password fields bring correct may allow the refresh button to detect the server and populate that drop down if they are correct. Not sure what they would be for Arduino OPC Server, didn't see that readily in the documents I looked at.


  • Right, makes sense, I don't see OPC-UA much either. The OPC-DA technically uses DCOM, so unless you are accessing it over the network, then it probably is not using TCP/IP at all. In the case it is over the network, fun! fun! fun! setting up DCOM over the network. Ok, I'm now getting bad memories. Checking out now!!! My recommendations stand. As a matter of fact that last time I set up OPC-DA I used the Makitron free trial to help me set it up. It's actually great software.


  • Hi Guys

    Thanks for all the suggestions. For Mr jvaughters.- thank for your idea to use matricon. Actually I able to connect my arduino OPC server with dOPC Explorer. I can already read and write from dOPC Explorer to my arduino board. So I thought it should be no problem when I interface with Mango. However, it seem that the mango is not recognizing my OPC server as oppose to when I used dOPC Explorer. Nevertheless, I already solved the problem by using Mqtt broker to connect Mango with my arduino using Mqtt client.. But out of my curiosity, I will still want to try jvaughters suggestion to test using matrikon. Anyway thank all for your helps


  • @phildunlap said in Connecting Mango with Arduino OPC server:

    openSCADA

    From what I can see openSCADA 0.9 has modules for OPC-UA, not for OPC-DA
    http://oscada.org/wiki/Home#Modules_of_OpenSCADA


  • Hi Nathan Rona, welcome to the forum!

    I guess the world didn't enforce a copyright on the name "OpenSCADA". Looks like openscada.org has found it's way to being private. But, this is what the OPC library became: https://en.wikipedia.org/wiki/Utgard_(software) and maybe this is its source code (not sure how sanctioned this github is from the OpenSCADA I was referring to: https://github.com/gaviscada/org.openscada.utgard


  • @ramhuzaini Were you able to connect to OPC servers on local machine? I am exploring mango and just can't see OPC servers installed locally on my PC. The server dropdown remains empty, which I assume should get filled with all registered OPC servers. Will appreciate any tips on how to correctly configure an OPC DA source in mango.