Lost Excel device connection / example files

Post any questions you may have about our current range of USB data loggers
Post Reply
slb_000

Lost Excel device connection / example files

Post by slb_000 »

We have been using a humidiprobe logger, read through Excel VBA for a number of years with no problems. (On an old PC in Windows 2000). Suddenly today, and possibly following an unintended switching off last week, Excel cannot find the link to PLW, and hence no data. We have tried reinstalling picolog etc. (using the latest win 2k version), and have so far had no luck restoring this.

Looking at the help files though it appears that you can now call the humidiprobe directly from Excel, rather than through PLW. The help files refer to example files as well, however these have not been installed with the software - can you provide a link to these directly please, as if re-writing the code, I would prefer to have a good example to work from.

Thanks,

Simon Bubb / 3T RPD Ltd.

slb_000

Re: Lost Excel device connection / example files

Post by slb_000 »

Just to note that I have solved this problem - the Excel link seems to require Picolog to be both running, and setup and logging, at which point it works correctly.

Simon

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Re: Lost Excel device connection / example files

Post by ziko »

Hi Simon,

This is a DDE (dynamic data exchange) functionality, which allows data from Picolog recorder to be fed into excel.

The other way of getting data from he device in excel is to use the VBA code, using this method Picolog recorder cannot be running as only one device can run the device. We have some programming examples avaialble on our software download page.

Kind regards
Ziko

Technical Specialist

john.hestia
Newbie
Posts: 0
Joined: Wed Nov 09, 2011 11:53 am

Re: Lost Excel device connection / example files

Post by john.hestia »

Hi Ziko,

Can you please give us the link of sample excel vba code? Or this is the same with the HRDL.xls sample? But if you have another examples of excel vba code for ADC20, please give us the download link.

Thank you and Regards,
John

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Lost Excel device connection / example files

Post by Martyn »

The file you need is hrdl.xls located in the sdk which can be downloaded from

http://www.picotech.com/software.html
Martyn
Technical Support Manager

john.hestia
Newbie
Posts: 0
Joined: Wed Nov 09, 2011 11:53 am

Re: Lost Excel device connection / example files

Post by john.hestia »

Hi Martyn,

I had the hrdl.xls already, and it's only taking the data of HRDLGetTimesAndValues. How about another example for the other functions?

Thank you and Regards,
John

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Lost Excel device connection / example files

Post by Martyn »

We don't have any additional code but the hrdl.xls example, together with the programmer's guide, should give sufficient information to be able to change it to meet your needs.
Martyn
Technical Support Manager

john.hestia
Newbie
Posts: 0
Joined: Wed Nov 09, 2011 11:53 am

Re: Lost Excel device connection / example files

Post by john.hestia »

Hi Martyn,

Ok that is fine, I will read it again the programmers guide...

My other question is, what is the value of "value"? I mean what kind of value, is that a decimal only, binary, milivolts, or other? Like on HRDL.xls when I run the macro

Function adc2mV(value As Long) As Long
adc2mV = value * 2500000# / 8388608
End Function

it gives these:

Time Channel 1 Channel 3
us uV uV

0 3750 3786
121 3822 3859
242 3895 3931
363 3967 4003
484 4039 4075

I did not understand how it multiplies the "value"? Can you please give me an example how it computes to get those values in Channel 1 and 3. And what is "uV"?

I sorry for my questions, I know I'm stupid on this kind of stuff...

Thank you and Regards,
John

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Lost Excel device connection / example files

Post by Martyn »

The ADC20/24 A/D will covert the analogue voltage into a digital value. With 24 bits there are 2^24 discrete values that can be returned ie 1677721. Since we are looking at +/- voltages this means that all values will be between +/-8388607

2500000 represents the maximum voltage that can be read in microVolts, which is divided by 8388608 to give the scaling factor to apply to each value from the A/D. So the value you see in the table is the value returned by the device multiplied by the scaling factor to give a result in microVolts.

The misleading part is the use of the name adc2mV which should really be adc2uV, ie take the adc count and convert it to microVolts.
Martyn
Technical Support Manager

john.hestia
Newbie
Posts: 0
Joined: Wed Nov 09, 2011 11:53 am

Re: Lost Excel device connection / example files

Post by john.hestia »

Thank you very much Martyn!
Now are clear to me!


Regards,
John

Post Reply