Test and Measurement Forum

How to create a CSV file with date/time, and graph config?

Forum for discussing PicoLog

How to create a CSV file with date/time, and graph config?

Postby peterh337 » Tue Apr 29, 2014 1:51 pm

1)

I am using PS6 and doing Save As always writes out a CSV file with the sample number (1 2 3 ... ) in the first column.

I need a CSV file with the computer time in it e.g. 10:30

2)

Is there any way to make the program start up with the graph in Scroll mode and with a specific number of samples on the x axis? The only way I can see of doing that is to start it with defaults (probably Auto for x and Auto for y - seem to be random) and run some kind of script language which drives the user interface form to start it off, waits for say 100 samples to arrive (100 seconds - the ADC conversion on the PT-104 is 700ms so anything less than 1 sec doesn't do anything useful) and then flips the x axis from Auto to Scroll.

More basically I would like the whole program to start up configured and just start logging.

I have four PT-100 sensors connected. These are top grade, 0.05C accuracy. The PT-104 appears to have been calibrated to within 0.1C and two of them were close and the other two were close but the two pairs were 0.1C apart. So I calibrated them to be within 0.02C of each other

http://i.imgur.com/E5fJVQU.jpg

I used the Scaling function to add a little offset. That works great. But I am concerned that this tweak might get lost when the app is restarted, so I have a procedure whereby I always start it by opening a previous data file and then starting a new file. What exactly controls if these scaling values get saved?

The A-D converter is a little more noisy than I would have expected of a "24 bit" device taking 700ms (the noise seems to be about 10 LSBs so only about 20-21 bits of the 24 are meaningful) but really 0.02 degC of noise is OK for what I need. I have tried the filtering function but it results in a ~ 10 second delay before any input change is noticed (at all) and then you get a very strange response which contains huge steps. It isn't the standard common FIR filter, or maybe it is an FIR filter but has an error in the implementation.
peterh337
Newbie
 
Posts: 0
Joined: Tue Apr 29, 2014 1:38 pm

Re: How to create a CSV file with date/time, and graph confi

Postby peterh337 » Thu May 01, 2014 3:31 pm

No replies...

It would appear that my only option for generating a CSV file with HH:MM:SS in the time column is to use a formula to convert the seconds into HH:MM:SS by dividing by 3600 to get hrs, dividing the remainder by 60 to get minutes, and the remainder is seconds.

That is easy enough.

Confirm?
peterh337
Newbie
 
Posts: 0
Joined: Tue Apr 29, 2014 1:38 pm

Re: How to create a CSV file with date/time, and graph confi

Postby Hitesh » Fri May 02, 2014 8:46 am

Hi peterh337,

It is possible to save the time as HH:MM:SS through the PLW Spreadsheet dialog:

  • In the PLW Recorder window click on the 'View spreadsheet' icon on the right of the dialog.
  • In the PLW Spreadsheet dialog, click on the 'tick' icon and in the 'Spreadsheet options', change the Time format to 'Time of day' and click 'OK'.
  • Next click on the cyan coloured 'Select' icon to select all rows:

    PicoLog_Select_All.png
    Selecting all rows

  • Either click the 'Write to disk' and save to a text file or click the 'Copy to clipboard' icon and copy to a spreadsheet application of your choice.

With regards to starting up PicoLog with default settings, once you have configured the graph as required, click File -> Save as... and in the 'Save file as...' dialog, change the 'Save as type:' to 'Settings files (*.pls)'. This will also store information relating to your scaling.

Once you have saved this file, you can right-click the file and select 'Open with...', then browse to find the plw32.exe file located in your C:\Program Files\Pico Technology\Pico Full (32-bit PC) or C:\Program Files\Pico Technology\Pico Full (64-bit). This step will allow you to double-click the settings file to start PicoLog Recorder (or Player if Recorder is already open).

In the PicoLog User's Guide (http://www.picotech.com/document/pdf/plw.en-4.pdf) please refer to section 3.5 (Start recording whenever Windows starts).

With regards to the filtering, please could you post a data file here or send it to support@picotech.com and we can take a look into it.

I hope this helps.
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2058
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: How to create a CSV file with date/time, and graph confi

Postby peterh337 » Sun May 04, 2014 6:41 pm

Yes - this works, thank you.

2 observations:

1) It doesn't help with the graph config, as far as I can see
2) There is a limit on the number of samples of 65535

But that's OK because I am now logging just one per second.
peterh337
Newbie
 
Posts: 0
Joined: Tue Apr 29, 2014 1:38 pm

Re: How to create a CSV file with date/time, and graph confi

Postby peterh337 » Mon May 05, 2014 2:53 pm

The .pls file also doesn't save the max logging period, which keeps defaulting to 500 samples.

I found this out to my cost today when doing a very difficult to set up experiment, and discovered that I lost a chunk of the data which should have been logged.

It looks like the only reliable way of using this software is to start it up and check all the settings manually. The other thing which might work is opening a previously saved .plw file which was generated with the desired settings.

I apologise if this is documented somewhere but is there a piece of software which has an easy API which can be called from C or C++ under winXP or win7 and which would enable a very simple program to be written which simply starts up and logs the four channels to a CSV, one sample per second?
peterh337
Newbie
 
Posts: 0
Joined: Tue Apr 29, 2014 1:38 pm

Re: How to create a CSV file with date/time, and graph confi

Postby Hitesh » Thu May 08, 2014 3:36 pm

Hi peterh337,

I'll look into the graph config and get back to you. #

Is the limit from the speadsheet view? This may be due to older versions of MS Excel.

With regards to C and C++ software, we have a Software Development Kit containing a Programmer's Guide, drivers and a C source code example.

The SDK should be on your software CD or can be downloaded from our Software Downloads page (http://www.picotech.com/software.html) - please select your product in option 1, and in option 2, select the Software Development Kit option.

Hope this helps.
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2058
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire


Return to PicoLog

Who is online

Users browsing this forum: No registered users and 0 guests