LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

AC signal spikes after running for a while

Hey all! I'm using serial communication with two analog inputs , voltage & current from the arduino to labview. When I run the program, the voltage & current signals show a smooth sine wave. But after around  30secs -1 minute, it will start to show spikes and as time passes, the spikes become more regular affecting the reading by a lot. 

How can I make the signal more stable? How can I remove the spike? I don't see a problem with the hardware and I'm just serial printing the two values into labview. What is causing the spike?

I found some topics regarding removing of spikes and I tried them(median filter) but it won't work? My signal becomes square sine-wave and my values become incorrect! What can I do to solve this problem? 

Download All
0 Kudos
Message 1 of 6
(3,497 Views)

Hi lamela,

 

when you have "spikes" in your indicators, you will have "bad" values in your received string.

Did you debug your VI? Do you know how the received string looks like when you see "spikes"?

 

From your VI we cannot tell you much, it's all in your data. Do some debugging to recognize a pattern in the "bad" data. Once you know this pattern you can easily detect communication problems…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,453 Views)

How do I debug? My current signal only has a high spike whereas my voltage signal has two spikes, normal & high spike.The spikes give very high values(around 60000 for voltage)..

Are there any techniques or anything to find and solve the problem of the spikes in the AC signal? What do you think caused this? Why would it suddenly have spikes after a certain period of time after I run the program? What should I do? Do you think there's something with the serial communication from the arduino to labview that cause this or anything to stabilize it?

0 Kudos
Message 3 of 6
(3,413 Views)

Hi lamela,

 

Are there any techniques or anything to find and solve the problem of the spikes in the AC signal?

Yes, sure: Use conditional probes…

 

What do you think caused this?

As in all your other threads before: problems with communication over (virtual) serial port…

 

What should I do?

Start debugging as said before…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(3,404 Views)

What is conditional probes? I still can't find what's the problem.. but I've seen the readings on the arduino serial monitor and there is no sudden change in value. So I'm assuming the problem lies in my labview code. Please help! The project of my deadline is this Friday! 😞 Is it related to the bytes read on the VISA read? Because I tried increasing the bytes and the signal becomes more stable? 

0 Kudos
Message 5 of 6
(3,303 Views)

For debugging: 

http://zone.ni.com/reference/en-XX/help/371361L-01/lvconcepts/debug_techniques/

 

Now, to be able to help you with serial communication, we need to know if the protocol has a Termination Character. 

By default the VISA has a \n as a Termination Character. 

You should not need to change the buffer of the VISA, or a delay. 

 

0 Kudos
Message 6 of 6
(3,228 Views)