Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neuro-mechatronics-interfaces/matlab_package__intan
Should be initialized as MATLAB package with name `+intan`
https://github.com/neuro-mechatronics-interfaces/matlab_package__intan
Last synced: 12 days ago
JSON representation
Should be initialized as MATLAB package with name `+intan`
- Host: GitHub
- URL: https://github.com/neuro-mechatronics-interfaces/matlab_package__intan
- Owner: Neuro-Mechatronics-Interfaces
- Created: 2024-05-05T21:37:09.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-12-09T13:40:14.000Z (about 1 month ago)
- Last Synced: 2024-12-09T14:39:28.083Z (about 1 month ago)
- Language: MATLAB
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# +intan #
Should be initialized as MATLAB package with name `+intan`.This repo contains code for running the Intan RHX interface via TCP.
## Installation ##
```(bash)
git submodule add [email protected]:Neuro-Mechatronics-Interfaces/matlab_package__intan.git +intan
```## Contents ##
The `+intan` package includes the following functions:* [`char5ReadFromArray`](char5ReadFromArray.m): Reads 5-character arrays from data streams.
* [`computeBytesPerBlock`](computeBytesPerBlock.m): Calculates the number of bytes per data block.
* [`createLineCopy`](createLineCopy.m): Duplicates line objects for plotting.
* [`enableAudio`](enableAudio.m): Activates audio channels.
* [`enableDigIn`](enableDigIn.m): Enables digital input channels.
* [`enablePortChannelBatch`](enablePortChannelBatch.m): Batch enables port channels.
* [`handleIndexUpdatingCallback`](handleIndexUpdatingCallback.m): Manages index update callbacks.
* [`handleWaveformBytesCallback`](handleWaveformBytesCallback.m): Processes waveform byte callbacks.
* [`initWaveformBytesGraphicsHandles`](initWaveformBytesGraphicsHandles.m): Initializes graphics handles for waveform bytes.
* [`int32ReadFromArray`](int32ReadFromArray.m): Reads 32-bit integers from data arrays.
* [`readWaveformByteBlock`](readWaveformByteBlock.m): Reads blocks of waveform bytes.
* [`resetTriggerAxes`](resetTriggerAxes.m): Resets axes for trigger plots.
* [`setAnalogTCP`](setAnalogTCP.m): Configures analog settings via TCP.
* [`setChannelTCP`](setChannelTCP.m): Sets channel parameters via TCP.
* [`setDigitalTCP`](setDigitalTCP.m): Configures digital settings via TCP.
* [`setFile`](setFile.m): Specifies file settings.
* [`setFileSavePeriod`](setFileSavePeriod.m): Sets the file save interval.
* [`startRecording`](startRecording.m): Initiates data recording.
* [`startRunning`](startRunning.m): Starts the system running.
* [`stopRecording`](stopRecording.m): Stops data recording.
* [`stopRunning`](stopRunning.m): Stops the system running.
* [`uint16ReadFromArray`](uint16ReadFromArray.m): Reads 16-bit unsigned integers from data arrays.
* [`uint32ReadFromArray`](uint32ReadFromArray.m): Reads 32-bit unsigned integers from data arrays.
* [`uint8ReadFromArray`](uint8ReadFromArray.m): Reads 8-bit unsigned integers from data arrays.## Usage ##
After adding the +intan package to your MATLAB path, you can utilize its functions to control the Intan RHX interface.
All instructions assume you have already launched `RHX` application and created the corresponding control websocket in the network interface.
For example, to start recording data:```matlab
intanTcpClient = tcpclient("127.0.0.1", 5000); % Control interface
waveformTcpClient = tcpclient("127.0.0.1", 5001); % Waveform interface
intan.setChannelTCP(intanTcpClient, 'a', 1:128, false, true, false, false); % Enables HPF channels 1-128 on port "A".
intan.startRunning(intanTcpClient); % Starts running (not recording) the interface
[data, timestamp] = intan.readWaveformByteBlock(waveformTcpClient, 128, 0, false);
```Refer to the individual function documentation for detailed usage instructions.
## Notes ##
Ensure that your system meets the necessary requirements for TCP/IP communication with the Intan RHX interface. Proper configuration of network settings may be required.For additional resources and related MATLAB packages, visit the [Neuro-Mechatronics Lab's GitHub](https://github.com/Neuro-Mechatronics-Interfaces) page.