11-22-2011 03:18 AM
Hi. I'm new to labview 2011, and I need to calubrate a power meter. I am using an arduino and the Labview Interface for Arduino toolkit to aqcuire the data, then manipuylating it to get voltage, current and calculating power. How would I go about calibrating this? All I want to do is have it Correct the offset if there is any if a button is pressed. I have absolutely no idea how to do this or what I am doing for that matter. I am attatching a copy of the labview code I have so far. This works to my specs, but I just need to incoorperate a calibration algorythm in it. Thank you in advance.
11-22-2011 05:01 AM
How would I go about calibrating this? All I want to do is have it Correct the offset if there is any if a button is pressed. I have absolutely no idea how to do this or what I am doing for that matter.
How much offset did you get? I have no idea about your project. Is it changes always?
You would need to provide much information on this.
I have some suggestions for you. Why you used many error wires? Why not with one wire going through all VI's. That would be better and it can reduce some code.
11-22-2011 01:12 PM
Sorry I was in a very sleep deprived state when I posted this... My professor wants a calibrate button added that in the event that the sensor is giving blatenly false data, you can recalibrate the device and have it back on track. I am just unsure on how to get started designing a calibration algorythm for this project. I am having 2 inputs on the analog pins of my arduino for voltage and current, and they are used to calculate voltage, current and power. The file I have on here is what I used to create the .exe file that will run on the users computer. It is supposed to save the data for V,I and P every 2 seconds and write it to a text file. That part I have and understand how I did it. Like I say, I just have no idea how to calibrate it in the worst case scenario.
11-22-2011 01:19 PM
My professor wants a calibrate button added that in the event that the sensor is giving blatenly false data, you can recalibrate the device and have it back on track. I am just unsure on how to get started designing a calibration algorythm for this project.
How you recalibrate sensor? You need give the information. Now, you are just acquiring the data and calculating the required values.
But, if you know when the senor become bad and how to reset the sensor from arduino. You can control this operation from labVIEW.
11-22-2011 01:35 PM
Ok so I just talked to him and I got more information. There was a miscommunication. He wants a bottun/switch that goes between run and calibrate. If it is in run mode, it runs what I have in teh VI already. If it is in calibrate mode, he wants it to prompt the user to disconnect everything, and this will represent our minimum value. Then he wants it to say, ok connect to the battery, which will represent the maximum value and connect a voltmeter in and enter the value from the voltmeter into the box, which I need to add. Then repreat this process for the current.So basically I am entering the min and max values and determining the scaling from there. I understand this a lot better after that clarification, but I don't know how to do this in labview.
11-26-2011 05:36 AM
So can anyone help me? I only have my labview eval for another 4 days...
11-27-2011 12:52 PM
It may easier for you to use a state machine. There are lots of examples here on the forums. This is something to get you started. Basically you would have the following states: run, calibrate, wait disconnect, wait connect, get volts, get current, etc. Using a state machine makes it easy for you to do something like veryfy the battery is disconnected when the user says it is. (Of course don't do that if it is not part of your requirements - I'm just using this as an example)
To get user input you can use the prompt user for input express VI. I personally would use a subVI set to run as a dialog under File/VI Properties/Window Appearance. But the express VI might be quicker.
11-27-2011 12:55 PM
@Trgehring wrote:
So can anyone help me? I only have my labview eval for another 4 days...
It sounds like you are a student. It only costs $20.00 for the LabVIEW student edition.