09-21-2021 03:01 AM
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.
09-21-2021 03:18 AM - edited 09-21-2021 03:19 AM
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?
09-21-2021 03:46 AM
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.
09-21-2021 08:02 AM - edited 09-21-2021 08:04 AM
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…
09-28-2021 07:54 AM - edited 09-28-2021 07:55 AM
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.
09-28-2021 10:27 AM
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?