I'm using an ADC-20 to log data from a circuit to measure the resistance of a coil of wire. The Pico software is working fine, but what I really need is to export the data from the logger software directly into Excel in real-time. I can then set up a template sheet in Excel with input columns and graphs to automatically deal with the data and do what I want with it, which is draw graphs, use moving averages and create alarms depending on differences between two sets of moving averages (I'm comparing the coil resistance over a moving average of 30 samples to a moving average of 3 samples, and if the difference between the two values is above a set threshold then it triggers an alarm).
Having had a look through the help files I found the input to the cell to collect some data from the software, =PLW|Current!Value (and !Units and !Name), and this seems to work to an extent but this only takes data from the first input channel and I can't work out how to make Excel read the data values from the other input channels. I have 4 input channels, and from these values a host of other calculated parameters.
Now I am probably missing something very obvious but I don't have a vast knowledge of programming so I apologise if the answer is an obvious one!
I want to use the DDE doc you attached but I want to import the recording time also (in my case it is seconds). I get a data type mismatch in VB when I add:
returndata = DDERequest(chan, "Time")
For i = LBound(returndata) To UBound(returndata)
Worksheets("Sheet1").Cells(i + 3, 4).Value = returndata(LBound(returndata) + i - 1, 1)
Next i
Can you tell me what this needs to be so I can get the time a data point is collected at (I want the time according to PL not VB)? Note I'm recording to the TC-08 and to excel simultaneously and I want to synchronize the times.
Unfortunately, the PicoLog software currently does not transfer the time information via DDE.
If you are needing timing information transferred directly to Excel along with the voltage data, have you looked at the Excel example? With this example you control the unit from Excel and do not use PicoLog. You would be able to get all your information this way. In your Pico Technology folder on your computer there is a Examples folder under Pico Full. Here you will find a HRDL.xls file which will show you how to do this...
If you have any questions on how to use the file feel free to ask here...
Wow, I'm discussing complex code above and you refer me to your VB example...
Anyways... yeah I'm using a macro based timer but unfortunately the macro I use takes a different amount of time to run based on how much data was already imported and filtered.
Also you guys really need to make an option to turn off the minimize to tray function you guys use in the pico log software. I can find no way to make an AHK GUI not-allow the click on the minimize button nor restore that program from its icon tray location.
Is there any VB code to stop the PL recorder and close the pico log software entirely? Everything I've tried so far closes the software but the light keeps flashing on the unit and when I restart PL it errors off. I have to unplug and replug the unit to get it to work again.