I'm new here so I apologize if I posted this on the wrong board
This is my "situation":
I need to make a simple PID controller which takes information (process variable) from an outside source (a NI's DAC connected through the USB port ) which is accomplished using NI-DAQ as an input, and the PID's output goes to the second NI-DAQ which is also connected using DAC to an actuator which in my case regulates the air pressure. (VI attached)
My problem is the following.
Both of the NI-DAQ I placed using DAQ Assist, require to be in a while loop.
-If I place them in separate loops, I have the problem of passing information between the Input NI-DAQ and the PID, and also between the PID and the Output NI-DAQ.
-If I place them both in one big loop, an error occurs saying that the selected buffer size is too small (Error -200609).
The timing settings for the DAQ's N samples, 100 samples to read at the rate of 1k (I also tried with Continuous samples and many different combinations of Samples to Read an Rate but without success).
Should I wire them with the same dt(s)?
The other thing I need to do (I'm also writing it here in order not to open new topics) is show the following 3 signals on a Graph (process variable (dynamic data type)(range 4mA - 20mA), PID output (double)(range 4mA - 20mA), and the Set Point (double)(range 0 to inf))
Firstly, is it possible to show the first two on a scale from 0 to 100 without changing the PID's output which needs to be 4-20?
Secondly, which graph should I use if I have different data types? (I tried the Waveform Chart, and succeeded in showing the first two; the third just messes everything up)
I would also have to make a legend explaining which signal is which (I see that this is possible with the Mixed Signal Graph).
I know this is probably too much to ask, but I'd be grateful for any help
Thank you in advance
PID while.vi 100 KB