From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Spike during Acquisition

Dear forum,

 

I am using NI USB 6229 BNC which connected to current pre-amplifier SR570 (RS232).

I use LabView 2018 (64-bit)

I found a problems that there is spike during acquisition. at first, i thought it was caused by the amplifier.

I confirmed with oscilloscope and found nothing.

So I guess it is caused by the acquisition process.

two condition that might cause the spike.

1. changing value of numeric control inside while loop.

2. during measurement (no changing at all)

Here I attached the graph.

I want to know what the cause of this spike and possible to avoid this spike during acquisition. 

 

0 Kudos
Message 1 of 9
(2,762 Views)

Your graph is missing.

 

Attach your VI as well.

 

0 Kudos
Message 2 of 9
(2,761 Views)

Dear RavensFan,

 

Here I attached the image.

it is normal VI. acquiring some Analog Input Channel and generating some Analog Output Channel.

Everything is located inside while loop.

Download All
0 Kudos
Message 3 of 9
(2,759 Views)

That's not a VI, but just a screen shot of part of a block diagram.  What's happening in the rest of the VI that is cutoff?  Is there a loop in this VI?

 

Those spikes seem pretty insignificant in terms of current, just fractions of 10's of microamps.  Are you stopping and restarting this VI?  Because I see breaks in your plots and the spikes seems to occur immediately after these breaks.

0 Kudos
Message 4 of 9
(2,748 Views)

There is no other loop, beside For Loop for creating waveform as you might have seen.

the rest is indexing multiple waveform management.

even it is 10's uA, i think it still affects the data. the current is the result of calculation from voltage (that have been gained by amplifier SR570) and certain sensitivity. it is calculated as follows.

current = volt (V) x sensitivity (A/V).

so it there is spike on current, probably the voltage will be high too forcing the sensitivity value to be changed, so it is not overload.

the breaks on the signal were caused by the while loop. since I put everything, like DAQmx Start and Stop inside while loop, so there is a delay between acquisition each loop.

 

0 Kudos
Message 5 of 9
(2,738 Views)

You say there is no other loop, but at the ned you say you put everything inside the while loop.  Which is it?

 

Please don't tell me you are using the run continuously button.

 

Don't keep starting and stopping the task.  Just start it once, continuously acquire in the loop, then stop the task when you stop the while loop.

Message 6 of 9
(2,732 Views)

yes, I used only one while loop for all tasks and for loop for generating waveform. 

I mean, indexing and separating multiple waveform, so I can calculate the resistance/conductance and show some graph as you have seen.

No, I were not using Run Continuously button. but, In DAQmx Timing, I use the continuous sampling mode, while to run the program I just hit Run Button.

ok i will try your advice.

forget to ask, so probably the spike was caused by stop and start the task repeatedly by while loop?

0 Kudos
Message 7 of 9
(2,727 Views)

@abuzahra wrote:

forget to ask, so probably the spike was caused by stop and start the task repeatedly by while loop?


I don't know for sure, but that's my suspicion.

Message 8 of 9
(2,720 Views)

Thank you for your answer.

yes, probably the cause of that spike due to start and stop of looping condition repeatedly.

0 Kudos
Message 9 of 9
(2,672 Views)