06-04-2021 06:45 AM
Hi All,
I'm using LabVIEW 2018 with FPGA Module and Real-Time Module.
I'm trying to execute a very simple task of creating a .csv file in a folder on the Desktop.
When using the Real-Time Module, this doesn't work. No errors show in the Error Out.
I'm assuming with it using the Real-Time Module that the Path name must be written differently to normal.
If this is the case, then is there any simple way to change the Path generated from "Path->Browse Options->Selection Mode->Files or Folders" (e.g. ) to the new Path for Real-Time Modules?
Solved! Go to Solution.
06-04-2021 07:20 AM
The RT system cannot write to your desktop. It is a separate computer. You need to choose a folder location on the RT system and then use WebDAV to get the data off. Alternatively, you can have the RT system write to an application or VI with TCP on the Windows system. The Windows application/VI can then write that data to the file.
06-04-2021 09:53 AM
I've figured out a workaround for the problem.
Simply, create this VI in the "My Computer" part of the Project Explorer, not the "NI-PXIe" (or similar RT) folder.
If you want to write data from the RT to the VI (or text file you create using the VI), then:
1) Create a Global Variable in the .lvlib of the RT folder
2) Place the Global Variable in the RT VI
3) Connect the data (in my case, a 2D Array) to the Global Variable in the RT VI
4) Place the Global Variable in the "My Computer" VI
5) Connect as you wish
06-04-2021 10:18 AM
Hi SDuffy,
@SDuffyLV wrote:
I've figured out a workaround for the problem.
Simply, create this VI in the "My Computer" part of the Project Explorer, not the "NI-PXIe" (or similar RT) folder.
If you want to write data from the RT to the VI (or text file you create using the VI), then:
1) Create a Global Variable in the .lvlib of the RT folder
2) Place the Global Variable in the RT VI
3) Connect the data (in my case, a 2D Array) to the Global Variable in the RT VI
4) Place the Global Variable in the "My Computer" VI
5) Connect as you wish
I'm sure this "workaround" results in errors/problems. It certainly is no solution…
Your host computer has no access to the global variable on your RT executable!
LabVIEW comes with a huge example library, and there are also example projects explaining how to transfer data from FPGA to RT to host computer!
06-04-2021 10:33 AM
Hi GerdW,
Maybe for other scenarios this solution may not work but it has done in this case.
There was no issue reading from the Waveform Capture.vi in the NI-PXIe folder via a Global Variable.
If it was from the FPGA Target folder that is inside the NI-PXIe folder then I'd understand there could be a problem there.
Is it possible I've asked the wrong question?
I'll give the Accept Solution to crossrulz regardless as I'm sure this would be a solution to the issue in the scenario that he likely understood the question as.
06-04-2021 12:27 PM - edited 06-04-2021 12:28 PM
Hi SDuffy,
@SDuffyLV wrote:
Maybe for other scenarios this solution may not work but it has done in this case.
There was no issue reading from the Waveform Capture.vi in the NI-PXIe folder via a Global Variable.
If it was from the FPGA Target folder that is inside the NI-PXIe folder then I'd understand there could be a problem there.
A global variable is only accessable in the context of the executable holding that global. When the RTEXE holds the global, then your (Windows) host computer executable has no access to that global of the RTEXE…
(It might work, when you run all VIs from within the LabVIEW IDE. I don't recommend that for a production system.)
(It might also work, when you refer to SharedVariables instead of global variables.)
@SDuffyLV wrote:
I'll give the Accept Solution to crossrulz regardless as I'm sure this would be a solution to the issue in the scenario that he likely understood the question as.
That is ok.
My suggestion basically is the same, as the mentioned example projects also show how to use network communication to transfer data between your different targets!