LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID controlling with continuous AI and AO

Hello, I am trying to do the positioning PID control but I am struggling with some problems while running the vi with USB X series. 

 

The desired speed is just a sine wave at 1Hz or maybe less than 1Hz and I think it should be a continuous waveform, not the one or N sample. The analog input is a signal generator or AI as a setpoint (reference) and I have AI for my displacement sensor and the output after the PID parameter goes into AO for the amplifier of the motor. I think the sampling freq should be kept in 1k~10 kHz since the sensor can measure within that range. 

 

1. I wanted to track the error so I used a numeric palette to subtract the reference and the process variable. But then it gives me the error as shown in the Figure. 

 

2. The analog output after the PID parameter seems like not giving the continuous signal. 

 

Please share your experience and guide me to solve this problem. 

 

Best regards

Download All
0 Kudos
Message 1 of 2
(1,532 Views)

Most of what I'm inclined to say I already said in this recent thread.

 

Your first order of business is to understand the constraints you're dealing with - USB latency, Windows timing variability, further latency if doing buffered hardware-timed acquisition or generation.  It might not be feasible to do the kind of motion control you intend with the platform you have.

 

 

-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 2 of 2
(1,485 Views)