cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

I need help for creating data layer node related to KVD

I need help for creating data layer node related to KVD

ganesh
New Poster

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...

3 REPLIES 3

CodeShepherd
Community Moderator
Community Moderator

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.

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.

nickH
Community Moderator
Community Moderator

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

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist