Test and Measurement Forum

VBA to Read data from Picolog PLW file

Post your VB and VBA discussions here

VBA to Read data from Picolog PLW file

Postby JonBear » Wed Feb 07, 2018 12:14 pm

Hi All,
I am being supplied with temperature data from a TC-08 and can load this into the "Picolog Player" and view the readings with no problem.
As I am going to be passed a PLW file daily I wanted to develop a more automatic method of extracting the data directly - eventually to import into a SQL database.
I can open the file in VBA, read the contents one character at a time and display then on a worksheet, but it would appear that the file is a combination of 8-bit ASCII characters with multi byte numeric values embedded in it. I have managed to combine the values, from what looks like the relevant section of the file, I cannot get a floating point value that matches what shows in "Picolog Player" spreadsheet view.
Has anyone managed to achieve this, or alternatively have details on the exact format of the file?
JonBear
Newbie
 
Posts: 0
Joined: Wed Feb 07, 2018 12:03 pm

Re: VBA to Read data from Picolog PLW file

Postby Hitesh » Wed Feb 07, 2018 5:00 pm

Hi JonBear,

You may wish to take a look at this post for reference.

Another option might be to convert the files to csv using the PLW to CSV file converter on our [url=PicoLog: PLW to CSV file converter]PicoApps[/url] page and then process them to add to the SQL database.

Hope this helps,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2581
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: VBA to Read data from Picolog PLW file

Postby JonBear » Thu Feb 08, 2018 10:55 am

Hi Hitesh,
Thank you for replying.
I have looked again at the 'PLW Recorder' and see that 'PLW' is the only output format.
There is a 'CSV' option on the Player, but I was hoping for my routine to not require any manual input. I wanted Excel to open the 'PLW' file, get the temperature values and TC-08 serial number, format the output then 'BULK INSERT' them into an existing SQL database.
I have already written my own software to take readings from a TC-08, which imports fine from a CSV output on site here. The problem is that this external supplier wants to use the Pico software supplied.
JonBear
Newbie
 
Posts: 0
Joined: Wed Feb 07, 2018 12:03 pm

Re: VBA to Read data from Picolog PLW file

Postby Hitesh » Fri Feb 09, 2018 9:21 am

Hi JonBear,

The PicoLog 5 software supports Microsoft Dynamic Data Exchange (DDE). If this is of interest, I can provide an example Excel file if you could please e-mail support@picotech.com

Regards,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2581
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire


Return to VB and VBA (Excel, Access)

Who is online

Users browsing this forum: No registered users and 0 guests