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.
11-16-2010 09:33 AM
Hello all, I am a newer user of Labview still in school and I have a problem. I have a weather vane directional out put of 16 specific non-linear voltages that I am trying to link to a string dispay of the specific 16 compass directions. Any suggestions of a clean and quick whay to link these up. I am thinking two arrays, one of voltages and one of strings, possibly going through a case structure, but I am not sure how to implement my concept. Any help would be appreciated.
11-16-2010 10:39 AM
Hi, I am learning LabView myself too. Are your voltage outputs steady? Have you learned about "enum" in LabView yet? You could enter your voltage values in the enum and also create a string array in the corresponding order. Connect the output of the enum to an index array, connect a string indicator to the output of the index array, and put the codes in a while loop. So when you change your voltage on the enum, your string output should also change. This might not work with your applications. I know others might have a simpler way to approach this. Hope I understood your questions correctly and hope it helps.
Lynniz
11-16-2010 10:52 AM
Try looking at Threshold 1D Array
The input array will be the ranges of the voltage the compass points
The output will the the index of which voltage range the threshold value is in.
The you can index a 2nd string array with the compass points text in them or could use an enum but you will have to watch your type casing and data types.
11-16-2010 01:17 PM
If you have them saved as an array or are taking them in real time, than these are two ways to give them names. One uses a Ring Indicator and other a String Indicator. Used the index array function for arbitary value selection(you can use a for loop for sequential extraction and cut off the index array function and the numeric control). The other one implements your thoughtout solution.
11-16-2010 02:04 PM
I assume your are talking about the cardinal direction.
The question I have is what is the relationship between the voltage and the direction.
What is the scaling of voltage to direction.
If it is a one to one then try this
11-17-2010 06:45 AM
for real world signals with noise it might be wise to add a slight hysteresis to get a stable output near a boundary.
the attached program show one way to do it. By adding the hysteresis after the 1D threshold vi it is also 'scaled' to the range 🙂