04-01-2014 07:02 AM
Hi Guys,
I am trying to control an actuator and using the output from the actuator to control my DC fan. I want my actuator is at 0V the fan will stop and when the actuator is at 10V the fan should turn on. I have attached a copy of my code. Please can someone direct me as I am running out of time to complete this task, thanks.
Regards
04-11-2014 04:31 AM
Hi Manni,
How far have you got in getting this working? I'd recommend you try and get one part of the code working first. I noticed there's a broken wire in the False case of your DC fan case structure.
Have you managed to get the Actuator working separately from the DC fan? I've spotted that you'll need to use the "Daqmx Start task" function in order to kick the task off and running in order to output data.
I'd give the example files a look by going to Help>>Find examples>>BrowseTab>>Hardware Input and Output>>DAQmx and then choose the type of signal you'd like to create.
I'd also recommend using a digital output if you have one that goes to 10V if you just need a flat 10V DC and 0V. This will make the coding a lot easier.
Thanks
James
04-15-2014 08:30 AM
Hi James,
Sorry for late reply, I have the actuator and the fan working. Howevger, I want to add my temperature VI measurement using RTD to the VI. I am using a PID controller, I want to use the voltage output from the PID controller to drive the actuator and the fan. So basically I wanto tune my PID so that it can give 0V to 10V. Please can you look at me VI that I attached and help me out with how to tune and implement this. Looking forward to hear from you soon, thanks.
04-15-2014 10:34 AM
Hi Manni,
On your create daqmx virtual channel for the resistance, you can left click and select analog input, temperature and then RTD which might make it a bit easier.
Just to work out how it's working. It looks like you're taking the RTD measurement and then performing some maths on that in the funcion node. That's then passed into the PID function with your setpoint and the gain values for P, I and D to give you your output?
What exactly are you trying to do with the PID? Ie.... what are the inputs and what is the desired output meant to be?
Thanks
James
04-18-2014 04:45 PM
Hi James,
I was trying to tune my PID so that I can generate 0v-10v. I have been working on it and can I have achieved what I was trying to do.
Regards