Jump to content
John Lokanis

Stream a VI file across a network

Recommended Posts

Not sure what catagory to put this one into so I am trying here in application design.

 

I need to read a VI off disk on one machine, package the data up and send it across the network using my messaging system and then reconstitute it on the destination machine.  Then I want to load and run it.

My VI is pretty simple and contains no non-vi.lib subvis

I have tried using the 'Read from Binary File' to get a string of the data and then 'Write to Binary File' to save it at the destination.  The file size looks ok but the VI will not open.  I get this error message:

post-2411-0-53556900-1438387020.jpg

Also, I have checked the MD5 of both files and they do not match.

 

So, what is the trick to getting this to work?  Is there a data type I should be using other than string to send the data?  Is there a special way to save the data at the destination so it creates a valid VI file?

 

thanks for any help,

 

-John

Share this post


Link to post
Share on other sites

Here is a simple example of what I am trying to do.

I tried changing from string to U8 array in the example but it made no difference.

VI Copy Test.zip


I'll buy a beer at the LAVA BBQ next week for the first person to solve this!   :beer_mug:  :beer_mug:  :beer_mug:

Share this post


Link to post
Share on other sites

Set the prepend array size to false on the Binary Write

Edited by ShaunR

Share this post


Link to post
Share on other sites

Doh!  I knew it had to be something simple.  A Lokanis always pays his debts.   :cool:  See me at the BBQ to collect your beer. :beer_mug:

Share this post


Link to post
Share on other sites

So I talked to John about possible ways to do this and what I suggested was something like zip all external dependencies. Then send that zip streaming the binary representation of the zip file. Then keep the zip on the host and use it again if that same zip is attempted to be sent by looking at MD5. Then extract the zip to a temp location and run it.

This way it doesn't matter what is in the zip (llb classes ppl) and it can run in an exe if you choose to include VI.lib dependencies.

Will it work? No idea but I can't see why not.

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
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.