Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Transmit 50 fps from 1742 to cRIO

Hello

 

I am using NI 1742 Smart Camera to acquire 50 fps. Able to achieve that easily.

My camera is connected to cRIO controller over Ethernet (directly connected, no switch).

I need to tranmit these 50 fps to my cRIO controller. Problem is that when i try using flatten to string function, it slows down my TCP loop.

Please see the attached VI's for your refrence.

 

Any help is most welcome.

Thanks & Regards,
Rajan
Download All
0 Kudos
Message 1 of 7
(3,547 Views)

Hello, Rajan,

 

It is not so easy to transmit 50 frames per second over network just because of speed limit. If you will try to send a full VGA image at 50 fps your network card will have to transmit 15,3 MB/s useful information. And if you are using a TCP protocol to do that your data stream will be much bigger.

The probable solution might be to use UDP protocol instead of TCP. Also I've noticed that you are using image queue to transmit images through cycles. When dealing with images you should always remember that they are accessible by reference and not by a value. So i would recommend you to create a ring buffer of images and transmit only a number.

 

Nikita.

Nikita Prorekhin
CLA
0 Kudos
Message 2 of 7
(3,541 Views)

Hello Nikita

 

Thanks for the reply !!

 

1) I need to transmit image data to host to be logged in a file. so i cannot use image ref as that way i wont be able to rebuild the image in Host after reading from file.

 

2) I checked with UDP also, not much help.

 

The actual problem is that flatten to string function, if i use compression (JPEG) with Type of flatten (Image or Image & vision info) then it makes my acquisition loop to slow down. Now problem is that i have to use this flatten to string function if i want to tranmit data over TCPIP / UDP.

Now at best i am able to tranmit 19 fps at 640*480 resolution & thats too bad for my application where i need 50 fps Smiley Sad

Thanks & Regards,
Rajan
0 Kudos
Message 3 of 7
(3,530 Views)

You can specify the level of compression used buy flatten to string using the IMAQ Flatten Image Options.

An alternative is to IMAQ Write String which basically saves the images as one of the standard file format, but the output is a string instead of a file. This VI was added for that purpose. You're going to have to find the tradeoff between the compression used and the resulting size of the image to transfer.

 

Christophe

0 Kudos
Message 4 of 7
(3,527 Views)

Hello Christophe

 

thanks for the suggestions .. I tried those options also, using IMAQ Write string also doesn't give any better results as compared to Image flatten to string function.

 

Can anyone please suggest me a reason, why my acquisition loop slows down when i use image flatten to string or any other such compression functions in another loop. please see the figure as attached.

Thanks & Regards,
Rajan
0 Kudos
Message 5 of 7
(3,516 Views)

The reason is because compressing is processor intensive, and you're running your application on a target that has a single processor.

0 Kudos
Message 6 of 7
(3,511 Views)

OK, is there a way where i can capture images from NI-1742 Smart Camera from a remote RT controller.

 

Say i am using cRIO & this camera is connected to cRIO over LAN, can i directly capture images in cRIO ??

Thanks & Regards,
Rajan
0 Kudos
Message 7 of 7
(3,503 Views)