07-30-2020 08:34 AM
Hi team ,
I call a program by dynamic method . So i tried with 2 methods of calling a file path .
1st method : by static reference call
2nd method : Relative path
Please find attachment of subvi . Described in image
From the main vi , i get a data output ( log data - control name )
after getting this data i wrote this data in text file from main vi .
Issue was totally weird and ridiculous.
Issue :
From running the main vi , data was not written on text file .
But i opened this vi ( Attached - subvi file ) and put a probe , after that checking the log was captured and logging everytime , but not normally run from main vi . Totally mysterious .
please advice .
07-30-2020 10:41 AM
Could you please attach your main vi? Your probe seems to only prove you can obtain the data from the log data control, but as you haven't attached how you're writing this data to your text file, there is no way to determine what the issue is.
07-31-2020 07:15 AM
Hi allison ,
These are the subvi's i used for logging .
please find attachment
Shell uut COM read is a vi which receives a log from UUT .
Dynamic log run is vi , which gets data dynamically calling inside the main VI
07-31-2020 07:39 AM
Hi willcan,
@willcan wrote:
Issue :
From running the main vi , data was not written on text file .
But i opened this vi ( Attached - subvi file ) and put a probe , after that checking the log was captured and logging everytime , but not normally run from main vi . Totally mysterious .
Why do you need to read control values by method node?
Why don't you read the SharedVariable?
Why don't you call this VI as a standard subVI and get the desired value by wire?
There might be a race condition in your mainVI: you start the "Shell-UUT" VI and immediatly after you read the "Log data" indicator: are you sure this subVI was already able to do its job and provide a new value for "Log data"?
When "Shell-UUT" should run in parallel to your mainVI you might also use a queue/notifier to transfer data to your mainVI (among other techniques)!
07-31-2020 11:36 AM
@willcan wrote:
Hi allison ,
These are the subvi's i used for logging .
please find attachment
Shell uut COM read is a vi which receives a log from UUT .
Dynamic log run is vi , which gets data dynamically calling inside the main VI
Hello Willcan,
Unfortunately, your attached code doesn't show the whole picture.
1. Please attach all code necessary to review your issue. You've attached your write vi, but not the vi that calls it. The Bobcat_process Raw Data vi is missing, and so is the Shell class.
2. As GerdW points out, you're calling the Shell-UUT COM Read vi and then immediately reading the LogData control, without knowing if the control has yet to receive new data.
3. You're clearing out errors in your Write Text File.vi and Shell-UUT COM Read.vi, thus ignoring possible issues in your code that may help answer your questions.