LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sending RT data on USB

I send the RT data [RT desktop target] to the host over TCP at the moment. I was wondering if it was possible to connect the RT target with the host PC with a USB wire and send the data on USB?

The network is non-deterministic so I thought using a USB cable could make the data transfer deterministic. 

 

Any thoughts about it?

0 Kudos
Message 1 of 8
(3,201 Views)

What makes you think USB is deterministic? Smiley Wink

 

 

 

Christian

0 Kudos
Message 2 of 8
(3,182 Views)

hmmm...then why do people send data over TCP rather than USB?

0 Kudos
Message 3 of 8
(3,177 Views)

I never saw a USB cable connection between two PCs. And both, TCP and USB are non-deterministic.

 

Anyhow, why do you want to have a deterministic communication between a deterministic system (RT Desktop) and a non-deterministic system (Host PC)?

 

 

Christian

0 Kudos
Message 4 of 8
(3,171 Views)

I have asked about here how to synchronise an RT target with the host VI, e.g. how to achieve that the host VI reads the network shared variable exactly at that time when the data arrives.

 

So I thought that if there was no network connection but only a USB connection, it might make the data transfer deterministic or at least more predictable than in TCP case.

 

So do you know how to read the data packets from the network shared variable [TCP packets] exactly at the pace they arrive? I guess one could set up a listener to the network shared variable that generates an event that could be handled by an event structure. I just have no idea how to do such things in LabVIEW.

 

Krivan

0 Kudos
Message 5 of 8
(3,168 Views)

Hi Krivan,

 

We would use a RT system to perform deterministic processing, for instance, within a control application. The reason we use a RT system as appose to windows, is that windows cannot process deterministically, it has other processes running within the OS that use up the processor's time, such as internet explorer, or that update that arrives at the most inopportune moment Smiley Mad So in most RT applications, The RT system will do the processing and Windows will only receive commands from the user and then send these on to the RT system, then receive an output from the RT system and display it. So because we are communicating with windows, the communication cannot be done deterministically.

 

I think the reason TCP is used is solely because it is a widely used standard communication protocol.

 

Regards

 

Rich

Richard S
Applications Engineer
Certified LabVIEW Associate Developer
National Instruments UK&Ireland
Message 6 of 8
(3,156 Views)

LabVIEW DSC supports ValueChange Events with Shared Variables, this is exactly what you are looking for.

Everytime the value of the variable changes (so when it will be written from the RT Target), an event will be fired on the host where you specify to read the variable.

 

Christian

Message 7 of 8
(3,155 Views)

Thanks, I will install the DSC module and try this ValueChange Events on shared variables.

 

Yes, the RT target does data acquisition, buffering and it tcps the data to the host. The host computer [VI] only further processes and stores the data [TDMS]. The proper timing on host was necessary because I wanted to kind of synchronise the data stream with RT target but I have to realise [especially by looking at other forum posts] that it is unlikely.

 

In my RT project a network shared variable has been automatically created in the host VI and in the non-deterministic loop. I understand that they are somehow linked but, apart from LabVIEW DSC and ValueChange Events, how do I know that data came in? I mean it is only a network shared variable without proper listeners, so what notifies the VI that data has arrived?

 

Krivan

0 Kudos
Message 8 of 8
(3,145 Views)