Matlab and Serial TC-08

Post general discussions on using our drivers to write your own software here
Post Reply
RichB19
Newbie
Posts: 1
Joined: Wed Nov 02, 2005 1:38 pm

Matlab and Serial TC-08

Post by RichB19 »

Hi All,
I'm trying to get the pico TC-08 logger to function in MATLAB. Currently this code runs displaying ans=1 (true) for opening the port when set to the correct com port (4 for this system). It also finds when the logger is ready to send a value when xobj==1. However xp does not change value and so no value for the temperaure is given xp and x are always value 3 as originally set.

I hope this starts some people along programming for this piece of wquipment in matlab and if anyone knows anyway to get these tempvalues please post in this forum.


function []=tco8()
loadlibrary('c:\pico\drivers\win32\tc0832.dll','c:\pico\drivers\win32\tc08.h')
port=4;
calllib('tc0832','tc08_close_unit',port)
calllib('tc0832','tc08_open_unit',port)
calllib('tc0832','tc08_set_channel',port,8,75,10,0,0) %75 equates to 'K'
x=3;
xp = libpointer('voidPtr',x);
for i=1:100;
[xobj, xval] = calllib('tc0832','tc08_get_temp',xp,port,8,0);
if xobj==1
get(xp)
end
pause(0.0001)
end
calllib('tc0832','tc08_close_unit',port)


Cheers

Rich B

Paul76
User
User
Posts: 3
Joined: Thu May 11, 2006 1:36 pm
Location: Switzerland

Post by Paul76 »

Hi,

Has anyone got a program in the meanwhile that can get the temperature out of the datalogger in Matlab?
Would be nice if you could post it here...

Paul

Sarah

Post by Sarah »

Hi Paul

Unfortunately we do not have any MatLab examples for the TC-08, we only have an ADC-2xx example which was written by a customer.

There may be someone else who can help though.

Best Regards

Post Reply