LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I coerce all array elements with a property node?

I am using LabVIEW 7.1, and I want to change the Range-maximum value of the numeric elements in an array using property nodes.
It is working fine but the problem is that current elements in the array won't be updated (coerced if they were above the new limit) unless I enter a new value in the cell. If you look at the attached sub-Vi, you'll see that all elements currently have a value of 9, and the limit is set to 5. When the VI is run, only the bottom element will be updated, and the other elements will stay the same. If I enter a new value (thus generating an event), then this element will be coerced.
 
How can I force all the current elements of the array to be updated to the new maximum value?
 
Thanks
0 Kudos
Message 1 of 3
(2,958 Views)
If I enter a new value (thus generating an event), then this element will be coerced.

This behaviour is by design. You must loop through the elements and use the "In Range and Coerce" function to replace each element.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 2 of 3
(2,954 Views)
The In Range and Coerce function is polymorphic. Just feed the array toit and all elements will be coerced. No loops. No property nodes.

Lynn
Message 3 of 3
(2,939 Views)