LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Constant current

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?

0 Kudos
Message 1 of 21
(1,089 Views)

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 21
(1,076 Views)

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 

0 Kudos
Message 3 of 21
(1,051 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 21
(1,013 Views)

Just posting additional points to consider while designing the solution.

  • How accurate is your 50 ohm? (1%, 5% etc.,)
  • What range of load in ohm you may need to support?
  • what accuracy do you need for the 100mA?
  • Do you foresee the need to force values other than 100mA, if yes, what range?

 

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?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 5 of 21
(1,007 Views)

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

0 Kudos
Message 6 of 21
(958 Views)

Hi,

 

I have created a small program for my application using PIDPID_program.PNG. 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?

0 Kudos
Message 7 of 21
(956 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 21
(954 Views)

Is it ok now?PID_program_1.PNG

0 Kudos
Message 9 of 21
(934 Views)

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 21
(926 Views)