Test and Measurement Forum

TC-08 serial with Matlab

Post your MATLAB discussions here

TC-08 serial with Matlab

Postby farmar » Fri Dec 10, 2010 3:40 pm

Hi,
in this post, topic1909.html , there is a nice example of how to connectUSB TC08 with matlab. However I have an old serial TC08 which I need to connect to Matlab.
I have have created the code similarly to how I did with the TH03 datalogger (which worked fine), however the new code does not seem to open the COM Port.
Library loads fine, however the library call to function tc08_open_port always returns 0.
Thanks in advance for any help

Mario


P.S. Unit works fine with picolog software, so there should not be any cable issues.
-----------------------------------
here is my code:

----------------------------------
COM1 = int16(1);
%%Load the Library

if ~libisloaded('tc0832')
loadlibrary('tc0832', @tc0832proto);
disp('Datalogger Library opened');
end

retcode = calllib('tc0832', 'tc08_open_unit', COM1);
% open the driver on COM1

if (retcode == 1)
disp('Unit opened!')
else
disp('Unit failed to open!')
end
-----------------------------
farmar
Newbie
 
Posts: 0
Joined: Thu Dec 09, 2010 3:52 pm

Re: TC-08 serial with Matlab

Postby farmar » Mon Dec 13, 2010 4:14 pm

The code works on my office PC running windows 7 (however it also works on a collegue's PC running win XP).

trying to connect it via hyperterminal, nothing.

any help please?
farmar
Newbie
 
Posts: 0
Joined: Thu Dec 09, 2010 3:52 pm


Return to MATLAB

Who is online

Users browsing this forum: No registered users and 0 guests