11-14-2014 09:48 AM
Thanks Hoovahh
I'm not much of a VI programmer so the Case Structure might take some work for me.
The 1D array might be more doable. As it is now I have a large (much larger than I show) pink array of Signal Names. Which label each signal very nicely. However I have to manually manage this large list if I add sensors to the BUS.
You write "Or you could have a 1D array of string constant, auto-indexed into the for loop, where each element in the array corresponds to the unit to be used for each channel. Of course for this to work the two arrays must be of the same size"
I think my problem is understanding the "auto-indexing into the for loop" concept. I've made large pink array blocks with various labels for UNITs but it seems to only take the last one and use it for all. So I don't think I'm "indexing" each value in the array to each signal individually.
Is there a piece of example code that shows changing the UNITs individually? There are some nice code examples for TDMS about labeling but they don't discuss how to handle multiple signals with different Unit Labels.
Thanks Again
Jason
11-14-2014 10:07 AM
You already have an autoindexing for loop. When you have an array of elements and you want to process each one at a time, wiring that array to a for loop will by default index it. You are already doing this with your channels going into the for loop. But as I suggested the case structure is probably more robust.
You may want some free training if you are unsure how case structures, and for loops work:
6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-14-2014 11:13 AM