Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

plot analog input myRIO

Solved!
Go to solution

Hi,

 

I am new to labview and i want to plot the analog input that I am acquiring from myRIO. I have connected the function generator on the MSP connector C on AI0. After running my vi , i get the correct function but my time axis is not correct. I need the x-axis (time axis) to go from 0 to 10 seconds. But  i am unable to do it.  I have attatched the snippets along with my vi. I tried connecting the bundle with waveform graph , but it shows an error in the connection. I then connected bundle with waveform chart and the axis still doesnt improve. Pls help. I have spent more than 2 weeks on this , and i dont seem to figure out the problem. I changed the properties to "scope chart" , "sweep chart" , but no success.

 

Thank you.

Download All
0 Kudos
Message 1 of 10
(7,761 Views)

Santamaria,

 

Here is the closest I could make for you.  You need to study more about waveform and graphs, it's properties and invoke nodes...  

 

Kudos are welcomed 😉

 

Thanks,

Ajay.

--
Ajay MV


Message 2 of 10
(7,751 Views)

I modified my vi. I couldn't directly run your vi since i have labview2014. But I can't connect number of samples and the sampling frequency to the "Read.vi" . Is it because of the version that i just have two connections at the input? I an attaching the screenshot of my vi.

0 Kudos
Message 3 of 10
(7,736 Views)
Solution
Accepted by santamaria

Were you able to open the VI which I had given.?  I am wondering why you're indexing the value and feeding to the indicator.  Here is the downgraded version of the VI to LV 2014.

--
Ajay MV


0 Kudos
Message 4 of 10
(7,730 Views)
Solution
Accepted by santamaria

I saw your vi. You have used the block "Analog input N samples" . I can't find this block in my labview. I have also used the search option but i cant find it. How should i resolve this?

I have used the block "Analog input 1 sample" . Is this the problem? Because it does not take in the number of samples and the sampling rate.

0 Kudos
Message 5 of 10
(7,711 Views)

santamaria,

 

Are you using your myRIO in High Throughput Mode? According to the document linked below, you need it in High Throughput mode before you can enable the ‘N Samples’ feature.

 

http://zone.ni.com/reference/en-XX/help/373925B-01/myriohelp/myrio_fpga_personalities/

 

You can select the myRIO personality when you first create the project. You can also switch the personality by right-clicking on the myRIO target in the Project Explorer window, and selecting ‘Switch FPGA Personality’. Hope this helps!

 

-aprillest

Message 6 of 10
(7,686 Views)

Thank you very much for your help. I am now able to aquire sine wave of different frequecies from the AI0 channel. I now need to aquire 4 such analog inputs. But i have read it on different places that the N samples vi only supports one channel. I need to aquire sine wave between 1kHz to 5kHz from 4 channels. Can i do this using analog input N samples vi or is there any other method to do so?

0 Kudos
Message 7 of 10
(7,651 Views)

santamaria,

 

I’ve included a link below that explains the functionality of the Analog Input VI. You should be able to choose to add more channels, and it looks like you can add up to 12 channels at once. You’ll want to look for the ‘Add Channel’ option.

 

http://zone.ni.com/reference/en-XX/help/373925B-01/myrioreference/myrioref_exp_ai/

 

-aprillest

0 Kudos
Message 8 of 10
(7,602 Views)

The analog input vi in the default FPGA personality, according to the example given in labview myRIO says that it can only sample upto 1kHz, which means i can use a frequency upto 500Hz . But i need to sample frequencies of greater than 1kHz . Secondly, i have been using analog input 1 sample vi to aquire analog input, but it cant work for higher frequencies.

0 Kudos
Message 9 of 10
(7,591 Views)

Hi santamaria, 

 

Are you using the Analog Input Express VI? According to this help document, you should be able to get the sampling rates you need: 

 

http://zone.ni.com/reference/en-XX/help/373925B-01/myrioreference/myrioref_exp_ai/

 

Also, this help document recommends looking at the High Frequency Sampling.lvproj example in the labview\examples\myRIO\High Frequency Sampling directory to give you a good idea of what this looks like. 

 

Good luck!

Thanks,

Rita Prather
Software Product Manager
rita.prather@ni.com
National Instruments
0 Kudos
Message 10 of 10
(7,548 Views)