Jump to content

Recommended Posts

Hello everybody...

I'm working on a project in LabVIEW right now. The main idea is to send (large) files, of any sort, with a UDP multicast to multiple devices. I thought the main idea was quite simple but I can't seem to get it right.

The main idea I tried to manage is to convert a file to a large string and to send that string in small pieces to the receivers over a multicast address. Apparently I don't seem to manage this at all... Does anyone know how I should read in a file (could be anything, from .iso to .jpg, .zip,...) and prepare it for the UDP multicast?

Once I can manage this, I'm going to start worrying about the loss of packets because of UDP...

It would be great to get thru this because it would reduce the networkload when many computers need the same large file from a server.

Thanks in advance!

Kind regards.

Link to comment

QUOTE (Blackbyte @ Oct 22 2008, 09:41 AM)

Hello everybody...

I'm working on a project in LabVIEW right now. The main idea is to send (large) files, of any sort, with a UDP multicast to multiple devices. I thought the main idea was quite simple but I can't seem to get it right.

The main idea I tried to manage is to convert a file to a large string and to send that string in small pieces to the receivers over a multicast address. Apparently I don't seem to manage this at all... Does anyone know how I should read in a file (could be anything, from .iso to .jpg, .zip,...) and prepare it for the UDP multicast?

Once I can manage this, I'm going to start worrying about the loss of packets because of UDP...

It would be great to get thru this because it would reduce the networkload when many computers need the same large file from a server.

Thanks in advance!

Kind regards.

Could you show us your current code that you use to read the file into LabVIEW and split it up. It will be easier to provide feedback if we can see what you are doing now. Typically a binary file read should work for any file type.

Link to comment

QUOTE (LV_FPGA_SE @ Oct 22 2008, 06:07 PM)

Could you show us your current code that you use to read the file into LabVIEW and split it up. It will be easier to provide feedback if we can see what you are doing now. Typically a binary file read should work for any file type.

Untill now I've managed to convert the file into a large datastring. But when I want to make a new file with this datastring, the new file becomes unreadable.

(I've tested it with docx, jpg and zip files).

You can find this process in the attached VI file...

Since I'm not common to work with reading and writing files I don't seem to find the problem... (Maybe I forgot somekind of parameter)

Thanks for the replies!

Link to comment
  • 1 month later...

QUOTE (Blackbyte @ Oct 25 2008, 09:12 AM)

Untill now I've managed to convert the file into a large datastring. But when I want to make a new file with this datastring, the new file becomes unreadable.

(I've tested it with docx, jpg and zip files).

You can find this process in the attached VI file...

Since I'm not common to work with reading and writing files I don't seem to find the problem... (Maybe I forgot somekind of parameter)

Thanks for the replies!

Most probably you need to set the "prepend array or string size?" on the Write To Binary File to false as it is by default true. What this does is prepending a 32bit integer indicating the number of array elements (bytes in the case of a string) that follows and that is very useful if you stream multiple blocks to a file but not necessary for a single block and in the case of fixed file formats even catastrophic to do.

Rolf Kalbermatter

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.