LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Formula node speed of execution for PID control


@sirius18 wrote:

Also, how do I make the timed loop structure run continuously? As in, I need the loop to restart after every 10ms. After wiring everything together, I could only make the loop execute once. And then, the VI stops running.



Show us your code. Does the loop termination terminal get the correct boolean?

0 Kudos
Message 11 of 12
(505 Views)

Can you show a code snapshot of the DAQmx task with slow writes?   I'm guessing that you're either using the DAQ Assistant (which is notoriously inefficient), or you're unnecessarily reconfiguring the task every loop.  I'll bet that can be sped up well over 100x (from 70 msec to <700 microsec).

 

FWIW, I just looked at your original screenshot.  Your translated C code has quite a bit of redundancy in all the else if clauses.  Each else if is first reconfirming the False-ness of the clause that came before it.   All your else ifs only need the condition that comes after the logical AND.

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 12 of 12
(488 Views)