Skip to main content
Skip table of contents

Simulink

The engineering team at JTEC Energy has developed slx_LJM, a MATLAB/Simulink
toolbox to allow easy integration of LabJack’s data acquisition and signal generation
capabilities into easy-to-build Simulink models. This toolbox takes advantage of
Simulink’s drag-and-drop graphical programming environment to enable rapid
configuration of models, especially for non-programmers. slx_LJM automatically takes
care of all the housekeeping associated with setting up a LabJack – connecting to the
device, configuring inputs and outputs, etc. – so that engineers can focus on collecting
data quickly. It also has very low supporting hardware and software requirements – it
runs in a normal Simulink model (not real-time) and does not require any expensive
specialized toolkits or computer platforms to work.

The core concept of the toolbox is that you start by adding a block (technically a
masked subsystem) that represents your LabJack, which takes care of connection to
your LabJack, and configuration of that LabJack for operation. Then for every function
you want your LabJack to perform, you add specialized blocks inside that LabJack
“block” with ports connecting out to the rest of your model. Simulink can be set up to run
at a certain pace, which allows you to control the rate of your data acquisition. Details
on how to set this up, along with an example model, can be found in the library’s help
documentation.


Example: Let's say you want to turn on an LED when an analog voltage exceeds a
certain level. You would first add a LabJack T7 masked subsystem to your model. Inside
of that subsystem, you would add an Analog Input block and a Digital Output block and
configure them to read/write to the correct ports. You would then connect the inputs and
outputs of these blocks to appropriate logic elsewhere in your Simulink model to
perform the level comparison.

  • Talk to T4 and T7 devices

    • Has not been tested with a T8 but several of the features would probably still work

  • Control multiple LabJacks simultaneously

    • 6 simultaneously connected devices have been consistently operated without issues

  • Analog inputs:

    • Basic analog in, including differential measurement

    • Current measurement through LJTickCurrentShunt

    • RTD read

    • Thermistor read

    • Thermocouple read

  • Analog outputs:

    • DACWrite through DAC0 and DAC1 ports

  • Digital inputs:

    • Digital input read

    • Frequency Read

  • Digital outputs:

    • Digital output write

    • DAC write through LJTickDAC

    • PWM write

    • Heartbeat

      • A custom digital output function that turns output on and off manually from Simulink, enabling you to detect if Simulink has crashed

  • An example model showing how to use the slx_LJM toolbox to collect data

    • Model includes automatic dataset generation scripts that will save the collected data to a .csv and .mat file automatically when a simulation is stopped.

Former NASA scientist and Super Soaker inventor Dr. Lonnie Johnson invented the
Johnson Thermo-Electrochemical Converter (JTEC), a hydrogen-based heat engine
that transforms waste heat into energy more efficiently than any device in history. Led
by Mike McQuary, and with over 45 patents, JTEC captures both waste heat and
geothermal heat for power generation. For more information about JTEC Energy, visit
the company website at http://jtecenergy.com .

Figure 1 : LabJack Subsystem and Saving Data Block

Figure 2 : Configuration of LabJack ports's Different Ports (underneath LabJack subsystem)

Figure 3 : Two of the LabJacks implemented on JTEC's laboratory test bench systemflagship system

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.