Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i read binary data with NI PCI-1422?

Hello.

 

I have a custom camera (I described it in this topic) and i've connected the camera data outputs to NI-1422 data input channels. I used 2 data channels on the NI-1422 (pins: 1,2,3,4) for that.  Also I've set the valid pixel clock and master clock timings and acconding to oscilloscope the data goes from the camera to a board (1 byte per 1 pixel clock per line). The issue I faced is that i do not have any "line valid" or "data valid" signals comming from my camera. As far as I can understand, the NI software requires that signals for grouping the data into a frame. How can i get these bytes from my camera (and process them using my software) without "line valid" and "data valid" signals?

 

Kind regards, Alexander.

 

p.s.: I'm using c++ for the project.

0 Kudos
Message 1 of 5
(3,535 Views)

Hi Alvern,


Are you getting any specific errors when attempting to communicate with your camera that you could take a screenshot of and post for us?  Also, could you post the camera file that you've generated?

0 Kudos
Message 2 of 5
(3,502 Views)

Hi, Drew

 

The timing is ok and the data is comming to a NI-1422 card, but ther is no frame valid signal (I do not have it in my camera), so I recieve a timeout error every time i try to ascquire a frame (the longer the timeout I set in "camera settings" window, the longer I have wait for that error message).

Here is a camera file, I created.

 

Could you help me with one more issue? When I set time for Control line 0 (307200 low and 25 high) the Control line 1 time also changes to that values (I've noticed that by measuring signals with oscilloscope). But the time for Control line 1 are 1175 high and 25 low. What do i do wrong?

Is there any additional explanation how icd file work? Maybe I may buy some literature?

 

Kind regards, Alvern.

0 Kudos
Message 3 of 5
(3,427 Views)

Alvern,

 

You shouldn't need the dVal and lVal lines to perform a binary acquire using the parallel digital board.  Those lines are only required when communicating over the camera link standard.  It would be helpful to see what kinds of commands you are using in your program.  Could you post your code or at least what IMAQ calls you're making?

Regards,

Chris L
Applications Engineer
National Instruments

Certified LabVIEW Associate Developer
0 Kudos
Message 4 of 5
(3,420 Views)

@Chris L wrote:

Alvern,

 

You shouldn't need the dVal and lVal lines to perform a binary acquire using the parallel digital board.  Those lines are only required when communicating over the camera link standard.  It would be helpful to see what kinds of commands you are using in your program.  Could you post your code or at least what IMAQ calls you're making?


Hi Chris,

 

I think you're incorrect here... The parallel digital uses effectively the same framing signals as CameraLink. Also, the configuration needed for this resides completely in the camera file being used, so the code being used is mostly irrelevant.

 

That said, I'm not sure off-hand how to configure the camera file when you have neither dval or lval present. I assume you still have fval so the framegrabber can sync to the start of the frame? I would expect that the logic could just count pixels from there and generate its own timing without those signals, but I could be wrong since most cameras generate those signals (and I'm not that familiar with the 1422 myself). Have you played around with the options shown in Camera File Generator (https://www.ni.com/en/support/documentation/supplemental/19/creating-a-camera-file-using-the-ni-came...)?

 

Eric

0 Kudos
Message 5 of 5
(3,416 Views)