LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time critical (µs) calculations

Hello,

 

we are trying to do some time critical calculations in our custom build SPIM setup. The idea is that we need to react on trigger signals of a camera and give some trigger signals in order to change the voltage of a galvo-mirror (analog signal). These actions need to happen in a µs scale. Until now there is always a non-constant delay between the two actions (movement of the galvo-mirror and read-out of the camera) which changes from acquisition to acquisition. We want to synchronize these two actions.

 

A solution used on another setup is the use of an FPGA to achieve this µs accuracy. Due to the price of this device I am looking for another solution. Since I'm also rather new and unexperienced with the use of LabVIEW I would like to know, if there is a possibility to synchronize trigger signals in a µs accuracy.

 

The used devices are:

Computer: Celsius W520 + IO Interface, Windows 7 Professional

LabVIEW card: NI PCIe-6353, X Series Multifunction DAQ with 2x SCB-68A Connector Blocks

LAbView 2012, Version 12.0, 64 bit

0 Kudos
Message 1 of 7
(3,481 Views)

For these timing requirements, it needs to be in hardware.  Therefore FPGA is really the only way.



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 2 of 7
(3,462 Views)

There is no other option!

The accuracy and reaction time you can achieve is roughly as follows:

- Special dedicated hardware, tens of nanoseconds

- FPGA: microseconds

- realtime OS: 100 us to millisecond

- standard OS: tens of milliseconds to second

 

Trying to go lower than that to save money always will cost you more in the end!!

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 7
(3,458 Views)

Just double-checking something.

 

Does each camera trigger signal cause you to *initiate* calculations in order to *decide* what voltage(s) to send to the galvo?  And you need microsec-level turn around time to do all of the following:

- detect the trigger

- do the calcs

- generate the analog voltages

 

Or did you use the term "calculations" a little too casually, and you just need microsec-level timing relationships for your signals?

 

I ask because there have been many threads here syncing an imaging device with a galvo mirror and they *usually* just require some careful programming of DAQmx tasks under windows.  The DAQ hardware takes care of the microsec-level reaction times, once programmed correctly.

 

So can you more fully and clearly describe the nature of your input and output signals, the required timing, and (especially) any need to make decisions about output signals on-the-fly in reaction to whatever's being observed?

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 7
(3,442 Views)

We first need to wait for the "camera is ready" signal (which is not the problem). Afterwards the galvo-mirror needs to move synchronized with the camera detection. The idea is to illuminate always the part of the camera detector that is currently read out (with the use of a rolling shutter for the camera). The profile of the galvo-mirror voltage pattern should be a step function, synchronized with the read out of the camera. The individual pixel lines of the camera detector are changed every ~10 µs, therefore the galvo-mirror needs to get the signals in the same time scale. I guess in theory the steps of the galvo-mirror could be calculated before and stored in an array which then needs to be read out by the VI at each step.

0 Kudos
Message 5 of 7
(3,435 Views)

Yep, as I kinda suspected.  This sounds *very* doable via proper DAQmx programming of an AO task on your DAQ board.  As you said, you simply need to plan and calculate the step pattern ahead of time and configure a buffered hw-timed DAQmx task.  (And maybe also a counter task if you need a controllable delay between the external signal from the camera and the AO output step change.)

 

You should be able to do all this under Windows -- the board does all the heavy lifting with respect to the timing relationships.  Do some searching here with terms like "galvo", "camera", "scanning", "sync", "imaging", etc.  I think you'll find lots of info and hopefully a few code examples.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 6 of 7
(3,422 Views)

Thank you very much, i will look more deeply into the Forum.

0 Kudos
Message 7 of 7
(3,041 Views)