Problems reaching array elements in InfluxDB

Hi
Thanks for your daily support.
I am working with an EPC 1522 and I have some troubles getting some values on Cronograph.
Initially, I am following the official support guide which can be found on github

EdgeDevices/1_OPCUA_Demo.md at main · PLCnext/EdgeDevices Collection of various Node-RED sample code for EPC 1502 and EPC 1522. Quickstart for PLCnext Engineer, Node-RED and InfluxDB within the Edge PCs. - EdgeDevices/1_OPCUA_Demo.md at main · PLCnext/Edg… https://github.com/PLCnext/EdgeDevices/blob/main/FW_2022/Code/Influx2/Influx_Configuration.md

At first glance everything works ok, as I can plot the last value of an array of five elements


I am using as shown in the guide the node-red function InfluxDB Batch Insert

But at Data Explorer, I only can see the last element of the array

Is there any way I can get the rest of the array elements?

Thanks very much for your support.
Best regards



Hi jfernan73,
from your screenshots I see, that you are reading individual variables and not an array (analog_output_000, analog_output_001, …) into Node-RED and InfluxDB.
This shouldn’t be a problem and should work. From your third screenshot, I can see that all values are read by Node-RED (Debug Node) correctly, but somehow they are now all named the same “OPCUA_analog”.
Thats why you only write one variable “OPCUA_analog” into InfluxDB.
I build a test project exactly like you did and found the issue:
The Function-Node “Remove unwanted text from topic” is deleting the number at the end of your variable name.
To fix it, simply do the following change inside the function node:
Instead of “_”, just delete the character into " " (A blank character). The rest can stay the same.
Hotfix_FunctionNode_OPCUA_001.JPGAfter that, the name of your variables will no longer be cut and I was able to display them individually inside InfluxDB.
Hotfix_FunctionNode_OPCUA_002.JPG
I wasn’t aware of that “bug” and will try to upload a fixed sourcecode into Github.
Let me know if it won’t work on your side.
Best regards and a happy new year!
Daniel

Hi Daniel

Thanks so much for your answer!!!
I have just tested and now It works perfectly.
Thanks again for your good support