LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing Control Data to Text File

Hi All,

 

I'm having an issue trying to get LabVIEW to write my numeric control data to a .txt file. I can get labVIEW to do this fine when there is no case structure surrounding the code, however, as soon as I surround the code with a case structure 'Error 91' appears. I need this code in a case structure as I need a VI to be running in a continuous loop and then select to write to text file when I press a Boolean to tell it to do so.

 

The data needs to be written in this form as I am then using the data to read from the written text files.

 

My working VI is attached, along with my VI that doesn't to illustrate my problems.

 

Any advice/help would be much appreciated.

(I'm using LabVIEW 2011)

 

 

Download All
0 Kudos
Message 1 of 5
(2,927 Views)

Take a look at this blog posting - The Power of Traverse

This VI will return references to all the objects of a given class that reside within the panel, diagram, or a user-defined object in a VI. The traversal is recursive, so it will find objects nested within other objects.

Write%20to%20text%20file%20with%20Case%20Structure[1]_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 5
(2,917 Views)

Your problem is that your button is now in the list of controls.  A boolean cannot be propery converted into a double and hence your error.  You need to filter down to only the controls you care about.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 5
(2,899 Views)

Hi

 

Thanks for that. That makes sense, I just hadn't thought about that. I will try defining which controls I need to write from in the VI.

 

Regards,

 

George

0 Kudos
Message 4 of 5
(2,871 Views)

How do I select the particular controls I wish to write from?

0 Kudos
Message 5 of 5
(2,866 Views)