07-10-2012 03:54 PM
Is the shift register a module in LV?
In addition, can i set the initial value of DAQ3 to zero and when there is input signal, it changes to real value?
07-10-2012 04:00 PM
@Wei_W wrote:
Is the shift register a module in LV?
In addition, can i set the initial value of DAQ3 to zero and when there is input signal, it changes to real value?
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
The problem is that you have simplified things way too much. Motion control is actually a sophisticated subject. It now sounds like you are saying you don't have a LabVIEW problem, you have a motion control problem in that you don't know how to handle the step change in speed that occurs when you change the speed of your motor from zero to something.
You need to become familiar with control loops. You might need to implement a PID control algorithm in your feedback system to handle your control/motor/feedback system.
07-10-2012 04:03 PM
I will read the files you sent me. Thank you for your kind help.
07-10-2012 04:03 PM
Hi, Just right click where the data comes into the loop and change it to a shift register.
This example does nothing but feedback the same value every 250ms. Replace the orange line with all your code. At the output of the loop, send out the #4 data. Then at the input of the loop your #3 will receive the data from 4. The constant outside the loop is the initial value of zero, it will be replaced ( in your code) by the output from #4.
Please review some examples and some of the help for using shift registers, you will be very happy.
07-11-2012 02:21 PM
Thank you for your help. Could you help me figure out where to wire the shift register ?
07-11-2012 02:50 PM
Hi,
You took both of the DAQ Asst. out of the loop. For feedback they both have to be in the loop.
However, now I am not sure what is the feedback now that you have posted a VI. I was assuming the DAQ 4, which in this new attachment is DAQ 2, would have an output, and that the output would be feedback for an input to DAQ 3, which on the new attachment is DAQ.
You said "there should be an output at the output terminal (DAQ Assistant 4). Then the Feedback (DAQ Assistant3) is able to read in data and trigger the function in the Mathscript module". However, there is no input at 3 or output at 4.
Please identify the output that will be the feedback, and the input that will receive the feedback. I am assuming that you are not talking about hardware feedback, as in the DAQ 4 sets the system so that feedback effects are then measured by DAQ 3. You want software feedback yes?
07-11-2012 03:45 PM
Yes, I would like a software demo if possible.
The control system is attached. DAQ is where the feedback signal comes in and DAQ 2 is the output. User Input in LV is the input of the control system.
My problem is when have all devices connected, if there is no input to DAQ then there is not output to DAQ 2 even though i set an value to User Input in LV. But the correct order is when I give a value to User Input, it should be written to DAQ2 which make the devices run. Then the DAQ is able to collect the feedback data from the devices.
Thank you.
07-11-2012 03:56 PM
DAQ has only an output, DAQ2 has only an input. If the feedback you want is implemented in hardware, you are good to go.
If you want software feedback, in your program, from DAQ2 to DAQ, you have to have an output on DAQ2 and an input on DAQ.
The way your program is, there is never input to DAQ, and never output from DAQ2.
Are you interchanging the meaning of DAQ to be both hardware and the LabVIEW DAQ assistant?
****
You said "if there is no input to DAQ then there is not output to DAQ 2". Are you talking hardware? If so, put DAQ 2 first in the loop, then the formula, then DAQ. All in the loop. Initialize the shift register to 0 ( outside the loop) for the first run.
07-11-2012 04:15 PM
I mean if there is no input to DAQ Assistant in Labview then there is not output to DAQ Assistant 2 in Labview. they are just different ports on a real USB DAQ device.
I understand the data flow of the Labview code is the problem and I hope to change the order of execution of DAQ Assistant and DAQ Assistant 2.
As you suggested, I can use a shift register to give an initial value to DAQ Assistant as the initial feedback. But I am still confused about how to wire the system in Labview. It is appreciated if you could help me with this.
Thank you.