Hi, everyone.
I hope someone can help me with this:
From a sparkplugB client that I developed, using the SparkplugNet nuget and NetCore, I'm sending 1000 metrics to the PLC command. From Ingition Designer I see that the tags are changing their value but it takes a few seconds to change all the tags, I am also using MQTT fx and MQTT Explorer to validate when it finishes changing all the tags. So far everything is normal. The problem comes when I send new values for the same metrics and wait for them to change and I also notice that the values start to change automatically between the previous value I sent and the current value I am sending. It seems like it keeps looping and never finishes updating the metrics because they are switching between the previous and current value. The metrics are an array of 500 integers (Int16) and an array of 500 strings as part of some tests.
Are you consuming the MQTT in Ignition or sending the MQTT to the controller and then using OPCUA to read the tags from the controller using opc tags?
Hi, Benjamin.
From the sparkplugB client we publish the metrics to HiveMQ broker.
Ignition Edge is reading the metrics (subscribed).
We are using OPCUA connection.
Okay,
So you aren't using a module to pull in the MQTT data such as CirrusLink?
Are there any change scripts on the tags you have in the Tag Provider you are using or are you relying on the updates from the Hive Broker to just provide you information about the data being written?
What I am getting at with these questions is to see if it is actually an issue with Ignition, or if your middleware is what is causing the problem.
We're using MQTT Transmission module from Cirrus Link.
We are not using any policy or script to transform or convert data, in HiveMQ or Ignition Edge.
So you aren't using Ignition to write to the PLC correct?
Here some screenshots from ignition edge configuration:
PLC with the native driver configured:
And the MQTT Transmission:
Tags mapped from Ignition Designer:
I realize now what I have missed in this.
You are using Ignition Edge. Ignition Edge does not have the capability to subscribe to data that is not OPCUA. In order to receive MQTT data for instance you need the MQTT Engine Module, or Distributor I believe, which allows for Ignition to actually consume MQTT data.
The transmission module is for publishing data from an edge device.
So, in order to assist I would need to know what is actually writing to the PLC because you do not have an architecture that could have MQTT data being consumed and then have that write to a PLC. This is not possible with Edge, since Edge is not capable of such use cases. Edge is more for single machine control and/or data publishing to MQTT Brokers, Remote Tag Providers, or Remote Tag Historians.
But, how is it possible that we can write to the PLC using ignition edge?
In "MQTT Transmission Setting" we can enable the command to write to the PLC device.
I have never used the Transmitter Module to actually write to tags and based on the description it is supposed to be used to transmit data. I wonder if maybe the thought behind that is actually to control specific information about the device not to write to tags specifically like you are attempting.
I am thinking you have a circular dependency issue possibly. Because when you are updating the data, it sometimes works, but other times reverts, so the OPC Driver is updating the tag, and that tag is being transmitted. But you are also trying to write to that same value at the same topic and one value is overtaking the other in priority.
That is my best guess without knowing more about controlling tags with Transmitter directly. Normally you could subscribe with Distributor/Engine and that would create a new Tag Provider, but Edge doesn't support multiple providers if I remember correctly.
You could trouble shoot the circular dependency idea by making memory tags and attempting the same update and see if it ever happens since there is no OPCUA Driver doing scans, polling, etc. Just Raw Memory tags accepting data.