LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get my design to work, could someone lend some guidance?

Solved!
Go to solution

Hi,

 

I'm a complete newb to Labview v8.6.1.  I come from the .Net world and I'm having difficulty making the transition, some guidance would be greatly appreciated.

 

I've attached my .vi that I came up with but I've hit a wall and I can't get this design to work correctly:

 

I have two buttons on my .vi, a Sample button and a Calibrate button.  When I hit the sample button, I need to write out the values from my linear sensors to a file, this actually works fine.  When I hit the calibrate button, I need to get the values from the sensors, store them in an array for later use.  This works fine as well.

 

The problem I'm having is I need to use the stored values in the array in my Sample button logic which doesn't work because I don't have cases for my "False" condition.

 

Am I even close to the right solution here?

 

Thanks for any guidance.

0 Kudos
Message 1 of 6
(2,802 Views)

Do you have access to the Event Structure?  It will work a lot better for GUI like this instead of polling the buttons (and using a lot of CPU).

 

You should look into shift registers to store your calibration array.  I think the resources nyc gave should mention these somewhere in there.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 6
(2,788 Views)
Solution
Accepted by topic author hhgregc

There are different ways of doing it. You need shift registers. you can also use event structure. I tried to modify your existing vi just a little, and hope this is what you are looking for.



------------------------------------------------------------------------------------------------------
Kudos are (always) welcome for the good post. 🙂
0 Kudos
Message 4 of 6
(2,782 Views)

Thanks for all the help and suggestions.  odessy, that's exactly what I was looking for.  I need to look at the shift register in more detail, my vi was just a sample.  I have 16 sensors that I need to store in the shift register, not sure if I just add more shift registers or if I can use just one shift register to store all 16 values.

 

Thanks again for all the help, it's been a little overwhelming.

0 Kudos
Message 5 of 6
(2,777 Views)

You can create a shift register for an array. build an array for all 16 values, and then create one shift register for that array. Also, in future you might want to get rid of express vi s for data acquisition. They are good way to start learning but not very efficient way of programming. There are plenty examples you can search at labview>>help>>find Examples.

Good Luck!



------------------------------------------------------------------------------------------------------
Kudos are (always) welcome for the good post. 🙂
Message 6 of 6
(2,772 Views)