05-18-2012 04:54 AM
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)
05-18-2012 05:45 AM
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.
05-18-2012 10:30 AM
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.
05-23-2012 05:55 AM
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
05-23-2012 06:22 AM
How do I select the particular controls I wish to write from?