LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

network stream

Solved!
Go to solution

Good afternoon,

 

I need to send the data generated in the vi attached through network stream.

 

The problem is that I have not found any example that does something similar and it is my first time using Activex with Labview. Can someone explain to me how to send Activex data through network stream please and if possible help me find a solution to the vi attached.

 

I think I need to convert the data somehow after the play control before using the writing and reading elements, I have tried with arrays and strings unsucessfully, I really think I am missing something.

 

Thank you in advance!

Erika

0 Kudos
Message 1 of 9
(4,402 Views)

Hi Erika,

 

I am unable to open your VI since I have LabVIEW 2013-2015 and yours is v9. I have been able to implement network communication via ActiveX in the past with not too much difficulty. What is the data you're to send/receive? Also, what protocol ? 


Kudos are the best way to say thanks 🙂
0 Kudos
Message 2 of 9
(4,354 Views)

His version is LV 2014.  Youd should have been able to open it in either LV 2014 or LV 2015.

0 Kudos
Message 3 of 9
(4,344 Views)

Hi!

 

Thank you for answering me!! the version attached before it is from 2014 but I attach a version of 2012, it may work this time (hopefully), if not I will do pictures.

 

What I did was to create a window player that could be actioned by pressing a buttom and the video is obtained from a file. What I would like is to stream the video through network streaming after the video has been opened from the file.

 

Maybe you can help me understand the principle of sending data of activex through network streams and how to do it.

 

Thank you very much,

Erika

0 Kudos
Message 4 of 9
(4,314 Views)

I'm not sure that there is a "simple" way to do what you want to do.  As I understand it, you know (more or less) how to use LabVIEW to "call" Windows Media Player and get it to play media specified by a URL.  If it was LabVIEW itself that was playing the video file, then LabVIEW would have access to the successive images and could (in principle) stream them somewhere else, but (as I understand it) LabVIEW is only "pushing the buttons" on WMP, and does not have access to the images.  No easy solution suggests itself to me ...

 

Bob Schor

0 Kudos
Message 5 of 9
(4,287 Views)

Hi Bob,

 

Thank you for your answer! What I am trying to do is to reproduce a video on one side and then send it through network streams and reproduce it on the other side. If my VI can not do such thing, do you recommend another approach that might work? I am open to alternative solutions

 

Thank you ance again,

Erika

0 Kudos
Message 6 of 9
(4,248 Views)
Solution
Accepted by topic author erikaroxy60

Erika,

 

     What is your input?  Are you trying to play a .avi file, a .mpg, or what?  IMAQdx has functions that can read video file and output "images", and you can stream these images over TCP/IP to another computer using Network Streams.  Indeed, there are cameras that capture Video and output it through TCP/IP -- here IMAQdx is used to capture the image directly from the camera, and can either display it or save it to (for example) an .avi file.

 

     Do you have the Vision Module installed on your system?  On your Block Diagram Palette, it will appear under Vision and Motion, and should include IMAQ (or IMAQdx) and Vision Utilities (which contains the Files sub-Palette to do reads and writes of video files).  See if you can use this to display your video ...

 

Bob Schor

0 Kudos
Message 7 of 9
(4,232 Views)

Hi Bob,

 

The input would be mov. and avi files. I do not have vision module installed yet but I can look for it and install it, that is no problem. Still I have found examples of saving the videos or manipulating them for user's conveniences, using the vision module that you suggest but not yet sending it through tcp/ip. Would you please guide me on those crucial steps please?

 

This has certainly help me to put myself in the right track, thank you very much

0 Kudos
Message 8 of 9
(4,214 Views)

The Files section of Vision Utilities provides functions for reading and writing AVI files.  The LabVIEW Vision functions use the Image data type, which is basically a reference to an image saved somewhere in memory.  What you need to do is to get the actual data from the Image and transfer that data using TCP/IP, where you can then reconstitute the Image.

 

I've manipulated and moved images around, but not across a Network.  My recommendation would be to first try recording images from your camera and saving them to .AVI files, then write another routine to read those files and display them (you'll need both routines anyway ...).  Once you have the "end pieces" working, the only thing that would remain would be the TCP/IP transfer.

 

I'm not sure what to advise, here.  I've used Network Streams, but not for Images.  I noticed that there is a IMAQ Flatten Image to String function, which intriques me because TCP/IP basically transmits strings (though an image string might be a bit too much for it).  As I noted, this is clearly possible as TCP/IP cameras get images into LabVIEW.

 

While doing a Web search, I came across this example for sending an image from a camera using TCP/IP and saving it to an AVI file.  Well, instead of the camera, get the image by reading the AVI file, and instead of saving to a file, display the image.

 

Good luck.  Hope this (and a little work with IMAQdx) completes your task.

 

Bob Schor

Message 9 of 9
(4,187 Views)