11-10-2009 06:39 PM
Hi i am new user to labview.
I have a question about to control a acutator position
I have a pot meter that i read out between 0-10 volts on 6008 ,then i control a digital out put on port 0 bit 4 (for down) bit 6 (for up)
I want to set a certain value let say 8.6 volts on pot meter and the motor have to go up or down to reach the value that it put manual in
I can control it now (as i seen a example file with labview) but i really have no idea how to let the motor go up or down automaticly to desired value and then stop
Any one who could help me?
thanks in advance
11-10-2009 06:47 PM
Sure!
I can help explain what you see. Of course, I'll need to see it too!
Can you post the code in question?
11-10-2009 07:04 PM
well that fast thanks jeff
remember i do not have a input field yet!
For the value of the wished value of pot meter
11-10-2009 08:46 PM
well here a version
with slider and controls from the channels
how can i make it go to the slider value?
11-11-2009 04:47 AM
You want to build up a controller.
Fist step: read the pot and get the offset by subtracting it from the setpoint.
Simple 2 point controller: depending on the offset move the motor up and down. Disadvantage: The motor will tend to never perfectly hit the setpoint and will always move up and down.
Simple solution: Include a dead band (Don't move if the absolute value of the offset is within a defined range), however you have to live with that dead band error.
Your motor will need some time to accelerate and will probably not stop right after being powered off. More sophisticated controller take that into account.
Also there might be a some hysteresis in the mechanics, the motor might need a minimum turn on time or startup power due to friction....
Next point: Your acquisition will always be behind reality (1µs ...100 ms)...
More sophisticated : Use PWM to control the motor speed ....
11-11-2009 06:42 AM - edited 11-11-2009 06:45 AM
Here is a 10 min quick try (right after lunch 😉
I don't have a DAQ here, so don't expect to have it run the first time 😉
Base was an example that i modified, however I don't know if the DAQ is setup correctly
11-11-2009 10:22 AM
Well henrik i tried
well i am missing a file it seems at least like that
get terminal name with device prefix .vi
And pwm is no option since i cannot control it with a 6008 and since it for out door use with small battery and laptop and price for other setup is too big i really have to go this way
i Think i have to live with the band error
cees
11-12-2009 07:33 AM
get terminal name with device prefix .vi
I need this file
No where on my harddisk i can find this file ,altough i have read i should be in a example file but the named example file is also not on my harddisk
Our local support guy at national instruments does not give any answer ,it not his problem he says i have no idea where you can find this file
Is there any location on the web site where i can dowload the example file's?
Cees
11-12-2009 07:42 AM
11-12-2009 06:49 PM