11-20-2023 05:28 AM
Hi
I am new to LabVIEW, I would like to generate a 5V DC signal using the AO channel and feed it to a power amplifier to get an A current of 100mA across a 50 ohm resistor continuously. It is possible that the value of the current will decrease over time, so I need to constantly monitor the current at the output of the amplifier and change the input value accordingly. What is the best control logic I can use to implement this? Is it the PID control loop or is there something else available in LabVIEW?
11-20-2023 05:46 AM
Hi gok,
@gok010 wrote:
It is possible that the value of the current will decrease over time, so I need to constantly monitor the current at the output of the amplifier and change the input value accordingly. What is the best control logic I can use to implement this? Is it the PID control loop or is there something else available in LabVIEW?
A PID control can (most often) easily handle your task: all you need is to measure the current to change the output voltage as needed…
Would it make sense to use some dedicated hardware (aka "constant current supply") to achieve your goal?
11-20-2023 06:33 AM
Your idea sounds good, unfortunately we do not have constant current source. Is it possible to use DAQ assistant to acquire and generate signal with the PID controller and How about the tuning of the PID do I need to adjust the values of the constant or just go with the default values
11-20-2023 08:09 AM
Hi gok,
@gok010 wrote:
Is it possible to use DAQ assistant to acquire and generate signal with the PID controller
Yes.
I would recommend to use plain DAQmx functions instead of the ExpressVI…
@gok010 wrote:
How about the tuning of the PID do I need to adjust the values of the constant or just go with the default values
Yes, you need to adjust/tune the gain values: there are generic tools/rules like Ziegler-Nichols…
11-20-2023 08:22 AM - edited 11-20-2023 08:23 AM
Just posting additional points to consider while designing the solution.
Can you share the details of the power amplifier (link to the manual)? what NI DAQs do you plan to use?
If you just need to force 100mA why not go for a dedicated circuit instead of involving a DAQ and PID loop?
11-21-2023 07:14 AM
I am using NI PXIe 6345 IO card in NI PXIe 1088 chasis. the current should be in the range of 0 to 300mA in for both AC and DC. I have to generate the input signal using the DAQ device no other devices are available except a power amplifer
11-21-2023 07:18 AM
Hi,
I have created a small program for my application using PID. I do not have the access to the hardware now and not sure the program would run successfully or not. Could you please take a look at it?
11-21-2023 07:21 AM
Hi gok,
@gok010 wrote:
I do not have the access to the hardware now and not sure the program would run successfully or not.
I don't think it will run correctly, due to DATAFLOW issues!
The PID will generate an output value just ONCE after the AI loop has finished and the AO will output that value just once. PID control typically is done in a loop…
11-21-2023 07:57 AM
Is it ok now?
11-21-2023 08:59 AM
Hi gok,
@gok010 wrote:
Is it ok now?
No.
Now the AI loop will send an array of PID output values to your AO loop - after the AI loop finishes…
Still "THINK DATFLOW!" problem!
Place AI and AO in one loop, together with PID function!