01-15-2010 01:30 AM
i want to write the values of x and y.....how can i do that........i have tried with the unbound cluster.but the wires were not connected.it tells that the dimensions are not same.why my xy shows 3 dimenssional array? it should be 2d array.
can someone help me please......:)
towhid
Solved! Go to Solution.
01-15-2010 05:28 AM
I can't see your VI 'current measurement.vi' because LV2009 but 'Bar Plot.vi' is ok...
Why don't you use the direct build by Bundle function?
Arrays of constant are to replace with your data.
01-15-2010 05:54 AM
thanks for the reply.i want to save the data obtained from the graph.so i need to write the graph in a write spread sheet file or text format. in the current measuring vi.....i used a daq card and measured the currents.i have plotted the no.of channels vs the measured current data in a bar graph.so i need to record the datas i obtain from card that means from the graph.i have tried to write it but i cannot connect the pink wires to the write file option.
it is the similar as the bar graph.i want to save my x&y vaues from the graph.
how can i do this.
towhid
01-15-2010 06:08 AM
Normal, 'Write to Spreadsheet File.vi' required a simple 1D or 2D array as entry and not a specific type as cluster (because XY graph is a cluster).
So, considering your [X] data are the same for each [Y], you could build an 2D array of your data to use it (by implementing 'Build array' with [X] & [Y]).
If it's not the case (same [X] for all [Y]), you will need to proceed with other method => 2 files or custom text conversion before writing.
01-20-2010 06:53 AM
thanks for your solve.
but another problem is that...suppose i need data in the form (x,y)
i mean here it is not possible to write the data in this form
01-20-2010 07:02 AM
actually i got the voltage from 5 different channels using Ni DAQ and showing the graph in a number of channel(horizontal axis ) vs voltage(vertical axis).so i plotted this in a xy bar plot.now i want to write the voltage datas in a file. i have five channels and five voltage datas which varies always(its not a static voltage).so i want to write this datas in a format (number of channel,voltage)for five channels and a series of voltage datas.it may be like this:
1 2 3 4 5(these are the no of channels)
1.4 1.2 1.78 1.5 2.1
2.3 2.5 1.3 0.9 2.2
14 21 10 5 13(these all are the voltages)
i want to write in this way.
pls someone help me.
01-20-2010 07:45 AM - edited 01-20-2010 07:47 AM
It's the same case as previous but make a double access to file in order to start with the channel name or number then write voltage with append option.
In this example, i write String as channel number but because the function is polymorphic, you could write a simple interger too.
The problem with this function 'Write To Spreadsheet File.vi' native to LabVIEW is that you can not manage error and if you have an error to the first call, you probably have the same to the second. So, insert a parade : a function to know if the file exists. it's a primary test to know if there is no problem with the first call.
But if you need to read it don't forget to ignore the first line as voltage data.
01-20-2010 09:57 PM
and i also need to add a command,like a boolean button.so that i can press the button and then start writing the file.
can you please add the vi also.
please
01-21-2010 01:52 AM
but the problem is that,i want the data as a format as follows
1 2 3 4 5(these are the no of channels)
1.4 1.2 1.78 1.5 2.1
2.3 2.5 1.3 0.9 2.2
14 21 10 5 13(these all are the current values)
and so on
i want to write in this way in a spreadsheet or in a write to measssurement file.vi
any of the format.writing is my only problem
pls someone help me.
01-21-2010 02:27 AM
I hadn't the VI any more but I just do it again, see attached file.
So, if I understand, it's a problem of format => add %#.1f as format entry to have 1 or none digit of precision, %#.2f to have 2 or none, etc...
But when I see your attached image, you use another method (by Express) and you seem to be near the soluce, aren't you?