LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to plot date and time read from spreadsheet

Thank you .........got it....

0 Kudos
Message 11 of 17
(839 Views)

Hello sir,

                     I have tried your idea to plot datas from ms access I got plotted data but not as I wanted and also I cant get time in secs in x axis. Kindly help me to resolve this. Ihave attached the VI and also the the access database.  I am expecting immediate response from you

 

Thank you

0 Kudos
Message 12 of 17
(789 Views)

I am expecting immediate response from you - not polite (not at all) but maybe its just your English.

 

I got plotted data but not as I wanted - what did you want and what did you get?

 

I cant get time in secs in x axis - what do you get?

 

and also the the access database - you did not attach the database.

 

A bit more detail would help!

0 Kudos
Message 13 of 17
(767 Views)

I want to appologize for my mistake sir.

 

I have tried to attach the database which is in .mdb file formate but I was getting some intimation like "The contents of the attachment doesn't match its file type".

Sorry for the inconvinence sir.

 

The database contains five columns. 1st one is Date, 2nd time, 3-5 some values

 

I was getting default date and time in x axis instead of the date and time stored in the database.

 

I want to thank you for the quick response sir. I would like to know how to plot column 3-5 values in graph against date and time store in the database.

 

Thank you

 

0 Kudos
Message 14 of 17
(753 Views)

Apology accepted, mistakes are how we learn!

 

I do not have MS Access and neither do I really have the time to try re-creating databases. Looks like you might have to do some debugging of your own!

 

Place a probe on the string feeding in to the Scan from String node  (right click the wire, click 'Probe') and a breakpoint on the output (right click on the wire, 'Breakpoint->Set Breakpoint). See where the arrows point on the image below. Now the program will stop when it has done the Scan from String and you can see with the probe what format the data is that you are feeding into it.

 

Your problem is probably that your input data is a different format. The date-time format of the input string has to match the format given in the format string (ie. "%<%d.%m.%Y%H:%M:%S >T"). If the formats are different then you need to change the format string to match your input format.

 

The help page for the Scan from String node has a link in the Format String description to a page which describes in detail how the format string is constructed.

 

Let us know how you get on.

 

debug.png

0 Kudos
Message 15 of 17
(735 Views)

Thank you for your kindness sir.

 

I have tried as you said and also find where the mistake is taken place.

 

In the screenshot I have attached there are two probes. The data entering in 5 is the one I wanted  to plot is ok but probe 4  is showing the output which is default date and time rather than equal to my input.

 

I dont know why sir. Kindly help me to dedbug. 

 

Thank you

Download All
0 Kudos
Message 16 of 17
(714 Views)

Thank you for your valuable guidence sir.

 

 I have solved the problem sir. I got the exact output I want.

 

I have attached corrected coding screenshot. I would like ask you another help sir.

 

I want to adjust the size of the input column array of the database read option while running the code rather than initializing before running the code.

 

If I would give input as 1 then the array size(not dimention but no.of elements) would have to resize to 1 then 2 means it should automatically resize to 2. So that I can avoid changing coding every time when I want to increase the no.of columns to read. Is it possible sir?

 

Thank you

0 Kudos
Message 17 of 17
(701 Views)