LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Having problem of reading file path of the writing to file module

I have a NI 9229 that generates data and the write to measurement file write the acquired data into text file normally. The write to measurement file is adjusted to generate an output file every one hour. After the output file is generated, a python node reads the path of the generated output and perform certain tasks. However, the path is disappeared as soon as the output file is generated. Also, I think that the python node should start working after the output file is generated. Kindly, help me to solve these problems.

Download All
0 Kudos
Message 1 of 6
(1,875 Views)

Hi Emad,

 


@Emad_NRIAG wrote:

After the output file is generated, a python node reads the path of the generated output and perform certain tasks. However, the path is disappeared as soon as the output file is generated.


What do you mean by "path is disappeared"? How can a path just disappear, when it is shown in that "file path" indicator?

 


@Emad_NRIAG wrote:

Also, I think that the python node should start working after the output file is generated.


This is enforced by DATAFLOW!

Right now the Python call is executed AFTER the WriteMeasurementFile ExpressVI due to THINK DATAFLOW!

When you also want the start Python AFTER WriteMeasurementFile then you should use its error output to enforce DATAFLOW to the OpenPythonSession function!

 

Why don't you cleanup your VI so it is much better readable?

What's the point of that ConcatString node in your VI?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(1,870 Views)

Hi Mr. Gerdw,

 

I meant by "path is disappeared" that the file path indicator gives <not a path> at the end of write module finished, and then the python node complains.

I used ConcatString to try saving the path before write to measurement file finished.

0 Kudos
Message 3 of 6
(1,844 Views)

Hi Emad,

 


@Emad_NRIAG wrote:

I used ConcatString to try saving the path before write to measurement file finished.


Which is quite nonsense due to THINK DATAFLOW!

How should that function "save" any data before the file function has finished when it is called after that function has finished???

 


@Emad_NRIAG wrote:

I meant by "path is disappeared" that the file path indicator gives <not a path> at the end of write module finished,


Which path do you wire into the WriteMeasurementFile function?

Do you hit a "Cancel" button somewhere when saving data to a file?

 

Btw. I get the very same "not a path" value because the path given in the ExpressVI does not exist on my computer…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(1,790 Views)

Hi Mr. Gerdw,

 

Please, find the attached video form clear explanation. The path address appears and suddenly disappears. Kindly, is there a method to save the file path once it appears to solve this problem.

 

0 Kudos
Message 5 of 6
(1,735 Views)

Hi Emad,

 

while this is a nice video it does not help to solve your problem…

 

All I see is that a valid path is replaced by <Not a path> somewhen.

 

But why is it replaced? Are there any errors in the ExpressVI? How often is that part of code executed? Mind to show an additional probe window with probes before and after the ExpressVI?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(1,725 Views)