Hello,
I have a program in which I am reading voltages from a USB-6008 and then doing some processing to display the power and voltage. The VI will take a value for the "Lowest Resistor" and then use that to calculate the power and the current from the voltage measurement. The output is then displayed in a graph and put into an array. I am using an external potentiometer with defined steps, so I initially set up the VI to take a user input for the initial resistor value ("Lowest Resistor"), and then you would have to change the "Resistor Muliplier" dial to the value on the external pot and then press the "Aquire Data Point" button. Then you have to rotate the dial on the VI and the pot and hit the aquire button again to get the second point and so on. This can get a little tedious. So I wanted to have the Resistor Mulitpler increment by 1 every time the "Aquire Data Point" button was pressed. I have used parts of code I found online to do this, by using a case structure inside the While Loop. The case structure inside a while loop works great (I tested it in a seperate VI), but the problem is that when I use it in my VI, the multiplier never gets above 2, because there are multiple while loops and they keep resetting the value. I have used shift registers, but I must need some other form of "remebering" what value the button is on. I have tried the shift registers on all of the While Loops (three in total), and I get the same result, or close to it, each time, resetting of the increment value.
I have attached my VI and tried to add descriptions to most of the parts.
Any help would be greatly appreciated.
Kenny
Kenny