Skip to content

MQTT Sparkplug B support on PLCnext

Hi team,
One of our customers have asked a question if our PLCnext controllers (2152 and Edge computer) supports MQTT with Sparkplug B specification, here is their question with link to the protocol:
MQTT Sparkplug B (spec here: https://www.eclipse.org/tahu/spec/Sparkplug Topic Namespace and State ManagementV2.2-with appendix B format - Eclipse.pdf) is what were are looking to use as it integrates very well with a common SCADA platform we use. The store and forward capability is particularly useful because it allows for network outages. Importantly SparkplugB isn’t standard MQTT it is a layer on top.
One of our PxC colleagues mentioned that the development was started in USA but then looks like the person had left the company.
Does any one know the status of this?
Thank you!
«1

Comments

  • I am awaiting this as well. I've heard rumors that it may be coming, but no committed dates.
  • Hello! I'm pleased to report that I didn't leave the company and am actively working on this project for you all! I guess I fell out of touch with the forums here and I apologize for that. I will work to be more present in the community moving forward =)

    Anyways... The Sparkplug B project is a driver for the PLCnext Edge Gateway software my team has developed. I'm currently the sole developer for the Sparkplug driver and the status of it is very early alpha.

    Something user ablinov mentioned caught my attention. I'm not sure if store and forward capabilities are actually part of the specification itself. There's a "is_historical" payload flag for backloading data if the developer implementing the client wanted to add this feature. So my question to all is that, when using Sparkplug, is it expected that the client would have this store and forward capability? I planned on eventually adding the feature. Asking so I can set the proper priority =) Thanks in advance!
  • Hi Jake, thank you for your reply and great to hear you are still part of PxC team :smiley: Let me ask this of our customer and get back to you once we have further info.
  • Anytime! I look forward to your feedback!
  • I am very interested in MQTT with Sparkplug B for the Phoenix Contact PLCs. I am hoping to use it with Inductive' s Ignition SCADA platform. Store & Forward would be a high priority in my opinion.
  • Hi @Jake I have a customer wanting to use MQTT Sparkplug B, and yes the store and forward capabilities would be expected also. The customer has developed their own software stack that can be deployed in the cloud or on IPC, and would like to test how they integrate together. I would like to get a copy of the driver/software to share with my customer for testing, I understand it's in alpha stages. Any update would be great. Happy to talk on Teams/email.
  • Thank you all for the feedback thus far! Keep it coming =)
  • Small update for Sparkplug Fans. Phoenix Contact will attend the ISA Interop event for Sparkplug on March 15th! One step closer to beta =) I will post back with an update sometime after. Stay tuned!
  • @Jake excited to hear you are working on this. I am interested in using it for an active customer project. Like others, I think the store and forward is a priority. I'll be looking out for updates.

  • More good news updates! We passed the ISA requirements of the Sparkplug Interop! Yet another step closer to beta... I have one last dev backlog and then I plan to push for beta in April. Hang in there a little longer all =)

  • It's been a little bit, but I'm excited to announce that we will be entering beta by next week for the U.S. Sub mid year meeting! What this means is that Sparkplug will be available in the PLCnext Edge Gateway installer. I will make another post when it's live with some install details and such.

  • edited June 2022

    Hello all! Just a reminder that Sparkplug beta is now available via web install on the PLCnext Edge Gateway Deploy tool:

    https://www.phoenixcontact.com/en-us/us-lpl-edgegateway

    This will install the PLCnext Edge Gateway software on your 1152 or 2152. This process will upgrade your FW to 2022 LTS and delete any PLCnext project you have in your controller. You can still use PLCnext Runtime and PLCnext Engineer to program/reprogram a controller with PLCnext Edge Gateway on it afterwards.

    TLDR: If you try it out, make sure you back up your PLCnext project first 😉

    General feedback can be posted here.

    Any errors you run into can be reported via the PLCnext Edge Gateway support button (hopefully this picture comes through):

    If you hit connect on the Sparkplug driver out of the box and have Internet, it will connect to an AWS Ignition instance run by Phoenix Contact. If you've left default, I can verify your UUID. Further demonstration using the Phoenix Contact AWS instance would have to be discussed one-on-one.

    More advanced users, feel free to test on your own Ignition instance or any compliant MQTT broker v3.1.1 or greater.

    Thanks in advance for looking 😀💜

  • A couple of things to note about Edge install:

    1. If you have 2022.3 FW installed, it actually downgrades it. Shouldn't it check for a minimum version and update only if needed?
    2. It resets the IP address back to default, so it will lose the connection and be perpetually stuck at "Resetting Device". You have to close out and run the install again. Good news is it doesn't have to take the time to update the firmware the second time around.
    1. The Edge Gateway application is only tested with LTS (2022.0) of the PLCnext Runtime application at the moment. 2022.3 is still being tested. So, as you can see, we try to keep up but are at an in-between stage. Thus, we only install the latest of what we are tested for (which will always be at least LTS).
    2. Correct. I forgot to mention this. It's because this is the IP that a type 1 reset defaults back to, and part of the install procedure is a type 1 reset. The redirect you mentioned is currently on a list piling up for an installer sprint 😊

    Thanks for the feedback!

  • Small update. The official Edge Gateway website doesn't seem to be updating quick enough with the documentation changes I push. So for a better point of download for the Edge Gateway, I would use the US version of the PLCnext Store:

    Here I can at least keep the version notes up to date without any internal delays. Although this doesn't help the delay to documentation on the Edge Gateway website 😕 For that you just have to keep checking back to the doc site! So if you're looking for Sparkplug documentation, it should appear on the official site at some point...

    Cheers

  • @jacob this is great, exactly what we have been looking for! Can anyone confirm if the Edge gateway subscribes to SparkplugB commands from the broker (i.e. SparkplugB NCMD and DCMD) and then writes these values to the metrics configured in the Gateway? Are the Sparkplug metrics that get configured in Edge Gateway read/write?

    Thanks!

  • Hello Todd! It indeed does. When a Sparkplug metric is created in the Edge Gateway, you select a data source from the Gateway. This source can be anything else on the Gateway, like a Modbus tag, a dashboard metric, a system tag, etc. When Sparkplug sends this metric to the broker, it then uses this data source as the value. And when something is written on the broker back down to this metric, this is the data source that the Sparkplug driver will try to write to.

    In Sparkplug terms, when you add a metric, the client rebirths with this new tag to the broker and subscribes to this tags NCMD and DCMD's, making them all read/write by default.

    Now, for example, if you select a Digital Input as the source, the Gateway will not let Sparkplug write to an input. So there are additional logical safeguards in place to handle these primitive cases. But for the most part, the power is in the hands of the user!

  • Hello fellow Sparkpluggers! PLCnext Edge Gateway had its official NPL on Monday. This update contains not only Gateway performance enhancements, but a new installer as well as Sparkplug improvements and community suggestions!

    Please be sure to uninstall the old deployment tool first! Next, install the newly updated tool. Finally, target your controller and install from web! Feel free to post any feedback here or here:


  • Hey,

    i have the following problem with the FW 2023.0LTS when i install the edge Gateway. The error occurs during login:

    "failed to negotiate key exchange algorithm"


    I have tested it with two AXCF2152, both the same error. I think its a problem with the ssh connection and the cypher suits.

  • Looks like this is still currently in Beta. What's the anticipated timeline for when this will be fully released? We've had a few clients who are interested in PLCNext for MQTT, but they have been hesitant because the Sparkplug B driver is still in Beta.

  • Thank you for your interest in the PLCnext Edge Gateway/Sparkplug! We are currently in the process of certifying the implementation. Once internally certified, the beta designation will be removed. This could be as early as November as it is an active project with top priority! I will certainly post here when that time comes 😊 Thank you for your continued patience and support!

  • @Jacob When I try to add an Upstream connection in the PLCnext Edge Gateway, i get following message.

    The gateway also stops working and I need to reinstall before I can continue. Is this a bug in the software?

    I want to read some tags from the MQTT Broker (HiveMQ) and use these in the PLCnext program.


  • I also can't select PLC tags to publish to the broker. I can only connect I/O channels.

    Do I need to do some configuration in the PLC for this?

  • Hello Bert,

    Apologies for the delayed response! My connection to this forum is spotty and sometimes my responses end up not getting posted and I find them still in the comment box when I come back to check =/ Anyways!

    In order for you to get PLC tags into the Edge Gateway, you must enable the PLCnext API. Any tags in your PLCnext program checked as HMI should show up for use afterwards as long as you enable the API and disable the custom "user level" system as well from the PLCnext side.


    Are you still have this issue???

    Regards,

    Jake

  • Hi,

    I've got tags reading through from the plc to a cloud ignition instance.

    When i write values on the plc everything works fine and the values update on ignition.

    When i write values from ignition the gateway creates a new tag and the loop breaks.


    PLC successful write


    Ignition write creates a new metric


  • Hi John,

    Can confirm! I must have broken this functionality when I fixed something else =( I know what the prob is and will have a fix out soon. Thanks for the feedback =)

    Regards,

    Jake

  • Hi Jake,

    Thanks for the speedy response and for the awesome functionally you are adding!

    I am new to using MQTT but i have several plants feeding back to a cloud scada and its becomes hairy with all the tags and onboarding new sites takes a lot of time so i have been working with structs and UDTs.

    Any chance we can configure a struct on the gateway?

  • No problem at all!

    Yes the struct will be added as a type for my first project in 2024. It's definitely the single most requested feature from those who have checked out the PLCnext Edge Gateway in 2023!

  • Dear Jacob,


    My name is Damian Bombeeck and I'm a Technical Consultant at Phoenix Contact Zevenaar in The Netherlands.

    I would like to get personally in contact with you to ask a few questions, would this be possible?


    Thanks in advance!


    With kind regards,

    Damian Bombeeck

  • Hi John,

    After running some tests, I verified that at some point, the bug you encountered existed but was fixed. The release that currently installs via the "install from web" option on the Edge Gateway Installer should update you to a version that will set outputs from Ignition just fine! I can get with you one-on-one if you'd like to set a meet! Just message me the details =)

    Jake

Sign In or Register to comment.