LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview FPGA Data Rate control with detector response

Hello All:

 

   I am at my wits end so I put myself at the mercy of the Ni Community. My project is as follows:

 

I have a 9229 Module collecting data at a rate of 50 Ks/S with my CRIO. It is then passing that collected data to the Host Loop. Simultaneously, I am controlling a Spectrometer which is suppose to be moving to specified wavelengths. The object of the exercise is to move to a wavelength, get and sync the detector response (voltage handled by the CRIO) and then plot (graph) the two together.

 

I have tried many things and have the following problems:

 

1. The data rates are always incorrect (seems lagging) when the data is transferred to the host loop

2. I cannot seem to get the correct voltage response to correlate with the corresponding wavelength (either correlate with time stamp, etc)

3. My Data FIFO keeps getting full and timing out

 

 

Attached screenshots of my VIs

 

I tried running loops in parallel but they would not start at the same time. I tried synchronizing them but that was an utter failure.

 

Please Help! Thanks!

 

 

Download All
0 Kudos
Message 1 of 4
(2,878 Views)

Hi RockyTop,

 

I'd like to ask a few questions to get the ball rolling here:

 

  • It's hard to tell what's happening in your FPGA Host image due to low resolution. Could you upload a screenshot of the VI, or the VI itself so we can take a deeper look? 
  • Can you give a little more insight on how this spectrometer sync is supposed to work? What do you mean by "move to a wavelength, get and sync the detector response"?
  • Have you been able to pin down where exactly your code "lags"? By how much does it lag (us, ms, sec)? Does it lag every time?
  • Are you implementing any loop timing (e.g., Loop Timer.vi)?
  • Have you verified that the raw voltage values coming in from your spectrometer are the expected values with a multimeter, oscilloscope, etc.?
  • Why do you describe synchronization of the AIs as a failure? Did you receive an error message?

 

Nick

Applications Engineer

National Instruments

0 Kudos
Message 2 of 4
(2,816 Views)

Hey Nick,

 

Thanks for responding.

 

1. Unfortunately I cannot take screen shots, so I apologize for that

2. To clarify, let's split the process into two systems:

System A has a controller (which I am now controlling with LabVIEW via the manufacturer's .NET applications) which controls a monochromator. It's logic is something like: command the grating to move to x wavelength or step through several wavelengths, then report the wavelength you just went to, etc.

System B is the CRIO which is measuring the Analog response of the detector to the Monochromator. My goal is to sync the recorded wavelengths to the detector's analog response. Frankly, I really have no idea how to do this. I've tried parallel loops and building a matrix from both loop responses and then went on a weird tangent of nested loops

3. I don't have a quantitative representation but I have the detector response hooked up to an RMS Multimeter and am reporting the measured RMS on the Front panel of the Labview VI and they are not the same

4. No

5. Today I hooked up a function generator and just tried to read the response to a 100 Hz sine wave and I verified that I am indeed collecting data at 50 Ks/S but I don't seem to be passing it off at that rate. The output excel only had 347 samples after recording for 5 seconds.

6. My goal was to synchronize the detector response and monochromator wavelength returned response with a time stamp or something, some proof to know that at that very millisecond the monochromator and detector responses are what they say they are but I failed to do so.

 

Obviously I have a long way to go with understanding what is going on

 

Thanks,

 

 

 

0 Kudos
Message 3 of 4
(2,814 Views)

Hi RockyTop,

 

Is there any hardware triggering happening in your application? Is it possible to implement this somewhere? If you could configure system A to send a digital pulse to system B when you want the cRIO to capture an analog signal, you could synchronize that way.

 

If this isn't possible, or if I'm misunderstanding, then another option would be to put the two tasks you want to synchronize in the same I/O node, or use loop timing to sync them to the cRIO's timebase. 

 

A few articles to help you out:

 

"Choosing a CompactRIO Synchronization Technology" -- (everything before section 5 should suit your application)

https://www.ni.com/en/shop/compactrio/choosing-a-compactrio-synchronization-technology.html

 

"Creating Triggers and Counters (FPGA Module)"

https://www.ni.com/docs/en-US/bundle/labview-fpga-module/page/creating-triggers-and-counters-fpga-mo...

 

"Create a Custom Analog Trigger in LabVIEW FPGA"

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

 

Nick B.

Applications Engineer

National Instruments

0 Kudos
Message 4 of 4
(2,782 Views)