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

Kvd (Key ValueDatabase App) - how to create an array

Kvd (Key ValueDatabase App) - how to create an array

tszalkai
Member

I am wondering if anybody knows how to create an array of UINT16 in the Kvd's nodes.json.

In the Kvd manual I found little information on arrays. It's supposed to be 

aruint16                     array of unsigned int (16 bit)

, but the syntax below not work. I imagine the length of the array needs to be defined, I just don't know how to.

{
            "address": "Folder/TagName",
            "type": "aruint16",
            "metadata": {
                "nodeClass": "Variable",
                "description": "Description"
}
2 REPLIES 2

NoRisk4Project
Long-established Member

Hello,

you don't need to set an array length it increased/decreases automatically when you write data into the array.

I created a array, similar like yours

2024-03-25_14h44_48.png

and it's empty by default.

2024-03-25_14h45_41.png

I write some values and press save

2024-03-25_14h46_15.png

 and the values are written and the array size increased from "0" to "7".

2024-03-25_14h46_25.png

If you want to access such an "empty" array via OPC UA, it's the same. The size increases automatically when I write some data (I used the UA-Expert).

2024-03-25_14h54_13.png

2024-03-25_15h05_29.png

2024-03-25_15h05_51.png

I write only "0" for all 4 elements

2024-03-25_15h06_31.png

and the array has increased with the written values.

2024-03-25_15h06_53.png

Thanks for the detailed response.

Unfortunately, my structure looks differently, see below.

 {
            "address": "Nexeed/Faults",
            "type": "aruint16",
            "metadata": {
                "nodeClass": "Variable",
                "description": "For the Nexeed Virtual Assist"
            }
resulted
tszalkai_0-1711460011109.png

I am running the latest 1.20.

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