prads Posted May 22, 2008 Report Share Posted May 22, 2008 Hello, I have a few doubts in labview...... 1. I have a reference out as the output of a Property Node. Is it possible to write this into a text file? I tried but it gives errors stating that output is reference(output of Property Node) and input is string(Input of a write to a Text File). If yes how? Also I have another important question regarding this. In a Property Node, after setting several properties, does the output of the property node, called the reference out, contain all the set properties in a particular fashion or is there any other explanation for that? Im kind of confused with that. In the sense does a Property node act as a node/Mux which takes in several properties as input and outputs a single value? I want to write the output of this Property Node (The properties that I set in the Property Node initially are a mix of double and Integer data values) to a text file which when opened should have all the values of the properties displayed as set initially.... 2. I want to write several things into a text file. However the inputs are from different sources and hence is becoming a little complex. Can you tell me how I should append 3 sources of text to a single text file. To do this what is the minimum number of VI's(Write to Text File and Set File Position) required? I am making use of three VI's each....... Regards, prads Quote Link to comment
Francois Normandin Posted May 22, 2008 Report Share Posted May 22, 2008 QUOTE (prads @ May 20 2008, 09:12 PM) Hello,I have a few doubts in labview...... 1. I have a reference out as the output of a Property Node. Is it possible to write this into a text file? I tried but it gives errors stating that output is reference(output of Property Node) and input is string(Input of a write to a Text File). If yes how? Also I have another important question regarding this. In a Property Node, after setting several properties, does the output of the property node, called the reference out, contain all the set properties in a particular fashion or is there any other explanation for that? Im kind of confused with that. In the sense does a Property node act as a node/Mux which takes in several properties as input and outputs a single value? I want to write the output of this Property Node (The properties that I set in the Property Node initially are a mix of double and Integer data values) to a text file which when opened should have all the values of the properties displayed as set initially.... Hi there. It seems you confuse the reference out (which is really just a pointer if you're used to text programming) with the actual properties of the control or indicator. Have a look a the wiki for Control References: http://wiki.lavag.org/Control_References http://lavag.org/old_files/monthly_05_2008/post-10515-1211334833.jpg' target="_blank"> Quote Link to comment
prads Posted May 22, 2008 Author Report Share Posted May 22, 2008 Hello Normandinf, You have shown me the connection of label.text to a Write.vi. Can you tell me how I should append more than 1 file source of different data types to a write.vi. regards, prads Quote Link to comment
Francois Normandin Posted May 22, 2008 Report Share Posted May 22, 2008 You need to convert types to be compatible with the datatype accepted by the write.vi (or any VI for that matter). If you choose "string" as your paradigm, then convert everything to string and concatenate in a format you want (tabulated, coma-separated values, custom, etc.) Then write to file. Browse through the palette for "string" manipulations. You will find many fonctions to help you do just that. LabVIEW tutorials and help file contain many examples to get you started with. If you want more specific help, you should show us what you've done so far by uploading a VI with your best effort or posting a picture of your block diagram. Quote Link to comment
orko Posted May 22, 2008 Report Share Posted May 22, 2008 QUOTE (prads @ May 20 2008, 06:12 PM) 2. I want to write several things into a text file. However the inputs are from different sources and hence is becoming a little complex. Can you tell me how I should append 3 sources of text to a single text file. To do this what is the minimum number of VI's(Write to Text File and Set File Position) required? I am making use of three VI's each...... Here are some examples of different ways of taking multiple data types and writing to a text file. Notice that the write to text file VI can take a single string, or an array of strings (which it writes each element to the file as a line). Look into the help of the VIs that I've used to find out more. There are a lot of different ways to accomplish this, as you can see: http://lavag.org/old_files/monthly_05_2008/post-3266-1211400302.png' target="_blank"> Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.