Right click application and Add Object > POU. Call it Sparkplug, Type: Program, Language: ST.
Open the new POU and add an EoN : SparkplugB.FB_Edge_Of_Network_Node;
Click the first line of the implementation part of this POU and press F2 to bring up the Input Assistant. Categories > Instance Calls > EoN > Tick “Insert with arguments” > OK
You should now have this view:
Fill in your server connection settings, eg:
Now there are only a few variables in this project. We need to create a SparkplugB.FB_SimpleValue for each of them, but in an array. Note that each datatype has its own array, and the nature of VAR_IN_OUT means that each array is required.
SPI_Temperature.rValue : REAL;
a. Declare the necessary arrays. Unused array can be declared with 0 elements =p
b. Add the new arrays to the EoN call.
c. Write the names and copy the values in code:
d. Add a new task for this new POU, or use an existing one.
Now run it and see if you get the values into your Sparkplug B SCADA / IIoT Host Node