Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision Builder TCP I/O functions also available in LabVIEW?

A simple question:
 
In Vision Builder you can do TCP communication via the TCP I/O step located inside the Vision builder environment.
Is it also possible to call a LabVIEW vi from Vision Builder that does more or less the same TCP communication?
If the answer is yes, where can I then find these TCP functions to do this kind of communication in LabVIEW?
And how do I pass the existing TCP session of Vision builder to my LabVIEW vi.
 
cheers,
 
noxus.
0 Kudos
Message 1 of 3
(3,340 Views)
> Is it also possible to call a LabVIEW vi from Vision Builder that does more or less the same TCP communication?
> If the answer is yes, where can I then find these TCP functions to do this kind of communication in LabVIEW?
 
You can find the TCP VIs in the Data Communication>>Protocols palette in LabVIEW (see attached screenshot).
 
> And how do I pass the existing TCP session of Vision builder to my LabVIEW vi.
 
That is currently not possible. If Vision Builder AI is the slave, you won't be able to receive anything in your VI anyway, because Vision Builder runs a background task that receives all incoming communication and buffers it. You can then access it throught the TCP step.
If we gave access to the session, what you describe would work to send data, but if your problem is that the TCP step does not format the data as you wish, you can still use a Run LabVIEW or Calculator step to format the data, let the step publish the result and still use the TCP step to send the result that you formatted.
If you really want to do everything by yourself in LabVIEW, you can of course do it, but you're going to have to not use at all the TCP step in Vision Builder AI and delete the device from the device manager.
What limitation do you find to the TCP step? Is there anything we could do to improve it so you don't have to do custom work?
 
Thanks,
 
-Christophe
NI Vision R&D
0 Kudos
Message 2 of 3
(3,338 Views)

Hello Christophe,

First of all, thanks for the explanation of the inner workings of the TCP communication step. The reason I was asking this question is that I wanted to pass the number of characters to read via a global variable. Now you can only enter a constant value for it.

I can always pass a VBAI global variable to a LabVIEW vi and if the TCP functions were available there then my problem would have been solved.

best regards,

noxus.

0 Kudos
Message 3 of 3
(3,331 Views)