Acquire angular position data using an incremental rotary encoder and a multifunction data acquisition (DAQ) device with the Data Acquisition Toolbox quadrature encoder measurement
Acquire and display data from an accelerometer attached to a vehicle driven under uneven road conditions.
Acquire analog input data using non-blocking commands. This allows you to continue working in the MATLAB command window during the acquisition. This is called background acquisition. Use
Acquire bridge circuit voltage ratio data, then compute and plot strain values.
MATLAB® is able to communicate with instruments and devices at the protocol layer as well as the physical layer. This example uses the I2C feature of the Instrument Control Toolbox to
Acquire and display sound pressure data from a PCB® IEPE array microphone, Model 130E20. The sensor is recording sound pressure generated by a tuning fork at Middle C (261.626 Hz) frequency.
Measure frequency to determine rate of flow of fluid using a flow sensor. The sensor generates a digital signal with frequency correlates to the rate of flow of fluid.
Discover devices visible to MATLAB® and get information about channel and measurement types available in those devices.
Acquire data from a National Instruments device available to MATLAB® from the command line using the Session based interface.
Will show you how to synchronously generate and acquire voltage data (at a rate of 300 KHz). You will use the session-based interface with Digilent Analog Discovery hardware.
Measure the width of an active high pulse. A sensor is used to measure distance from a point. The width of the pulse correlates to the actual distance measured.
Set up a continuous audio acquisition. This example uses a two-channel microphone.
Determine the rate of rotation of an Anaheim Automation motor controller by counting the number of rising edges in the signal. The controller returns hall effect pulses (square waves) that
Use the function generator to generate an arbitrary waveform function at a rate of 1 KHz and record data at the same time, using an analog input channel. The output voltage-range of the
Read in data from thermocouples using NI devices that support thermocouple measurements using the Session based interface.
Use the function generator channel to generate an 1 KHz sinusoidal waveform function and record data at the same time, using analog inputs. The output voltage-range of the outgoing signal is
Generate signals on an analog output current channel for a NI device capable of current output using the Session based interface.
Generate analog output data using non-blocking commands. This allows you to continue working in the MATLAB command window during the generation. This is called background generation. Use
Generate data using a National Instruments device available to MATLAB® using the Session based interface.
how to acquire temperature data from a Resistive temperature device (RTD) and display the readings. The device is attached inside a PC case to monitor the internal temperature changes.
Save data acquired in the background to a file. Use the session-based interface and acquires analog input data using non-blocking commands. If you are using the legacy interface, refer to
Set up a continuous audio generation. This example uses, but does not require, a 5.1 channel sound system.
Demonstrates the use of a Bitalino to acquire data into MATLAB and to process the raw ADC data to measure heart rate and to visualize some ECG measurements.
KPIB is a framework for operating laboratory instruments that are connected to a computer by GPIB or serial port connections. KPIB provides a unified interface for communicating with
Reads the value from the specified analog pin. Returns analog pins state as a n x 2 array, representing KEY-VALUE pairs of digital pins. The Engduino board contains a 5 channel 10-bit analog to
This example shows how to generate code from packData and unpackData
Writes an analog value (PWM wave) to a pin. Can be used to light a LED at varying brightnesses or drive a motor at various speeds. After a call to analogWrite(), the pin will generate a steady
How the Sphero Connectivity Package can be used to connect to a Sphero device and perform basic operations on the hardware, such as change the LED color, calibrate the orientation of the robot
Write a HIGH or a LOW value to a digital pin. If the pin has been configured as an OUTPUT with pinMode(), its voltage will be set to the corresponding value: 5V (or 3.3V on 3.3V boards) for HIGH, 0V
Sphero is not listed under available devices when creating the sphero object, or the following error is received:
Pack and unpack data using the provided packData and unpackData functions
Description: This example shows Engduino 'analogRead' function call. Function returns values of the analog pin.
Configures the specified pin to behave either as an input or an output. See the description of digital pins for details on the functionality of the pins. It is possible to enable the internal
Import Java robot for keyboard control. This Java class is not officially supported by Matlab. Please refer to Java website for more information on this class
Description: This example shows calibration of Engduino's magnetometer. Because the measured magnetic field is a combination of both the earth's magnetic field and any magnetic field
Reads the value from the specified digital pin. Returns digital pins state as a n x 2 array, representing KEY-VALUE pairs of digital pins.
Description: This example shows Engduino Sensors 'getAccelerometer' function call. Function returns acceleration in [x,y,z] directions. Unit is [G=10m/s^2]
Description: This example shows how to turn on and off an LED using the setLedsOne function call. The function requires first parameter as an integer indication the position of LED and the
Use OPC Toolbox™ synchronous read and write operations to exchange data with an OPC server.
Configure and execute a logging session, and how to retrieve data from that logging session.
Use callbacks to monitor an OPC Data Access logging task.
Show you how to use a custom callback for the OPC Toolbox™ to plot data acquired during a logging task.
Use OPC Toolbox™ to browse the network for OPC servers, and query the server name space for server items and their properties.
The basic steps involved in using OPC Toolbox™ to acquire data from an OPC Server.
Install a simulated OPC Server for use with the OPC Toolbox examples.
Use the OPC Toolbox™ to browse the network for OPC Historical Data Access servers, and use OPC Toolbox functions to query the server name space for server items and their properties.
Acquire data from an OPC Historical Data Access (HDA) server.
Exchange data between Simulink and OPC Data Access servers.
Model uses data from an OPC server to test composition control of a binary distillation column model.
Find OPC Unified Automation (UA) servers, connect to them, and browse their namespace to find nodes of interest.
Read historical data from an OPC UA server. Specifically, this example reads data from the OPC Foundation Quickstart Historical Access Server.
Use CAN channels to transmit and receive CAN messages. It uses MathWorks Virtual CAN channels connected in a loopback configuration.
Create, receive and process messages using information stored in CAN database files. This example uses the CAN database file, demoVNT_CANdbFiles.dbc.
Use XCP connections to create and use dynamic data acquisition lists. It uses a freely available XCP slave simulator from Vector and Vector Virtual CAN channels. It is also recommended to run
Use XCP connections to directly acquire measurement values from a slave. It uses a freely available XCP slave simulator from Vector and Vector Virtual CAN channels. It is also recommended to
Use the automated CAN message transmit features of Vehicle Network Toolbox™ to send messages on event. It uses MathWorks Virtual CAN channels connected in a loopback configuration. As this
Use Vehicle Network Toolbox™ with J1939 to create and manage J1939 parameter groups using information stored in CAN database files. This example uses the CAN database file, J1939.dbc.
Configure and use a callback function to receive and process messages received from a CAN channel. It uses MathWorks Virtual CAN channels connected in a loopback configuration.
Use Vehicle Network Toolbox™ with J1939 to create and use J1939 channels to transmit and receive parameter groups on a network. This example uses the CAN database file, J1939.dbc. It also
Use CAN message filters to allow only messages that contain specified identifiers to pass through a channel. It uses MathWorks Virtual CAN channels connected in a loopback configuration.
Access information stored in A2L files for use with XCP connections. It uses a freely available XCP slave simulator from Vector and Vector Virtual CAN channels.
Use Vehicle Network Toolbox™ with the InitialTimestamp CAN channel property to work with relative and absolute timestamps for CAN messages. It also uses MathWorks Virtual CAN channels
Use the automated CAN message transmit features of Vehicle Network Toolbox™ to send periodic messages. It uses MathWorks Virtual CAN channels connected in a loopback configuration. As
Log and replay CAN messages using MathWorks Virtual CAN channels in Simulink®. You can update this model to connect to supported hardware on your system.
Uses MathWorks Virtual CAN channels to set up periodic transmit and reception of CAN messages, using Simulink®. The Virtual channels are connected in a loopback configuration.
Use J1939 blocks to directly send and receive Parameter Group (PG) messages in Simulink®.
Use XCP blocks to directly acquire measurement values from a slave in Simulink®. It uses an XCP slave simulator available for free download from Vector, and Vector Virtual CAN channels.