LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Transfer cRIO to Host

Hi all, 

 

I am having trouble understanding the transfer of data between the cRIO 9048 and the host PC it is connected to. I have two VI's one running on the cRIO, and one running on the host PC that the cRIO is connected to. On the cRIO VI I am using a DAQ assistant block to collect some accelerometer data, then it displays the data in a waveform chart, then writes it to a shared variable that is hosted on the cRIO. The host VI is reading a shared variable, saved to the host PC, that is bound to the shared variable that is hosted to the cRIO. Both shared variables types are network-published. With this setup there does seem to be transfer of data, but when I compare what was collected by the cRIO and the host PC, they seem to be completely different. Any help or tips on what is happening would be greatly appreciated. I have also attached the both VI's and the project file. 

 

Thanks, 

Maxwell

Download All
0 Kudos
Message 1 of 10
(4,563 Views)

Could you save the file to lower versions, preferably LV2014?

0 Kudos
Message 2 of 10
(4,542 Views)

Yes, they are attached in this response.

Download All
0 Kudos
Message 3 of 10
(4,537 Views)

ProjectProjectHostHostRTRT@Maxwell,

You are actually reading from two different shared variables from two different libraries. You do not need two libraries for both host and RT. Use only one variable from a single library and deploy it to both host and RT. 

0 Kudos
Message 4 of 10
(4,535 Views)

I highly recommend you stop using the Network Published Shared Shared Variable (NPSV).  My main reason for this is you logging of data.  NPSV is a tag based system, which means you just get a snapshot whenever you happen to check it.  So you will miss data points.  Instead, you should be using Network Streams to stream the data to your PC.  This way you get all of the data and you avoid all kinds of issues NPSVs cause (they are SLOW, race conditions seem to just leak from them).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 10
(4,512 Views)

Why with DAq adquisition signal is very simple the transfer to PC  and with Crio is more complex?


@crossrulz  ha escrito:

I highly recommend you stop using the Network Published Shared Shared Variable (NPSV).  My main reason for this is you logging of data.  NPSV is a tag based system, which means you just get a snapshot whenever you happen to check it.  So you will miss data points.  Instead, you should be using Network Streams to stream the data to your PC.  This way you get all of the data and you avoid all kinds of issues NPSVs cause (they are SLOW, race conditions seem to just leak from them).


 

0 Kudos
Message 6 of 10
(4,467 Views)

Hi Aldo,

 

because a cRIO is a computer of its own!

 

Here the same rules apply as you would need for exchanges data between two Windows computers: nowadays you use a network connection between them…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 10
(4,463 Views)

@ALDOCAMPOSP wrote:

Why with DAq adquisition signal is very simple the transfer to PC  and with Crio is more complex?


As GerdW stated, the cRIO is an embedded computer.  It is not just a simple extension of the PC such as a USB, PCI(e), or PXI(e) DAQ board.  The only way for a PC to talk to another system is through a communication bus such as Ethernet (most common) or RS-232.  You have the same issue with an Arduino or Raspberry PI.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 10
(4,458 Views)

Hi Maxwell,

 

You can use TCP/IP communication to transfer the data between cRIO and Host PC. It will be more faster than Shared variables.

 

Manikandan.

0 Kudos
Message 9 of 10
(4,455 Views)

OK, Thanks Manikandan


@மணிகண்டன்  ha escrito:

Hi Maxwell,

 

You can use TCP/IP communication to transfer the data between cRIO and Host PC. It will be more faster than Shared variables.

 

Manikandan.


 

0 Kudos
Message 10 of 10
(4,446 Views)