LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

display an image from ftp site without copying to local drive

Solved!
Go to solution

I have a camera that hosts an FTP site with images (.bmp) stored on it. I would like to display a real time image from the camera. I currently continually copy the file to my local computer and then display it afterwards, but I am concerned that the continual write to my solid state drive will cause issues long term. Is there a way to "stream" the image file directly to Labview and convert to image data type without saving locally?

I was looking at a datasocket read but I couldn't get any data out of the file and I get Error 42 occurred at DataSocket Read. If I could get the "string" from the file I could convert it to an image using the guts of the bitmap file open vi. 

Any suggestions

0 Kudos
Message 1 of 7
(3,267 Views)
Solution
Accepted by topic author tshurtz

I don't do much with FTP, but I'd try the function Data communication -> Protocols -> FTP -> FTP Get Buffer. It appears to grab a single file and put it in RAM.

 

You can also try the information in this document:

 

https://zone.ni.com/reference/en-XX/help/371361R-01/lvconcepts/using_datasocket_technology/

 

to use datasockets to access FTP files.

0 Kudos
Message 2 of 7
(3,245 Views)

Is the FTP site seriously the only way possible to get live data from the camera?  That's not usual for a camera.  Are you sure there isn't another method to get a live image?  Can you tell us what model camera it is?

0 Kudos
Message 3 of 7
(3,221 Views)

The FTP get buffer worked and was the answer to my original post so I will mark it as the answer for anyone who follows, but I may have asked the wrong question as Kyle pointed out. I will look into other options they may have. Thank you both.

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

@Kyle97330 wrote:

Is the FTP site seriously the only way possible to get live data from the camera?  That's not usual for a camera.  Are you sure there isn't another method to get a live image?  Can you tell us what model camera it is?


It may not be the best way, but I think most cameras support an image server for "live" broadcasting, so it might be the most "universal" way.  Also, it might be the most convenient way to share a feed over the internet.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 7
(3,123 Views)

can you share your vi, please?

0 Kudos
Message 6 of 7
(340 Views)

Here you go. Sorry it took me a bit to hunt it down. The sub VIs are modified versions of the library items that operate on the data sting from the FTP instead of from opening a local file.

0 Kudos
Message 7 of 7
(311 Views)