LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout error using grab

Hi Alex T.,

 

No, I'm not receiving an error - but my LED next to 'file saving in progress' is consistently illuminated.

 

Yes,  I used a function generator to verify that the hardware could be triggered; seemed to work fine.

 

I've just done a test.  I set frequency to 100 Hz, number of pulses (i.e.. frames to be captured) to 10; my camera is operating at 31680 Hz per line and I've a y-resolution of 100 - that implies that a frame should be captured in 3.16 ms. I've set the frame timeout to 5000 like you suggested and am monitoring both the counter and the camera output on a scope.  Both are being triggered, but the camera just seems to keep integrating until the frame timeout occurs.  Again nothing is being saved and no images are outputted to the screen during processing.

 

I have included the 'Wait until Done' vi  as you suggested setting the frame timeout to 1 s. Still nothing. 

 

I changed around the grab setup with the Daqmx start task in the flat sequence and this time I am getting images outputted to the screen and saved in the folder but there is only 5 and I selected 10 originally (using the same parameters as above).

 

Thanks a lot for your help Altex.

 

Miika

0 Kudos
Message 11 of 20
(1,501 Views)

Sorry, meant Alex Smiley Surprised (damned spell check!)

0 Kudos
Message 12 of 20
(1,499 Views)

Hi Miika,

 

So now we're getting the images with the VIs swapped the other way around; that's good news.

 

If you're emitting ten pulses, could you try emitting 20 to see if ten images get captured? This would let us know that the camera requires two triggers in order to acquire an image in this instance. If we end up capturing five less than the desired amount again, then it's possible that our first five triggers are being missed. We'll see what behaviour we get from varying the desired number of Counter triggers; this should give us an understanding of how they're being interpreted by the camera.

 

Kind Regards,

Altex. Smiley Happy


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Message 13 of 20
(1,485 Views)

Hi Alex,

 

If I set the number of pulses to 25 and the frequency to 25, I get 25 perfect images saved to my folder (perfect in the sense that every alternative frame is either one of my two optical channels caused by the counter driven switch).

 

The same for 50 pulses and 100 pulses.  However for 150 pulses I only output 146 images.  The frames sizes are 200 x 1024 pixels, implying an acquisition time of 31.5 micro-secs.  I've now wired 'samples per channel' to the number of pulses control and this is outputting the correct number of pulses.

 

Any advice?  I need this to be operating at much faster frequencies!!

 

Thanks a million in advance,

Miika

0 Kudos
Message 14 of 20
(1,480 Views)

Hi Alex,

 

Actually, correction: If I keep the frequency at 25 Hz, and specify any number of images they will be captured successfully.  Anything over 25 Hz and I start to get switch overlap between the frames. 

 

You see this is part of a larger code - I am controlling galvo mirrors and am scanning them at a set no of positions - these positions correspond to the 'number of pulses' in this code.  I want the counter edge to trigger the acquisition of a frame at each position (actually two frames at each position with the switch).  In my bigger scanning code I was outputting the sample clock rate as the counter frequency to trigger the camera to acquire an image.  However in order to scan at any decent speed, I would need the frequency to be much higher than 25 Hz.  Hence, my conundrum. Smiley Sad

 

Miika

0 Kudos
Message 15 of 20
(1,475 Views)

Hi Miika,

 

What's the model of camera that you're using?

Is it definitely able to be triggered at frequencies higher than 25Hz?


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Message 16 of 20
(1,463 Views)

Hi Alex

 

It's a SUI LDH InGaAs Digital Line Scan Camera from Goodrich.  It can be triggered either by BNC connection or by accessing the control line with a TTL trigger.  I've done the latter. Smiley Happy

 

Kind regards,

Miika

0 Kudos
Message 17 of 20
(1,460 Views)

Hi Miika,

 

I've been reading through the device datasheet and it mentions that the Exposure Time of the camera can be programmatically defined to vary from anywhere between 0.007s and 907ms. Would it be possible to try varying this parameter to see if images can be acquired in quicker succession? 

 

What was the fastest rate that you were able to acquire images from this camera?

 

Kind Regards,


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Message 18 of 20
(1,455 Views)

Hi Alex,

 

Currently, I have the camera set at OPR30 (~47 kHz).  To mimic the actual scanning sample clock rates, I’ve set my counter frequency to 500 Hz for a test; @OPR30 this would imply that a maximum of 95 pixels in image height would be filled within this time of 2 ms (i.e. 500 Hz) before the counter edge goes high again.  I’ve set the image height to be 90 pixels to ensure the frame is captured within this time and the camera is running freely.  However, given this image height, if I set the frequency to 25 Hz and the no of desired frames to 1000, all images are saved the code is completed successfully.  However, if I set the counter frequency to 100 Hz (no of sample 1000) only 536/1000 images are saved and code does not complete.  Also if I set the frequency to 500 Hz (as originally intended) only 114/1000 frames are processed and the code doesn’t complete.

 

Could it be a problem with memory?  I'm not receiving any errors relating to such but I have been reading threads on buffer sizes for continuous grab operations .. Could increasing the buffer size help?  How would I approach this with my code?

 

Kind regards,

Miika

0 Kudos
Message 19 of 20
(1,451 Views)

Also here is the code I'm working off, in case I've made any changes to the previous ones

0 Kudos
Message 20 of 20
(1,450 Views)