Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

configure imaq

Yes, of coarse.

I'm attaching a picture we expect from our Laser Scanning Microscope with a lens of (X8). We got this picture when we used this exact system (and exact linses of coarse), only our scanning routine was controlled automatically by a control, and we used another Image Grabbing card.

I'm also attaching an image we're getting now . Third attachment would be our Scope picture of our Video signal Vs H_Sync signal (H_sync is the upper signal, Video is the lower one).

Our system works in the following way: (It does not output a Pixel clock, only H-sync and V-sync (since we've seen that V-sync is not used by the card,  we don't use it).

 

The microscope is controlled by a computer program which sends the following orders periodically.

******************************************************

Repeat

        1. Produce a V-Sync.

              1.1. produce an H-Sync.

              1.2. scan a line (by sampling from x = 0 to x = 10000, when 1 = basic machine step) and send continuously data to analog OUTPUT. 

              (line scan takes 200 clocks currently. A clock is a basic amount of time).

              1.3. go 3 steps up ( y --> y + 3) (it takes 2 clocks currently).

              1.4. go back 10000 steps left (x=10000 to x = 0) (it takes 20 clocks currently).

               Repeat ( 1.1 - 1.4 ) steps until frame completed, after 480 times (480 lines scanned).

        2. Go back to the origin, which is (x = 0, y = 0)

    Until Stopped by user

******************************************************

I control machine's speed of line scanning rate manually and produce an H-Sync after each line. Then I connect the H-sync and the Video signals (Which are on separate lines) to an IMAQ 1410 imaging card and work in the "External H Lock Mode" in "Measurement and Automation Explorer" (MAX).

Thank you.

0 Kudos
Message 11 of 28
(3,278 Views)

I was able to find out more details about the lower end specs of the 1410 board - the PLL does have a lower limit for the H-Sync signal it uses to generate the pixel clock off of. It should be able to go as low as 8kHz line clock rate - however, from what you have described, you have ~1kHz H-Sync signal. Such a slow signal is going to cause abnormal opperation from the PLL and is most likely the cause for your unclear images. If you are not able to speed you acquisition to at least an 8kHz H-Sync signal, you will not be able to grab a clean picture with the 1410. Even oversampling, or setting the pixels generated by the 1410 to be within specs will not compensate for too slow of a H-Sync signal.

Digitizing your signal could be done with a Digitizer board like the PCI-5102 or even with a multifunction DAQ baord like our M-Series (PCI-6220). These boards can be setup with variable clock speeds and re-triggerable acquisitions (which would allow multi line acquisitions). Digitized data can be organized into arrays and then changed into a Image format with the Array to Image.vi that comes with our Vision Development Module - once in the image format, you could perform any vision routine needed.

I'm sorry that there does not seem to be a solution for the 1410. This is a very specialized hardware setup you are using with specs that do not fall into the abilities of the 1410.

Let me know if I can clarify anything further for you or if you have any further questions I can help out with.

0 Kudos
Message 12 of 28
(3,264 Views)
Thank you, I guess we need to use another device then.
 
 
With this limitation of H-sync of ours, could you recommend us of products that would support our LSM ?
 
 
I would like to attach our Video signal vs. H-Sync scope picture , so that that would be easier. I would like to stress out the fact that our signal does not have a back porch, front porch, blanking are, ext'...  that has a standard Video signal. It outputs data continuosly. I've read that I need an area that would be a "Black reference".
 
Is there a device that could take our continuous Video signal, without the need to have these clamping areas ? In other words, what do we need to do or what devices to purchase, assuming we cannot change our signals, in order to be able to get a good and clean image ?
 
 
 
 
0 Kudos
Message 13 of 28
(3,260 Views)

Any of NI's M-Series DAQ boards will have a digitizing rate fast enough for your application and more than enough bit depth (16 bits). The PCI-6220 is the lowest end (does not include any analog outputs - but it doesn't sound like you need any for you application). This board can be setup with a analog input clock rate based on it's internal counters which can be set for any speed up to the max analog input rate of 250 samples/s. You could set the board up to capture each line at a specified rate (since you do not have a pixel clock) and trigger the start of the capture based on your H-Sync signal. The acquisition can be retriggerable, meaning it will capture and digitize the data each time a pulse is received on the trigger or H-Sync line.

The 6220 will accept a differential input. Calibration (or clamping) could be done by sampling the voltage from your system when the output is 0 (or a base level) and then subtracting that value from all of the data you digitize.

The data will be received as an array of double precision values from -1 to 1 volts - which you could then convert to integer values in a 16 bit range - or you can extract the 16 bit value from the 6220 to begin with by extracting "raw data".

The arrays of data can be manipulated and organized into a 2D array that represents your image - the IMAQ Array to Image will convert this into a Image Datatype which can be used in any of the vision processing functions or viewed on the Image Display Control.

Hopefully this gives you a better idea of how this setup would work. Let me know if you have any questions about this approach.

0 Kudos
Message 14 of 28
(3,242 Views)
Yes, I've heard about this approach.
 
We actually posses a NI PCI-6025e daq board. I want to start working on what you have suggested. I'm already reading the board's user manual.
 
Will this board do the job ?
 
Thing is I really don't have much of an idea how to begin building the physical setup and the Labview program, we haven't worked on this board before.
 
Could you please help me, knowing how our system works, understand more specifically the signal setup with this board  ?
 
Also, I'd be very grateful for the Labview programming side help, maybe an already written vi's, or close to the video acquisition needs of ours ?
 
Thank you very much
0 Kudos
Message 15 of 28
(3,237 Views)

The PCI-6052 E DAQ Board will work fine to digitize your laser data. It will digitize a single analog input up to 333kHz.

I attached an examples to help you get started - it is a modified version of a Retriggerable Analog Input DAQmx example

I changed the input to acquire 16 bit raw data (you might need to play around with the scaling so that it ranges over 0 to 1 volt rather than -10 to 10v)

I added a small portion at the end to convert the 1D array of acquired data to a 2D array and then to an image.

I have not been able to test this vi - I have no hardware to simulate what you are seeing, however this code should get you started.

(Code created in LabVIEW 7.1)- requires that you have Vision Development Module
0 Kudos
Message 16 of 28
(3,216 Views)

MarcoPolo:

 

Isn't the 6025 a 200Ks/sec 12 bit board? I think you transposed the 2 and the 5 and related the 6052's specs

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 17 of 28
(3,214 Views)
Thanks for the correction - the 6025 is a 200ks/s 12-bit - this should still work with the application - since the laser scanning microscopes pixel clock is at  ~185kHz. Just remember to change the acquired data conversion to 12 bit rather than the 16 bit setup I set it for.
0 Kudos
Message 18 of 28
(3,211 Views)
Thank you very much for the vi.
 
I still do not posses the visual model for Labview, but I have looked at  your work. I have a few question about the vi and another about the DAQ 6025e board of ours.
 
a. How does the retriggering work ? Does it function like a loop which jumps again and again to start the clock frequency ?
 
b. You have defined 1000 clocks for the counter, so does that mean that after each H-Sync, exactly 1000 pixels are digitized, and then the program waits idle for the next H-Sync ?
 
c. You have defined  [Height * Width] samples to the analog channel, does that mean that the retriggering will continue until all these much samples are taken ? In other words, is this is how you control the end of the acquisition (or the program) ?
 
d. I think that you have created a snap acquisition. What do I need to change/add if I want a continuous frame grabbing ? (If we suppose that besides H-Sync, I could use V-Sync too as an additional external trigger).
 
e. Currently we are working on isolating the digital and the analog Input/Output signals on the board in order to protect it from damage. Hence, from technical and financial reasons, we will not be able to use all of our 10 PFI's and not all of our other digital and analog connections, that are on the board. We now need to decide which PFI's and which other digital and analog connections we need for sure for our system to use. Can you please tell me which PFI's and which other digital/analog connection we need for our application ? I really want to get right with it.
 
Thanks a million times.
0 Kudos
Message 19 of 28
(3,199 Views)
a) retriggering does "function like a loop" - so in the example it will output a finite pulse train (which acts as the sample clock) and then waits till another trigger occurs to repeat.
 
b) I wired "Image Width" into the number of pulses the counter outputs to digitize the analog signal. You will have to match the "Rate" to allow the number of pulses output to match up to the time your laser scans one line - if the rate is too slow, it will miss the H-sync pulse starting the next line.
 
c) yes
 
d) This is a snap acquisition - you would have to add a start trigger (that is retriggerable) that would trigger off of the V-Sync signal - you could setup the current analog acquisition to be triggered this way 
 
e) Here is a link to the E-Series users manual - this has the pinout for your device as well as descriptions of the PFI lines:
 
 
If you need consulting help with your project look at the list of alliance members we have in your area:
 
If you hook up your analog input in differential mode, there will be a significant ammount of common mode voltage rejection.
From the above maual:
 
Max working voltage (signal + common mode)   Each input should remain within ±11 V of ground
Overvoltage protection  
Signal Powered On Powered Off
AI <0..15> ±42 ±35
AI SENSE ±40 ±25
Common-mode rejection ratio (CMRR), DC to 60 Hz
  Range 10 to 20 mV   85 dB
  Range 100 mV to 1 V   90 dB
0 Kudos
Message 20 of 28
(3,086 Views)