04-10-2012 04:05 AM
I have some generate data in read buffer string ,i want to transfer these data into table, the table also have the time and data automaticly,how do I design the program? this is the gennerate read buffer.
04-10-2012 06:05 AM
Hi
Where is the data buffer coming from?
You could read it as an array of strings and write the array into an excel file
From where are you bringing the time stamp for each row of data?
Have you tried anything?
04-10-2012 08:20 PM
I did this individual, Now I donnot know how to combine.the data from my test kit.
04-10-2012 11:07 PM
Yoy have not enclosed read and write inside a loop.
So you are reading 10 bytes from the port, only once.
Is it intentional? you only want to read from it once then perform some manipulations on the data?
Why is there a stop button in for loop? the ending of for loop does not depend on a control, you simply wire how many time you want it to iterate to N. So it will iterate according to your vi , the value of numeric.
Explain what exactly your project is then I will try to help. I am myself working on VISA...
04-11-2012 02:59 AM
can u just tell me how to transfer data into table. i generate two group of data. when meet the $ sign, the next group of data will be transferred to the next row,but now i just can split them and transfer one group to the table. u had better mofify the block diagram,how will u do, because i am new to labview,thanks very very much.
04-11-2012 04:34 AM
What you are doing is making no sense to me.
you have 3 to count N. why? and then added stop again. Stop for what?
you are not adding data to the table inside the read loop. you are adding it into the table after the data has been read and visa is closed.
do you want data to be added to table dynamically?
you do not configure visa and close visa inside the loop. move it outside. otherwise it keeps reopening and reclosing. data might be lost.
I have changed the for loop to while loop, so the device stops reading/writing once user presses stop.
moreover, you did not use shift register, hence in your read buffer string only the last data read was coming. add shift register, and concatenate so that the final output has all the data read.
now in the next loop, no data is being added to the columns green blue nf, why are you making those columns then?
Also why are you writing the same data 10 times into the table?
There is no time out in your event case. It will wait indefinitely for the user event. Also the while loop has false written to it so it will go indefinitely.
Anyways I have written the other block as the next row into the table
Avoid using local variables unnecessarily specially when wiring is possible.
dont make such big VIs, divide them into sub VIs wherever possible.
How can anyone help till you don't tell what you are doing.
Here is the modified VI. I have made the changes as much as I could guess
04-11-2012 08:08 PM
Thanks so much, but I cannot open yours,my is 2009
04-11-2012 11:11 PM
Here it is
04-12-2012 01:11 AM
I tried yours but still cannot work, no data generate in the read string, no time,date display on the table ,i do not know the mistake,still thx
04-12-2012 04:15 AM
Try now. I can help if you tell the details a it but anyways..