LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Program cannot adjust current corrrectly

My program is to inject current into a substrate and measure voltage across it.Resistance is then computed using this two values. When the voltage is within the range of 0.5~5V, the program will continue to run with this current. If voltage is out of range, my program will increase or decrease current until the measured voltage is within this range. However my program can increase the current when voltage is out of range but when voltage is within range, it will inject the initial set current. I have use Cases for this function, is there something wrong with the case I use. Pls Help!!! I have attached the program and drivers for my measuring equipment. Thanx
Download All
0 Kudos
Message 1 of 5
(3,496 Views)
Hello Clara,
I do not know if it helps, but have you tried to debug the variables comming to your "hart" of controling the current. There is a very nice way in LV to debug all lines in your vi. Then you can see where the problem lies. If it is in your code or maybe it is in the driver itself. It happens also.
regards
Pawel
0 Kudos
Message 2 of 5
(3,496 Views)
When your voltage is out of range you go through formulae which change your Current source, shown in an indicator. When your voltage reaches the correct range, it sets back to the control value you have wired it to.

What you need to do is wire your Current source to a shift register on the main execution loop so the latest output is used. I have included an example of this for you. You could also dispense with the formulae and increment the Current source by adding or subtracting from the shift register.

A little point to note.. if you wire from left to right, then it makes it much easier for others to understand your code. It took me a while to realise that the current output was actually the end of your sequence.

I hope this helps you
..

Kim
Message 3 of 5
(3,496 Views)
Thanx a lot... finally solve my problem. Sorry about the way I program coz this is my 1st time using labview to program my application.

Can I convert my .VI file into .exe file? If yes, wat are the steps required, can I run this .exe file on any PC which do not have any Labview Program installed? Thanx for your attention.
0 Kudos
Message 4 of 5
(3,496 Views)
Oh, i'm glad it worked! Makes it all worth while. *smiles*

To build an executable (.exe file) you need the application builder from NI. If you have it you will see 'Build Application or shared library' under the Tools menu.

You will need to install the LV runtime engine to run the executable on a PC without LV or without the same version of LV. You can include the Runtime engine with the application build by creating an installer. Or you can download the runtime engine from the NI website and install it yourself (make sure you download the same version as your LV version).

Good luck!

Kim
0 Kudos
Message 5 of 5
(3,496 Views)