topic Re: Simple control at higher frequency, and data writing at specific intervals? in LabVIEW
https://forums.ni.com/t5/LabVIEW/Simple-control-at-higher-frequency-and-data-writing-at-specific/m-p/3001053#M859398
<P><SPAN>Hello Vr6Fidelity,</SPAN></P>
<P><SPAN> </SPAN></P>
<P><SPAN>To make sure I understand your question, you would like to count the number of cycles for your actuator but the current implementation doesn't work. Is that correct?</SPAN></P>
<P><SPAN> </SPAN></P>
<P><SPAN>Looking at your VI, you are adding one to the current iteration number if the % error is below the % error threshold. This sum is then being compared to the desired number of cycles for stopping the program. However, between iterations of your loop the values added by the "Boolean To (0, 1)" do not carry over to the next iteration. Under the current implementation: if the error threshold is met during loop cycle<SPAN> </SPAN>zero, then the index value of<SPAN> </SPAN>zero will increment by one and the completed number of cycles will display a one. However if the second loop cycle does not meet the error threshold, then the index value of one will not increment and the completed number of cycles will still be one. Is this the desired behavior?</SPAN></P>
<P><SPAN> </SPAN></P>
<P><SPAN>Thanks for the clarification! I'll be better able to assist you once I better understand the functionality you would like to implement.</SPAN></P>
<P> </P>Mon, 22 Sep 2014 22:44:32 GMTLemongrab2014-09-22T22:44:32ZSimple control at higher frequency, and data writing at specific intervals?
https://forums.ni.com/t5/LabVIEW/Simple-control-at-higher-frequency-and-data-writing-at-specific/m-p/2998225#M858904
<P>Hello Labviewers!</P>
<P> </P>
<P>I would like to write a VI that controls an electric actuator. I have an input from a load cell that I will be monitoring with my DAQ. I would like to control this value to provide force control to an external system which will be changing with time. To be clear, My output will need to continously adjust to stay at the desired setpoint of the input. The input is a voltage proportional to a force, and the output will be a voltage to an actuator. I would like to control the actuator at a reasonably high frequency, a few hundred hz and have the VI cycle between values.</P>
<P> </P>
<P>A typical cycle would be square wave shape, and i would like to count the cycles in the VI. For example 200 cycles of +100 lb to -100lb.</P>
<P> </P>
<P>So basically the Vi starts up, and starts cycling the actuator closed loop, controls at the desired +100lb setpoint for a preset time (2 seconds) then changes to control at -100 pounds for another 2 seconds and so on for 200 cycles and then stops. </P>
<P> </P>
<P>I am using Labview 2009 SP1. </P>
<P> </P>
<P>I have attached my crude attempt at a VI, but I was having a bit of trouble with counting the cycles and writing a generally good control VI. </P>
<P> </P>
<P>Any advice here? Thanks! </P>
<P> </P>
<P> </P>Fri, 19 Sep 2014 15:21:20 GMThttps://forums.ni.com/t5/LabVIEW/Simple-control-at-higher-frequency-and-data-writing-at-specific/m-p/2998225#M858904Vr6Fidelity2014-09-19T15:21:20ZRe: Simple control at higher frequency, and data writing at specific intervals?
https://forums.ni.com/t5/LabVIEW/Simple-control-at-higher-frequency-and-data-writing-at-specific/m-p/3001053#M859398
<P><SPAN>Hello Vr6Fidelity,</SPAN></P>
<P><SPAN> </SPAN></P>
<P><SPAN>To make sure I understand your question, you would like to count the number of cycles for your actuator but the current implementation doesn't work. Is that correct?</SPAN></P>
<P><SPAN> </SPAN></P>
<P><SPAN>Looking at your VI, you are adding one to the current iteration number if the % error is below the % error threshold. This sum is then being compared to the desired number of cycles for stopping the program. However, between iterations of your loop the values added by the "Boolean To (0, 1)" do not carry over to the next iteration. Under the current implementation: if the error threshold is met during loop cycle<SPAN> </SPAN>zero, then the index value of<SPAN> </SPAN>zero will increment by one and the completed number of cycles will display a one. However if the second loop cycle does not meet the error threshold, then the index value of one will not increment and the completed number of cycles will still be one. Is this the desired behavior?</SPAN></P>
<P><SPAN> </SPAN></P>
<P><SPAN>Thanks for the clarification! I'll be better able to assist you once I better understand the functionality you would like to implement.</SPAN></P>
<P> </P>Mon, 22 Sep 2014 22:44:32 GMThttps://forums.ni.com/t5/LabVIEW/Simple-control-at-higher-frequency-and-data-writing-at-specific/m-p/3001053#M859398Lemongrab2014-09-22T22:44:32Z