LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: excell

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.

0 Kudos
Message 1 of 20
(1,155 Views)

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…

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 2 of 20
(1,147 Views)

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

0 Kudos
Message 3 of 20
(1,127 Views)

Hi Just,

 

your Arduino just echoes what it receives on the serial port. And your PC is sending data each second.

 

And now you wonder, why you got the same data each second in your log file?

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 4 of 20
(1,117 Views)

yeah.. it is so.. !!

how can i get rid of it??

 

0 Kudos
Message 5 of 20
(1,107 Views)

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!

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 6 of 20
(1,105 Views)

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?

0 Kudos
Message 7 of 20
(1,099 Views)

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?

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 8 of 20
(1,092 Views)

if spread sheet limit reached like no ofrows and columns are filled totally.. then can i append another spreadsheet??

0 Kudos
Message 9 of 20
(1,086 Views)

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?)

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 10 of 20
(1,082 Views)