Add calculated channels to OPC UA Server

Forum Home Forums Communicating with Devices OPC Add calculated channels to OPC UA Server

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #14133
    odobrev
    Participant

    Hello there.

    I am using Rapid Scada to Monitor Solar 250kWp Plant production and especially faults that happen and that stop production.

    I am connecting to a Modbus TCP Gateway (Huawei SmartLogger3000) and getting data properly.

    Thing is, I am using a 3rd party Advanced Alerting Software (Alert from MICROMEDIA INTERNATIONNAL) and I need to process further data and generate custom Alerts with the help of calculated channels (through a script).
    The problem is that Rapid Scada works wonders as a passtrough OPC UA server for Communicator but I can’t manage to find how I could add channels existing only on Rapid Scada Server and pass it to OPC UA Server and use it in a 3rd party software.

    Did I miss some documentation part or is there no way to do it with Rapid Scada ?

    Best Regards

    #14135
    Mikhail
    Moderator

    Hello,

    OPC UA server works on the Communicator level, so it has no access to values of calculated channels. Do solve the task as you described, there should be an OPC UA module working on the Server level.

    Consider alternative solutions:
    1. MQTT Publisher driver (DrvMqttPublisher.dll) can publish channel values.
    2. Send Telegram/email/SMS notifications using Rapid SCADA.

    #16430
    oley
    Participant

    Hi,

    you wrote that you are connecting to a Modbus TCP Gateway (Huawei SmartLogger3000) and getting data properly (hopefully also setting data).
    Would you provide some simple example? I am at the beginning of evaluation for RapidSCADA for Solar Plant with this device.

    Best regards

    #16434
    Mikhail
    Moderator

    Hi,
    While waiting for the example, this video about Modbus may be useful.

    #16435
    odobrev
    Participant

    Hi,

    Sorry, I have missed mail notifications because it got to quarantine.

    I’m on holidays right now, but I will come back with the example of how I configured Modbus Next Week.

    We are not writing to Modbus since we are only using data for monitoring purposes so I won’t be able to help with this but I did test writing over Modbus TCP/IP to a Moxa E1212 for testing purposes when I was evaluating Rapid SCADA so it does work. You might want to get one since it’s pretty “cheap” compared to an automate and will allow you to test SNMP and Modbus/TCP pretty easily. As for Rapid SCADA, well, it’s free and pretty easy to install…Can’t do better than that !

    For implementation, the documentation from Huawei was actually pretty bad. Finding the right documentation for Modbus registers and inverters and getting it right is always a pain in the neck. But it’s not because of Rapid SCADA, it’s always like this with Modbus and actually I did find Rapid SCADA to be the only good tool for this protocol. What I recommend doing is to always use the same model of hardware (same gateway, same inverters, etc.) since you will be able to reuse your template and it will make your life so much easy. You also want to get some float or integer values such as Active Power, Voltages, etc. to be sure that the way you’re reading registers is good. (Especially when you don’t know if the manufacturer is using a base 0 or 1 for adresses)
    When possible, I always prefer OPC UA or better SNMP. You always get an MIB file from your manufacturer and with MIB Browser, it’s just a walk in the park to make it right in the SCADA.

    As for my “calculated variables exporter problem”, what I remember doing for my calculated variables :
    – Configure Postgresql server (installed on the same server as Rapid SCADA) and create Postgresql exporter as written in documentation. I tweaked it a little to export only on COV (Change of Value).
    – Install Node RED.
    – Poll reading Postgresql Database with Node RED.
    – Calculate my logic for alarms and aggregates inside Node RED.
    – Create an OPC UA Compact Server in Node RED.
    – Export my calculated variables to OPC UA server in Node RED.
    – Connect my external Software to OPC UA server in Node RED directly.

    If you need to use these variables in Rapid SCADA, you can just connect to your Node RED OPC UA Compact server and read from it. It will become also available in your Rapid SCADA OPC UA server.

    Best regards

    #16436
    oley
    Participant

    Hi,

    thank you. I am going through the videos right now.

    Greetings

    #16437
    oley
    Participant

    Hi,

    thanks a lot for the informations.
    Thanks in advance for your help.

    Best regards

    #16438
    manjey73
    Participant

    Nobody bothers to loop the data, right? In version 6, Modbus slave (paid) allows you to create variables based on calculated channels. We configure the Modbus slave, then the Modbus master on itself. And voila, you get the data source for OPC UA.
    The same option can probably be done with MQTT.

    🙂

    #16439
    odobrev
    Participant

    Good to know.
    I didn’t think of this since no one mentionned it when I created this post.

    Might use this if I have a new Modbus source to implement that requires publishing.

    MQTT did not pick my interrest since it’s a paid plugin in my ALERTING software and I already had everything built on OPC UA included in the base licence. Also, MQTT a new protocol for me that I still need to learn.

    We were already using Node RED anyway for bacnet compatibility so it was the easy solution for us.

    We could’ve actually used Node RED to directly connect to the Modbus Gateway but since we’ve already implemented everything in Rapid SCADA, we did not bother to rewrite everything.

    As for data looping, we’re not doing it since it goes like this : Modbus Gateway > Rapid SCADA > Postresql > Node RED > Alerting sotfware (we don’t need the calculated variables in Rapid SCADA itself) but I agree it makes a complicated path.
    The way you describe your solution seems about the same complexity for me. You just keep everything in the same software which I agree is better than my solution.

    #16445
    Mikhail
    Moderator

    It would be useful to develop an OPC UA server for Rapid SCADA on the level of the Server service (in addition to the existing OPC UA server for Communicator), so it can provide calculated values.

    #16459
    oley
    Participant

    Hi,

    Are you already back from vacation and could you help with MODBUS TCP configuration. I’ve run SmartLogger and enabled ModBus, but I’m having trouble connecting and thought I’d wait for a sample configuration.

    Best regards

    #16460
    Mikhail
    Moderator

    Hi,
    Please clarify to whom the question is addressed.

    #16463
    oley
    Participant

    Hi,

    sorry, the question was addresserd to @odobrev.
    He said, he will provide some example config to Huawei device which I try to connect via Modbus TCP.

    #16473
    odobrev
    Participant

    @oley

    Sorry, had a little bit too much things going on so I forgot to provide examples and I forgot to whitelist rapid scada mails last time, so I did not get notifications.

    Not sure if there are rules for file sharing links on this forum (I did not find a policy), but you can find the documentation I found online, some screenshots and my Modbus xml config file here on github : https://github.com/odobrev/rapid-scada-examples

    It’s a public repository I made just for sharing, think it will be better than a link to my self hosted cloud server.

    Hope you find it somehow usefull.

    Let me know if you need some more explanations.

    The difficult part of “Fault Codes” is that it’s HEX CODED so you need some processing to decode error codes.
    That’s what I had to do in Node RED directly, then aggregate to custom fault variables.

    #16474
    oley
    Participant

    @odobrev

    No problem, thanks!
    I’ll try it out right away!

Viewing 15 posts - 1 through 15 (of 22 total)
  • You must be logged in to reply to this topic.