11-07-2016 11:36 PM
hey chams....
im using write to spreadsheet function to record my data into excel and thankfully im able to do so...
the problem is the same data is being recorded repeatedly.
here im attaching my vi and corresponding excel.. hope u understand my problem.. if not please guide me so i can explain more. thank you in advance.
11-08-2016 01:21 AM
Hi Just,
as your problem is NOT related to Excel (or any other tool able to display CSV aka spreadsheet files) I moved your message into it's own thread!
As said before: the problem is not within your file - it's related to how you read those data from serial port! In the file are just those data that are written into - you need to check the data source!
Start debugging using probes - we cannot as we don't have your hardware…
11-08-2016 02:24 AM
hardware is simply an arduino mega board with
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
// while (!Serial) {
// ; // wait for serial port to connect. Needed for native USB port only
// }
// send an intro:
Serial.println("\n\nString Constructors:");
Serial.println();
}
void loop()
{
// using a constant String:
String stringOne = "Philips123";
char c;
Serial.println(stringOne); // prints "Hello String"
while (1)
{
if (Serial.available())
{
c = Serial.read();
Serial.print(c);
}
}
// do nothing while true:
while (true);
}
this program
11-08-2016 02:46 AM
11-08-2016 03:23 AM
yeah.. it is so.. !!
how can i get rid of it??
11-08-2016 03:26 AM - edited 11-08-2016 03:28 AM
Hi Just,
don't send data every second to your Arduino!
Two options:
- use an event structure and only send on value change events of your string input
- use an additional button to enable the VISAWrite with a case structure…
This is pretty basic LabVIEW stuff, so I recommend to take the free beginner courses offered by NI on their website!
11-08-2016 03:34 AM
thanks.. i will definatly go with this logic..
my another query is... if my excel finishes at certain stage while the hardware is in operation.. can i append another excel to the existing one? and how?
11-08-2016 03:53 AM
Hi Just,
my excel finishes at certain stage
can i append another excel to the existing one?
Well, Excel is an application made by Microsoft. Why should Excel "finish" and how to you append one application with another one?
You should have read in that other thread about the difference between "Excel" (application) and "spreadsheet file" (file with a certain data format)…
What exactly is your problem and what do you want to achieve?
11-08-2016 05:22 AM
if spread sheet limit reached like no ofrows and columns are filled totally.. then can i append another spreadsheet??
11-08-2016 05:40 AM - edited 11-08-2016 05:42 AM
Hi Just,
a spreadsheet file is just plain text with some tabs or semicolons used for formatting - no, you cannot have another "spreadsheet" inside this file!
You can create another spreadsheet file once your current file has reached your limits…
(Excel can handle 1E6 rows in a sheet. With your samplerate of 1S/s you would need to measure for 1E6/86400=11.5 days to reach this limit. Will your VI run for that long?)