LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

myRIO1900 Analog Input wave problem

Hi guys, first of all sorry for my bad english and for low quality pictures.

I'm here to ask help, because I have some problems with Analog data input of myRIO 1900 in LabVIEW 2015.

I need to acquire a couple of analog signals (voltage and current) and analize them in real-time with the Power suite, and also save every value in an Excel file for later analysis. Using myRIO analog input Express VI, I can acquire data from analog channels of myRIO (double 64-bit real) and display them correctly on a waveform chart (10Hz sine wave). But I need "waveform" type of data to use the power suite VIs, so I tried to create an array containing every value acquired on i-position (with i=index of while loop) and then build a waveform ready to be analized.

My problem: if I plot the result array and save that array in an Excel file, seems like the wave increase continuously her frequency (see attached files, in the Excel file the first 100 values of the array give a sine wave with a lower frequency than the last 100 values).

So I tried to pre-allocate a 5000-dimension array of 0s and replace every 0 with current input value and it works well (for about 5 seconds, until array was filled). Furthermore the pre-allocation spend a lot of initial time, the big is the array and the big is the initial lost time.

Thank you for any help, it will be highly appreciated.

Download All
0 Kudos
Message 1 of 4
(3,256 Views)

hi,

The best and most performing way to generate a sine wave with the myRIO is to do it with FPGA. The onboard FPGA works completely in parallel and wouldn’t need some CPU resources.

The 2 following links should help you to generate a sine wave on the analog output from myRIO.

 

SineWave Generation using LabVIEW FPGA

http://www.ni.com/example/27860/en/

 

myRIO FPGA Sine Wave Sound Output

https://decibel.ni.com/content/docs/DOC-36045

 

Hope this is Helpfull

 

Kudos Welcome 😄

 

Regards,

Santhosh Joel

Certified-LabVIEW-Associate-Dev_rgb (2).jpg

Certified LabVIEW Developer
Best LabVIEW Programmer @NIDAYS 2015
0 Kudos
Message 2 of 4
(3,197 Views)

Try Disabling Autoscale X-Axis of waveform chart and manually set the time window by double clicking the end time on chart window

 

Ahmed Zahid

CLAD

0 Kudos
Message 3 of 4
(3,130 Views)
Already tried Ahmed, but thank you anyway.
I think that was an aliasing problem of the ADC: setting 21ms in timed loop structure (with an internal clock of 1kHz) the problem seems gone and I can acquire correctly my 50Hz wave.
Now if I use some heavy Express VI the problem returns so I think that the time balance of my VI is quite unstable.
Thanks guys for help
0 Kudos
Message 4 of 4
(3,118 Views)