05-20-2008 08:24 AM
05-20-2008 09:50 AM
05-20-2008 12:07 PM
05-21-2008 08:05 AM
05-21-2008 10:26 AM
05-21-2008 01:53 PM
The wire is the variable? What does that mean? And I am doing - I'm spending a lot of time on this, trying to figure it out by myself. It's not working. The only other labview stuff I've done has been for "live" data acquisition stuff, which I just threw in a loop and everything was great.
I guess I'm still waiting for answers to my questions to get me to the next challenge 😉
Mike
05-21-2008 02:26 PM
LOL! Yes... it may be shocking at first, but instead of having variables as in text-based languages, Labview uses a wire.
The Locals & Globals are not to be used in the same way as text-based languages either. Nor is the Sequence Structures.. They provide a somewhat similar ... hum... euh.... well... I don't want to use the word "environment".. because it's not.. well.. it provides something similar to text-based languages, but it's not..
So passing values is done using a wire. Functions are actually vi's which can be run as stand-alone. Subroutines are vi's (sub-vi's) configured as such. They tpically clone themselves.. Maybe we shouldn't go there yet 😉 😮
For now.... think of wires as variables. Every wire is a variable holding the value for that variable within the length of that wire.
Hope I didn't confuse you too much 🙂 LOL!
It gets easier from there 😉
05-29-2008 09:06 AM
Ok, here's where I'm at. I have my vi working, mostly. I would like to do the following and am a little stuck. When I hit "Configure", I would like it to zero out the text boxes. So I moved the text boxes out of the case statement, thinking that would mean I could use them in all the cases. Well that just means I have to wire up what happens to them for each case - I can't just let them alone for the other cases. So how do I get that done?
The other thing I'm trying to do is write the values to a comma-seperated file when I hit "save". I'm trying to build an array to save, but I can't grab the values out of the textboxes - something about the tunnels going the wrong way?
I'm attaching my vi for clarity.
Also, if I'm doing anything bone-headed, I'd LOVE some suggestions on how to clean it up.
Thanks in advance!
Mike
05-29-2008 09:03 PM
A couple things.
1. Make sure you have all of your tunnels wired up and all the VI's and other functions have all of their required inputs wired up. There are several errors on the broken Run error relating to this.
2. Why are you converting an array to a matrix?
3. As for backwards tunnels, it sounds like you are trying to go from the wires going to the indicators (which come from the case structure) and sending them back into the same case structure. It can't be done. You may either want to store the values of the indicators in a shift register, which would make them available on the next loop iteration. Or use a local variable of the indicator to read the current value of the indicator inside the case structure. This isn't usually a recommended practice, but can be done if you are careful about race conditions and the way you use the local variables.
Since it sounds like you are new to LabVIEW, I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
05-30-2008 07:30 AM
Thanks for the reply.
1. I do know that there are build errors, that's why I'm posting 🙂 I don't know how to accomplish what I'm trying to do! I don't know how to wire up all the tunnels appropriately.
2. I'm doing that because that let me use the split signal object to get them back out. I couldn't find a split array object that would give me more than one channel at a time.
3. So does that mean I need 16 shift registers? Or should I do something like what I'm doing on the other case and put it in an array? Should the indicators be inside the case structure?
I sort of have the same problem trying to wire up the save to disk - I need to get those 16 values back out when they hit "save".
Thanks,
Mike