ā03-31-2026 01:12 AM
Hello,
I am developing a VI to test the capacitor of a transimpedance amplifier so what I am trying to do is generate current and measure respective output voltage and calculate gain.
The problem I am having is the read block is giving same voltage no matter what current input is, I think the problem is regarding the synchronization.
ā03-31-2026 02:19 AM
Hi eleceng,
@eleceng77 wrote:
The problem I am having is the read block is giving same voltage no matter what current input is, I think the problem is regarding the synchronization.
Which synchronization are you talking about?
Did you examine the example VIs coming with LabVIEW/DAQmx? There are example VIs explaining how to sync AO and AI tasks!
Btw. do you really need 3 error in wires and 3 error out wires, even though you already chain the DAQmx stop functions using the error wire?
ā03-31-2026 03:43 AM - edited ā03-31-2026 03:55 AM
A TIA works with a feedback resistor and a charge amplifier has a feedback capacitor.
(OK, both usually have a R and a C in the feedback, however one is the effective one in the frequency range of interest š )
Both build a virtual ground at the input. (Well, nearly an input impedance of 0 Ohm, for real world charge amplifier I measured values from 10 to 1k Ohm (real part) and since the real world is complex ( š ) also some C or L ... )
If you want to characterise the transferfunction of the amplifier, you usually use a voltage source and a known (high value) resistor to create a known current or a known capacitor to create a known charge , both proportional the input voltage. You can use a capacitor with a TIA (or a resistor for a charge amp) and use the dU/dt but you have to make shure that your voltage source (DAC) produce known dU/dt , what often is a step function (stair way instead of a ramp) š
I would recomment to read two voltages (simultanious! if you have a multiplexed ADC DAQ there will be a phase shift).
If you want to read the output of your DAC, it is not a good idea to use the same clock edge. Due to small jitter in the DAC and ADC you might sometimes read the old or the new DAC value. Since the clock is known, the delay can be corrected.
ā03-31-2026 11:25 PM - edited ā04-01-2026 12:08 AM
I am new to labview. What I thought was if I start the write block first and then read block with the help of error lines then it would work fine.
I really thought every created task requires its own error line so I used three error lines for three task created.
I tested this vi on hardware and it was showing only 5.4 V no matter what the current value was.
Basic flow is:
generate current using NI-9266 at the input terminal of TIA. which has settling time of 3 s, so I am sampling the read block 5000 samples with 1250 sampling rate so it will sample till 4 s. For reading the voltage I am using Ni-9205. When I checked using multimeter the current was genrating fine from 1 mA to 5 mA with step of 1 mA. So where is the problem ?
PS: You mentioned that I am starting AI tast before AO/DO , how so ? Doesn't task starts only when both task in and error in lines reach the block ?
ā04-01-2026 01:21 AM
Hi eleceng,
@eleceng77 wrote:
You mentioned that I am starting AI tast before AO/DO , how so ? Doesn't task starts only when both task in and error in lines reach the block ?
The DAQmx tasks is started when you call the DAQmxStart function.
DAQmxRead only reads the samplesā¦
@eleceng77 wrote:
I tested this vi on hardware and it was showing only 5.4 V no matter what the current value was.
Did you correctly wire the AI module?
Did you verify the wiring by using a known voltage source (and maybe testpanels in MAX)?
@eleceng77 wrote:
Basic flow is:
generate current using NI-9266 at the input terminal of TIA. which has settling time of 3 s, so I am sampling the read block 5000 samples with 1250 sampling rate so it will sample till 4 s. For reading the voltage I am using Ni-9205. When I checked using multimeter the current was genrating fine from 1 mA to 5 mA with step of 1 mA. So where is the problem ?
Why don't you change to a more simpler approach: set the AO value, wait for 3s, then read one sample from AI!?
(Set the AI task to use "no timing", just "on demand"ā¦)
ā04-01-2026 03:18 AM
Yes, i have already tried using test panels the TIA is working fine and connections are correct.
I must use Timing block, as I need to collect multiple samples.
I tried one by one now it seems problem is in read block as it is showing constant 5.4 V output
ā04-01-2026 03:24 AM
Hi eleceng,
@eleceng77 wrote:
I tried one by one now it seems problem is in read block as it is showing constant 5.4 V output
The problem is not in the DAQmxRead function: it is either the way you configured the AI channel or how you wired the AI moduleā¦
ā04-01-2026 03:25 AM
How should I configured it ? Please can you help ?
ā04-01-2026 04:05 AM
Hi eleceng,
@eleceng77 wrote:
How should I configured it ? Please can you help ?
You don't provide code, just an image of a part of your code.
And the init stage is missing in that imageā¦
ā04-01-2026 06:05 AM
It worked. The issue was I did not configure the Create Virtual Channel correctly. The terminal configuration was default differential, I just changed it to RSE and everything worked as expected.
PS: Thank you for taking time to help me.