FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
06-24-2024 12:38 PM - last edited on 06-24-2024 02:40 PM by ThorstenX
Hi, i want to store the data using KVD as mentioned below. I need help for creating data layer node.
Serial Number | Timestamp | Pressure 1 | Pressure 2 | Leak | Temperatue | Cycle time |
QS20240624001 | 6/24/2024 6:00:10 | 5.51 | 5.43 | 0.08 | 28.5 | 20.5 |
QS20240624002 | 6/24/2024 6:01:25 | 5.41 | 5.37 | 0.04 | 28.5 | 20.5 |
QS20240624003 | 6/24/2024 6:02:05 | 5.62 | 5.58 | 0.04 | 28.4 | 20.6 |
QS20240624004 | 6/24/2024 6:02:55 | 5.55 | 5.49 | 0.06 | 28.4 | 20.6 |
⚠️ Original message posted here
https://developer.community.boschrexroth.com/t5/Store-and-How-to/ctrlX-AUTOMATION-Key-Value-Database...
Solved! Go to Solution.
06-24-2024 03:10 PM
A question is how you want it to be structure. As KVD, as name is implying, is a key value database there is always one key and a corresponding value. To bring it to a table view is part of HMI showing the stored data. Please have a look to the how to "Custom data structures in Key Value Database (KVD) app"
So you could use the headline of each row as key and arrays of data as values.
Another possibility would be to have the serial number as key and the different numbers as values.
06-25-2024 12:24 PM
Hi Code shepherd, thanks for the reply.
For each row serial number will be the key. I need help to structure the node in such a way that for pressure, temperature, etc values has to be stored with respect to the serial number. so by refering the serial number, entire row data can be fetched.
08-07-2024 10:03 AM - edited 08-07-2024 10:06 AM
Hi @ganesh
there are several ways how you could solve this. One way would be to define your own complex data types and use implicit nodes in the KVD App. How to create your own complex data types is described in the how-to @CodeShepherd mentioned. How to use implicit nodes in the Data Layer you can see in the Application Manual for the KVD App (Chapter: Configuring the nodes - Implicit nodes). An implicit node can be created (create-on-write) and removed.
How your flatbuffer schema for your complex data type could look like as an example:
// IDL file for forum post.
namespace myDataType;
table Measurement {
serial:string;
timestamp:ulong;
pressure1:float;
pressure2:float;
leak:float;
temperature:float;
cycletime:float;
}
root_type Measurement;
I can also recommend you to look into this How-to: Creating a dynamic Data Layer Node from Node-RED using Key Value Database App
Best regards,
Nick