Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Image Acquisition compact RIO

Dear Community:

 

We are trying to conduct image acuqisition on the cRIO and are running into in the process of debugging our program on the CompactRiO. We keep finding that connectivity is lost at the same point. Our program involves multiple routines where the frame grabber snaps an image for further analysis.

When running our program, we find that the first snap routine executes normally. However, when the program gets to the second snap routine, we find that we get an error message when it tries to snap again.

 

I was wondering if you had any knowledge as to what the cause is and  why we obtain a connectivity error upon execution of the second Snap VI.

 

Thanks.

 

-Tim

0 Kudos
Message 1 of 12
(4,422 Views)

timjm,

 

What is the error message you are seeing?  Does it have an error code?  What vision software and versions are you using?

 

Regards,

 

Sam K

Applicatoins Engineer

National Instruments

www.ni.com/support

0 Kudos
Message 2 of 12
(4,412 Views)

Hi,

 

I have to generate and store the jpg file in crio. The code works on my local PC. When I deploying the same in crio, it didn't work. It returns zero. Also I tried the paths like c:\test.jpg or /c/test.jpg; both didn't work. We are using Labview 2011 full professional development system.

 

cRIO 9025

Chasis 9113

NI 9229 

 

Thanks for the help.

 

ASAP.

 

Regards,

Ashokan

Ocean Acoustics,
National Institute of Ocean Technology,
Chennai, India - 600100.
0 Kudos
Message 3 of 12
(4,223 Views)

Hi Ashokan,

 

What are you using to generate the jpg file? Do you have a network camera?

 

Here is a tutorial about acquiring Images from IP cameras with the CompactRIO.

 

 

Best Regards,

 

Nathan B

Applications Engineer

National Instruments

 

0 Kudos
Message 4 of 12
(4,212 Views)

I rectified the error. Since cRIO didn't support strings to path vi, jpeg vi and png vi. It supports only bmp vi.

 

The file size of the bmp vi larger than of jpeg vi.

 

Also cRIO didn't support for zip file vi's.

 

What I have to do? Any alternatives....

 

Thanks & Regards,

Ashokan. M

-----------------------

Ocean Acoustics,
National Institute of Ocean Technology,
Chennai, India - 600100.
0 Kudos
Message 5 of 12
(4,201 Views)

Hi Ashokan,

 

That is good to hear that you fixed the error.

 

Do you mean that your cRIO is not working with each VI that works with strings to path, jpeg's, or png's; or do you mean that it is not working with importing them in that method and importing the file types?

 

Concerning alternatives, do you have a need for a jpeg format over bmp? The bmp format is usually preferred since it is not compressed, whereas a jpeg typically is (even though the file may be bigger).

 

Best Regards,

 

Nathan B

Applications Engineer

National Instruments

0 Kudos
Message 6 of 12
(4,190 Views)

Hi,

 

Exactly, the code is running fine. It plot the graph as required, but the jpeg vi or png vi didn’t create the image of the graph.

 

Bmp is working fine and it create the image as required. But the file size of jpeg is around 150kB since the size of bmp is around 700kB, we have to transmit this file to PC via Ethernet automatically. So only we preferred jpeg.

 

Moreover the zip file vi is also not working with cRIO.

 

Reply ASAP.

____

Thanks & Regards,

Ashokan. M

Ocean Acoustics,
National Institute of Ocean Technology,
Chennai, India - 600100.
0 Kudos
Message 7 of 12
(4,183 Views)

Hi Ashokan,

 

I am not sure about the zip file, but that is very odd that the bmp works while the jpeg does work. Has this always been the case for your application, or has the jpeg worked in the past? Also, can you be more specific as to which VIs you are using for bmp and jpeg?

 

Let me know and we can see if we can get to the bottom of this.

 

Best Regards,

 

Nathan B

Applications Engineer

National Instruments

0 Kudos
Message 8 of 12
(4,175 Views)

Hi Nathan,

 

From the beginning itself, jpeg & png vi didn’t work with crio, but it works in my PC.

 

I use:

Programming --> Graphics & Sound --> Graphics Formats --> Write JPEG File or PNG File or BMP File.

 

One more things is,

While transferring this bmp file from cRIO to PC using FTP Get File.vi, the file get corrupted; though the file size won’t change.

 

But while transferring via MAX the file didn’t corrupted.

 

Reply ASAP.

------

Thanks & Regards,

Ashokan. M

Ocean Acoustics,
National Institute of Ocean Technology,
Chennai, India - 600100.
0 Kudos
Message 9 of 12
(4,170 Views)

Hey Ashokan,

 

How do you have your FTP Get File configured? There is an input “Binary?” which you will want to set to True. This will make sure that the file is transferred in Binary and hopefully prevent it from being corrupted.

 

Let me know if this works.

 

Joe S

Applications Engineer

National Instruments

 

0 Kudos
Message 10 of 12
(4,155 Views)