From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write and read arrays with control

Hello,

I have the following problem

I am creating a program to monitoring optical sensors and i have one part that is necessary configuring each one of this sensors. To do this i had create an array which the lines are correspondig to the number of sensor and the columns are corresponding to diferent features. The objective is select the sensor and put your caracteristics, but when I change the sensor, the features previous used fills the next line(sensor).
How can I change the sensor without modify your previous values? basically what I want is using controls with two functions, read and write.

See the image

0 Kudos
Message 1 of 5
(2,266 Views)

Hi Chivalry,

i´m not sure what you want, but to use a control to read and write, take a control. You can insert values in the control, and overwrite it for viewing by using a property node or a local variable of this control.

Mike

0 Kudos
Message 2 of 5
(2,240 Views)
Hi Chivalry,

I would reorganize the data into an array of clusters.
In each cluster you store the settings for one sensor. With your "select the sensor"-control you select the the shown array element (hide the array index & make the array border transparent to hide it from the user Smiley Wink). This way you can use different datatypes for each setting (if needed) and avoid overwriting of previous settings...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(2,234 Views)
Thanks..i solve my problem

Regards

(how i can rate de posts?)
0 Kudos
Message 4 of 5
(2,214 Views)
Hi Chivalry,

you can rate posts after submitting a minimum number of posts (I think it's 50 posts minimum).
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(2,212 Views)