LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write to text file problem

I have a write to 'text file' in a sub vi. It is a popup where user can change his program.

For some reason, only the first time it is called, it actually writes to the text file.

As long as the sub vi is in memory, and I call it again and press ok to write to text file, nothing happens.

 

I've tried 'close file', but that doesnt help. Deleting the files from the disk before again calling the sub vi doesnt help either, it wont write

to file again. Is this a bug or am I missing something?! Im on labview 2010

0 Kudos
Message 1 of 7
(3,002 Views)

Is this a bug? Probably, but frankly it's more likely to be a bug in your code. No offense meant. I don't quite understand what you mean by "as long as the subVI is in memory". If the subVI is called on the block diagram it's "in memory". It would help if you actually posted your code so we can see what you're doing. Actual code is preferred over images.

0 Kudos
Message 2 of 7
(3,001 Views)

I agree it must be me. I simply get an error when I call the VI again:

 

rror 1 occurred at Write to Text File in quickexperiment.vi->programrunning0.93.vi

labVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.

 

So I kinda did a double check and put the text it is supposed to write in a queue. From another location I can write without problem, there are no disallowed characters in there. Any clue?

 

0 Kudos
Message 3 of 7
(2,997 Views)

By 'in memory' I mean, as long as the VI is running that is calling the sub vi. When I stop it from running, and start again the sub VI will execute correctly one time. Next time I call it, it refuses to write to text file, even with the same input.

I am completely lost here

0 Kudos
Message 4 of 7
(2,988 Views)

Post your VI (along with sub-VI's if any).


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 5 of 7
(2,987 Views)

I fixed it by including a dialog for the user to save it. I cant post the specific VIs, but if I make something basic it works without problems. Is a corruption of any kind possible? I have used the beta version of labview for a long time :S

0 Kudos
Message 6 of 7
(2,973 Views)

You are not supposed to be using the beta version of software. You are in violation of NI policy. NI will definitely not provide support, and the forum volunteers are not likely to provide help for someone who is not using a valid license. I, for one, won't.

0 Kudos
Message 7 of 7
(2,966 Views)