Index
=====

1. microCOR Lab MATLAB Module
2. Troubleshooting
3. Technical Specifications



1. microCOR Lab MATLAB Module
=============================

micorCORLab MATLAB Module (mcl) gives you control and ability of data
acquisition on MATLAB environment.

To use module, you must change MATLAB working directory to
<install path>/lib/<platform>. E.g. If you installed in to the
C:\microCORLab\ and your platform is 32 bit Windows, then enter following
command to the MATLAB:

    >> cd C:\microCORLab\lib\win32

Now, you can use 'mcl' module.

You can get full list of commands with 'mcl help'.

Here is the basic usage of the module :

    >> mcl info             % Prints module information and states.
    >> mcl init             % Initialize the module.
    >> mcl isinitted        % Check if module initialized successfuly.
    >> mcl reference ekg    % Set hardware reference mode to ekg.
    >>
    >> % Plug the USB device, and open the terminal device.
    >>
    >> mcl disable 2        % Disable channel 2 (Channels starts at 0).
    >> mcl disable 0        % Disable channel 0 (Channels starts at 0).
    >>
    >> mcl time off         % Disable time column.
    >>
    >> mcl info             % Library info string.
    >> mcl state            % State struct to be able to check programmatıcally.
    >>
    >> % if terminal is connected successfuly continue,
    >> % else you will not be able to start.
    >>
    >> mcl start            % Start data acquirement.
    >> mcl stop             % Stop data acquirement.
    >>
    >> % Data is stored in the module.
    >>
    >> mcl data             % Transfer data from module to MATLAB.
    >> plot(ans)            % Use Plot Tools to view columns one by one.
    >>
    >> mcl shutdown on      % Set terminal shutdown after module close.
    >> mcl free             % Free allocated resources. This closes module.

The data matrix have these columns;
    * Sequence
    * Time (optional)
    * Trigger (optional)
    * I (optional)
    * II (optional)
    * III (optional)
    * aVR (optional)
    * aVL (optional)
    * aVF (optional)
    * V1 (optional)
    * V2 (optional)
    * V3 (optional)
    * V4 (optional)
    * V5 (optional)
    * V6 (optional)

If the reference was default, the columns should be;
    * Sequence
    * Time (optional)
    * Trigger (optional)
    * Channel 0 (optional)
    * Channel 1 (optional)
    * Channel 2 (optional)
    * Channel 3 (optional)
    * Channel 4 (optional)
    * Channel 5 (optional)
    * Channel 6 (optional)
    * Channel 7 (optional)

Note : There is a helper function to convert double time to formatted string.
       For example you can convert one double with; mcl('time2string', ans(1,2))
       and you can convert time column with mcl('time2string', ans(:,2)).

Note : You can have only one software to connect USB device. If you run the
       other microCOR applications, you can't initialize the module with
       'mcl init'.

Note : Prebuild Windows modules compiled with Microsoft Visual Studio 2010 and
       MATLAB R2014a.



2. Troubleshooting
==================

Problem : 'mcl info' command does not working after changed the working
directory.

Solution : This release contains precompiled modules. If 'mcl info' command does
not work for your MATLAB environment, download the microCOR Lab SDK and build
MATLAB module for your environment. See src/BUILD*.txt files.



3. Technical Specifications
===========================

You can find technical specifications at SPECS.txt files.


