LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dual loop control for positioning system.-- motion ocntrol

Solved!
Go to solution

I am currently doing a dual loop control for a positioning system,  i use the tachometer to read the velocity and the position encoder about the position of the platform. 

the problem i am currently encounter is that i am not sure weather the computer have the PID toolkit, because i can not find them under the control design and simulation module.  so i did a PID  use the basic labview functions, related information is in the attached documents.

i am not sure about the dt part, did the labview have this kind of function like to calculate the simpling time??

 

do i have to install the labview real_time potion? i am right using the labview 8.5

another question is that, how i am going to let the system remember the position instead of return to 0 every time i  restarted the program? otherwise is there any other way that i can command the motor to move to the target position which is initially defined? 

 

the last question is that that is it possible for me to generate a profile regarding the current and the desired position? to set a maximum velocity and acceleration.

 

i do not have a motion controller, so i did not install the  motion and version module. 

 

can some one suggest me a way to do this?

0 Kudos
Message 1 of 9
(3,434 Views)

hey, yes in order for you to have the PID block you'll need the PID control toolkit installed. I can't see any documents attached to your message so maybe you forgot to attache them?

About the sampling time: you could use the "wait until next ms multiple"  function so you make sure you are always porcessing at a constant rate (which is necessary for stability in the controller)

The real time module would make things simpler since it allows you to use timed structures, but i suppose you can get by by using the wait until block.

For the program to remember another position different from 0 very time it starts, you could use the "make current values default" function at the Edit pallete. Or maybe use the feedback node .... (?)

Most certainly the least ellegant, and certainly-effective way would be to create a file at the end of the program where you record the information you want it to remember at the begining. (and you read it when you start the program)

 

About the current and desired position: not sure i understood correctly, but yes. You can  create programs that limit you command signal within a certain values (max min) (i.e.: velocity) and also you can control how fast it'll grow (i.e. acceleration) 

 

by the way, what hardware do you have? i mean how are you planning on controlling the thing you are developping. (DAQ maybe?) 

0 Kudos
Message 2 of 9
(3,422 Views)
attached is the files.
0 Kudos
Message 3 of 9
(3,384 Views)

i have attached some of the files, i will use a simple DAQ system to do the job, the DAQ board only have 2 counter and AO- AI nodes. i can only send a voltage signal to the motor which is proportional to the velocity. 2 feed back to read the position and the velocity.

 

they way you suggested  to crest a file and read a file i think is quite workable.

 

i have attached the PDF document, which mentioned about the user defined PID components,  is it possible for me to just use those PID conponents?

because i can not fine the PID toolkits in the control and simulation module. do i have to restore this module?  

0 Kudos
Message 4 of 9
(3,382 Views)

Your control and simulation module is alright. do not re-install or anything (it doesn't bring the pid bocks) i suppose, by just glancing through the paper you attached that you can use your own bocks to do the job.

 

My LabVIEW version is older than yours so i couldn't open the vi's you sent. sorry.

 

 

0 Kudos
Message 5 of 9
(3,372 Views)

The program is working now. but i still have a problem on the initial position.

when i have stored the position into the file.

how can i read the initial position use the DAQ assistant? 

can i send this initial position information into the DAQ assistant? how?

is there any other funtion for me to read the initial position?

 

consider about the first option,   make current value default. what does this mean?

because there are more than one value input to the program, and they may changing according to the adjusting. make the value default, does it mean that the value can not be changed anymore?? can you explain this a little bit for me?

 

0 Kudos
Message 6 of 9
(3,345 Views)

making something it's default value means that when you start your vi it'll start with that value. try this. make a vi that takes two numbers to add them and then show you the result.

run it once.

then go to edit>>make current value default

then save your vi.

close it.

now open it again, and this time the values you see as "default" are the ones you saved in your previous run. 😉

 

now about how to read the initial position.... that depends on your plant.

So you are using a tacometer and encoders... so i suppose tacometer is a determined value of V proportional to the speed. So i suppose your problem is not this measurement, is it? but rather the encoder reading, right?

if it's an encoder then the problem is that encoder readings are incremented from when the board starts countin(i.e.:relative positioning)... right? then two possible solutions i can imagine:

a) ad a home switch to your plant, this is a switch that indicates when you are at the starting position, and start counting from there (absolut position)

b) if your encoders have a home signal, use that signal for absolute positioning. (your encoder is already absolute)

 

did this help? 

0 Kudos
Message 7 of 9
(3,333 Views)

making current value default sames doesn't work, each time i started the program, the initial value will be sated to 0 according to the DAQ assistant default, and there is no such option for you to input the initial position, but i figure another way by using the DAQmx creat channel VI, this VI enable me to set the initial position.

Right now, the problem i am facing is that how to read the last value that i have read from the position output. i use the stop button to start the write to measurement file, will this store the last position value??

which kind of file format should i use? how can i read the tdms file if i want to check weather i have got the right position value?? 

0 Kudos
Message 8 of 9
(3,308 Views)
Solution
Accepted by topic author fourteen

Hey, 14 i've never used TDMS files. but maybe this will help. [zip file]

 

and if it doesn't, i found this (which you can probably read in it's equivalent in english)

 http://digital.ni.com/public.nsf/allkb/099731B9B31936B08625745A0076A610

 

[don't forget to kudos] 

Mensaje editado por Nihil
0 Kudos
Message 9 of 9
(3,283 Views)