recruting data from PicoLog 1216

Post your MATLAB discussions here
Post Reply
Posts: 0
Joined: Thu Sep 13, 2012 7:10 pm

recruting data from PicoLog 1216

Post by botond » Sat Sep 15, 2012 6:37 pm

Hi,I'm trying to establish contact between Matlab and the DataLoggerPico Log 1216.
This is my Code:

clear all;close all;clc
loadlibrary 'C:\Users\Szabolcs\Documents\Pico\PL1000.dll' 'C:\Users\Szabolcs\Documents\Pico\pl1000Api.h' addheader 'C:\Users\Szabolcs\Documents\Pico\picoStatus.h';
hand = libpointer('int16Ptr',0);
[status_open, hand] = calllib('PL1000', 'pl1000OpenUnit', hand);

I get the following Messages:
Warning: The data type 'error' used by function pl1000OpenUnit does not exist.
> In loadlibrary at 458

My problem is,that I didn't know if I establish the contact with the data logger, respectively if I recive the righ handle,which identifies my Data Logger.

Site Admin
Site Admin
Posts: 2829
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: recruting data from PicoLog 1216

Post by Hitesh » Mon Sep 17, 2012 2:23 pm

Hi Botond,

I provided a response about the 'error' datatype in the following forum topic where you had last posted:

You need to make sure that picoStatus.h is referred to in the pl1000Api.h file.

Try checking the value of hand

Code: Select all

handle = get(hand, 'Value');
With MATLAB it's not necessary in certain cases to define values that are passed as pointers as a libpointer as it takes care of data type conversion. E.g.

Code: Select all

handle = 0
[status_open, handle] = calllib('PL1000', 'pl1000OpenUnit', handle)

Also, you can remove the ';' at the end of the line for debug purposes to view the values being returned.

Hope this helps.

Technical Support Engineer

Post Reply