From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-21-2016 03:32 PM
Hi everyone,
In my program, I have an array of clusters with controls and an array of clusters with indicators. I have created property nodes for each array which updates the number of columns. Each column represents a channel that is being monitored on a scanning DMM. My program is working as I want except for the array of indicators.
I have a sub VI which checks the value measured by the DMM and determines if the device measured by the channel has complied or not. In a cluster of indicators, I have three indicators: one for the current measured, one for the time elapsed and a boolean which indicates if the device has reached a limit. The problem is that on the display, I don't see the any values entered in any of these indicators? I am newish to using arrays of clusters and what not. Can someone please help me see what I am missing?
I have attached my subVI (LabVIEW 2015). I know that nothing is wired into the elapsed time indicator. I will get to that in a bit.
Thank you.
Solved! Go to Solution.
06-21-2016 03:38 PM - edited 06-21-2016 03:42 PM
Which indicators aren't you seeing any values on? The Channels Output indicator shows correctly it seems. The Display Output will always have zero elements in the array because you start out with zero and then use the Replace Array Subset VI to add elements. This won't work because if your array is size zero, there are no elements to replace. You can either use an Initialize Array (at the beginning to match the size of the Channels array) or use a different method of editing the array.
Edit: I just noticed you're not taking advantage of a very helpful tool with For loops: Auto-Indexing. Here's a short thing about those. You can get rid of your shift registers and array manipulating nodes.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-21-2016 03:43 PM
Thank you! It was that I was using replace and not insert. Happy it was a simple fix 🙂
06-21-2016 03:46 PM
Here's what it looks like with auto-indexing. I suggest you get used to doing it this way because it is much simpler, easier to read, and actually gives a performance boost because you aren't storing the data in memory through each iteration.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-21-2016 04:15 PM
Oh wow, that really makes it easier to look at and debug! I will certainly start using this method. Thanks again 🙂
06-21-2016 04:44 PM - edited 06-21-2016 04:45 PM
Also note that your cluster value modification are still overly complicated.
For example to set the Channel boolean to false, keeping everything else the same, all you need to do is as follows (bottom of picture):
06-21-2016 05:25 PM - edited 06-21-2016 05:26 PM
Further simplifiying:
Here's how it could look like... (Please verify correct operation, of course. I cannot test)
06-21-2016 05:39 PM
Thank you 🙂 I didn't realize I could do that.