LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Same ADC channels in Different loops

Solved!
Go to solution

Hello all;

I need to access ADC channels in two different independent loops, one is high priority timed loop to read data from ADC changes via FPGA node, do some decisions and set some parameters with PID, while on the other side the second while loop will read same ADC channels and log data to TDMS file.

Thank you.

0 Kudos
Message 1 of 16
(3,132 Views)

One loop (high priority) reads the data and passes it to the other loop (logging to TDMS) using a Queue.

http://zone.ni.com/reference/en-XX/help/371361R-01/glang/queue_vis/

 

0 Kudos
Message 2 of 16
(3,125 Views)

Thank you for your time.

Can you make me little example vi, then it will be easier for me to understand properly.
Thank you

0 Kudos
Message 3 of 16
(3,106 Views)

Learn the Producer/Consumer.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 16
(3,097 Views)

Which FPGA card are you using?


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 5 of 16
(3,088 Views)

Hello Knight;

Thank you for your kindness and time, I tried to follow the tutorial, in tutorial it says that I can connect any data type with the obtain queue input terminal, but I am getting error, my data type is 2D Array which contains data from 8 ADC channels, 4 channels from ni 9381 and other 4 from ni 9207. the obtain queue input terminal only excepts string type data. but why in the tutorial it says it accepts any type of data.Smiley Sad

0 Kudos
Message 6 of 16
(3,065 Views)

Hi Terry;

I am using NI cRIO 9030, with ni 9381 and ni9207 modules.  

0 Kudos
Message 7 of 16
(3,065 Views)

Can you post code?

 

Obtain Queue sounds like a Windows or RT function, not LabVIEW FPGA.  I think platforms are being mixed here.


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 8 of 16
(3,063 Views)

Hi Terry,
Sorry for the confusion, I have attached my whole project, ([RT] Cont  Acq.vi) is my main RT vi. actually this is a librarry example from NI that I am usuing as a base to get data from 2  ni adc modules (4 channels ecah), and now I am trying to modifie it to make it useable for my project, actaully I was able to logg data on it scuceesfully but the problem is while processor is busy to write data on file it miss certain amount of data, also yet i have to do lot of other thing in my main loop, so I needed that i can produse data in one loop and use it in another loop i.e.to write it on file, but now I am able to make both loops, but the data from producer loop is an element while to put data on file needs to be 2D array of 8 channles.


Thank you so much for your time.

 

Moonnight

0 Kudos
Message 9 of 16
(3,057 Views)

Hello Terry,

somehow I make it work, still the problem same, I am taking data for the 90s, according to my data acquisition rate (500s/s)(0.002s) time period, I should have 45000 samples saved in my file, but I am only receiving 11620 samples, which is quite less than expected, this sampled data is all waste for me if I cant get my full resolution of data.

0 Kudos
Message 10 of 16
(3,053 Views)