LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

transmettre les variables d'un RT VI vers un VI sous poste de travail

bonjour, 

je souhaite transmettre les variables d'un RT VI vers un VI sous poste de travail, j'ai utiliser les variables globales et les files d'attente mais ça ne marche pas.

merci d'avance.

 

0 Kudos
Message 1 of 7
(2,665 Views)

Chère Christine,

 

     The usual way to transmit data from an RT Platform to the Host PC (I hope I've understood the question sufficiently well) using uses a TCP/IP connection between them.  Look for help on Data Communications in LabVIEW.

 

     Methods I've used include:  VI Server, an older method, a little bit cumbersome, where you "push" or "pull" data to a variable on the other machine.  FTP, invoked by a command string (and also a little old-fashioned).  Network Shared Variables, a common method for sharing variables with an FPGA processor, pretty simple, not necessarily all that fast.  Network Streams, establishes a TCP/IP one-way connection between Host and Remote and can transmit lots of data at TCP/IP rates (pretty fast).

 

     What you choose will depend on How Much Data, How Often Do you Send/Receive, How Fast, and How Reliable.

 

Bob (je ne parle pas français, mais, peut-être un peu) Schor

0 Kudos
Message 2 of 7
(2,639 Views)

You can also use network-published shared variables and network streams:

 

'Using the LabVIEW Shared Variable'

http://www.ni.com/white-paper/4679/en/

 

'Lossless Communication with Network Streams: Components, Architecture, and Performance'

http://www.ni.com/white-paper/12267/en/

 

Hope this helps!

 

~ Q~

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

Hello, thank you for your answers, in fact I tried with the TCP/IP method, here is the code,  I know that the data is sent because I get the size of the chain that I sent in the written bytes indicator but I don't receive data in the output. could you help me please

thank you in advance

 

Download All
0 Kudos
Message 4 of 7
(2,609 Views)

Why did you blank out the labels in the block diagram image? There are four indicators in the block diagram but only three on the front panel. Are the two screen captures for the same code?

 

Why didn't you wire the error wire through from the TCP Write to the TCP Read? Why didn't you wire a value to the number of bytes to read in TCP Read?

 

What is running on the remote system? What is the protocol (on top of TCP)? To which port are you trying to connect? You should not use "Main Application Instance/VI Server" - you're trying to set up your own TCP connection, not use VI Server. If you would rather use VI Server, then use those functions, and not the TCP functions.

 

Take a look at the TCP examples that ship with LabVIEW.

0 Kudos
Message 5 of 7
(2,582 Views)

hello thank you for your reply.

indeed I am a beginner in labview, I will take your remarks into consideration.

about the TCP protocol where and how should I put it, and how can I know the port number that I'm using , I saw some tutorials but they are not well explained, the examples of NI that I've found were to transmit data between two computer VIs. 

cordially

0 Kudos
Message 6 of 7
(2,562 Views)

TCP requires coordination between a client and a server. You must set up the communication on both ends (the RT target and the workstation) in order to transmit data. Right now you're only showing us one end of the communication, on the workstation side.

 

There are several ways you can do this: network streams, network shared variables, VI server, direct TCP communication. You need to pick one and use it on both ends.

 

There's no difference in using the TCP VIs on an RT target versus a computer, so all the examples are equally valid for an RT target.

 

If you do choose to use TCP directly, it is up to you to choose a port number. The server listens on that port, and the client connects to that port.

0 Kudos
Message 7 of 7
(2,542 Views)