04-20-2009 09:39 PM
04-20-2009 09:48 PM
Ok...let me be more specific.
Let's say that I get some data from a frequency counter and a temperature controller. Those are double precision. What I want to do is label them with let's say "temp" and "freq". I want to create a subvi that I can use to write those values in a file but also create a header ( so I will basicly have 2 columns, one for temp and one for freq and at the top of each column i have the words temp and freq). That subvi should create a header and write the values for any set (number and type) of data I input.
I know that I don't have to do it like that, but I just want to know if it's possible.
04-20-2009 09:56 PM
OK, that we can do.
As you can see, one of the properties is Label.txt. If you make the property node box bigger by dragging down the bottom (below label.txt), you can get another property output. You can set this one to "value" and you're ready to roll. If you don't like that, you can use my VI just to get the label and then use the write to spreadsheet vi's to write the file.
Sound better?
04-20-2009 10:13 PM
🙂 Yes, I know how to get the value also, but I will still have to create the reference to that variable to use your vi.
When I get data from any instrument they go into an indicator (that I can choose to label or not). I do label it for obvious reasons. I could also create a string constant for each indicator containing the same string as the label and use that to write the header in the spreadsheet. I don't want to write the same text twice( i.e. write the label and the value of that string).
I want to keep the looks of my vi as simple as posible. The instrument has its on subvi that outputs a value. that value goes to my indicator (labeled). I want to use that indicator (value and label) without creating refercence to it (it would take some time to do that if I have lets say 10 instrumets and instead of creating that reference I could just create a string for each data value given by each instrument containing the name of the data i.e. freq, temp, voltage, etc ...the same as I would write on the label).
I know it may sound weird what I want to do, but if there is a way to do it, I would like to know (cause that is how I learn :D).
Thanks !
04-20-2009 10:17 PM
04-20-2009 10:27 PM
Ok!
Is there a way of just writing the string constant conatining the name of the data and the use it to edit the label (so I wont have to write the label as well) ?
Does change to write option of the property node work in this case ?
04-20-2009 10:28 PM
04-20-2009 10:28 PM
Changing the property node to write should work fine for that.