Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

LabJack Software

Running the Software

python main.py

Installation

LJM Installation

  1. Download the LabJack LJM Software Installer for your OS.
  2. Run the installer

Refer to the LabJack LJM Install Instruction if you run into issues.

Python Installation

pip install labjack-ljm
pip install keyboard
pip install pyserial # Not required for LJ but may be for SoarProto

Usage Notes

Main Menu

   ________  ___   ___
  / __/ __ \/ _ | / _ \
 _\ \/ /_/ / __ |/ , _/
/___/\____/_/ |_/_/|_|

———— LabJack Info ————
  Device Type : T7
  Serial Number: 470032333
  Connection Type: USB

———— TVC Test Stand ————
  [1] Start Data Capture (Stream Mode)
  [2] Start Data Capture (Command-Response Mode)
  [3] Configure Load Cells
  [4] Configure Distances
  [5] Change Capture Rate
  [6] Show Calibration
  [7] Open Captures Directory
  [8] Show CSV File Plot (Not Implemented)
  [0] Exit
Enter your choice:
  • Shows the connected LabJack device
  • [1] Starts data capture in stream mode (fastest, asynchronous mode)
  • [2] Starts data capture in Command-Response mode (slower, asynchronous mode but commanded by the computer)
  • [3] Configure Load Cells menu, has prompt system for calibration
  • [4] Configure Distances menu, allows changing variable parameters used in the force calculation
  • [5] Change data capture rate
  • [6] Shows current calibration data
  • [7] Opens the captures directory in system explorer
  • [8] (Todo) Plots a provided capture file

Data Capture

	 ——— Test Stand Data Capture  ———


Current readings:
timestamp : 13500.00 ms
Fx : -3.96 N
Fy : -4.10 N
Fz : -4.02 N
Mx : -3.96 Nm
My : -4.10 Nm
Mz : -4.12 Nm

Press 'q' to stop capture...
Read 28: backlog = 0, LJM backlog = 8
  • Shows current readings, the display function refreshes based on Configuration.py's DATA_CAPTURE_REFRESH_DELAY variable which is set to every 1/3rd of a second by default. Stream-mode is limited to 500ms display refreshes, but command-repsonse mode will refresh at the rate that is set.
  • On Windows 'q' allows stopping capture, functionality on other OSes are dependant on permissions
  • In stream-mode specifically there will be readings such as Read 28: backlog = 0, LJM backlog = 8 that appear. The Read # is the current read of the system (number of pushes to the system) and should be roughly every 500ms.
  • Because stream-mode is LabJack dictated the refresh of the display may not be at perfect intervals.
  • It may be a good idea to compare readings between stream mode and Command-Response mode to ensure values are being processed correctly.

Calibration and Load Cell Configuration

——— Load Cell Calibration Data ———
LOAD_CELL_X channel AIN0 is not calibrated!
LOAD_CELL_Y channel AIN1 is not calibrated!
LOAD_CELL_Z channel AIN2 is not calibrated!
LOAD_CELL_T channel AIN3 is not calibrated!

——— Current Readings ———
LC_X: 10.106348991394043 N
LC_Y: 10.106348991394043 N
LC_Z: 10.106348991394043 N
LC_T: 10.106348991394043 Nm

——— Calibration Menu ———
  [1] Calibrate Load Cell X
  [2] Calibrate Load Cell Y
  [3] Calibrate Load Cell Z
  [4] Calibrate Load Cell T
  [0] Exit
  • Shows current calibration if it is calibrated
  • Shows the current force reading based on the current calibration (default calibration is y = x) and refreshes every second
  • Select the load cell using the number key and pressing enter to calibrate that load cell
Calibrating load cell on channel: AIN0
Please remove all weight from the load cell.
Press Enter when ready...
Please place a known weight on the load cell.
Enter the weight in kg: 123
Error: No differential voltage detected. Calibration failed.
  • The menu will prompt through the calibration stages

  • First is to remove all weight to get a zero

  • Second is to add a known weight and entering that weight

  • The system will check if the slope is possible, if the voltage difference was 0 then it will reject the calibration

  • All calibration values are stored in calibration.json

Set Distance

——— Current Readings ———
Fx: 10.106348991394043 N
Fy: 10.106348991394043 N
Fz: 10.106348991394043 N
Mx: 10.106348991394043 Nm
My: 10.106348991394043 Nm
Mz: 10.106348991394043 Nm

——— Variable Set Menu ———
  [1] Set z1
  [2] Set z2
  [3] Set x1
  [0] Exit
  • The set distance scren will show the current force readings and updates every second
  • Select the variable to set with the respective number key and pressing enter
Enter z1: 123
z1 set to:  123.0
Press Enter to continue...
Enter your choice:

——— Current Readings ———
Fx: 1243.0809259414673 N
Fy: 1243.0809259414673 N
Fz: 10.106348991394043 N
Mx: 1243.0809259414673 Nm
My: 1243.0809259414673 Nm
Mz: 10.106348991394043 Nm

——— Variable Set Menu ———
  [1] Set z1
  [2] Set z2
  [3] Set x1
  [0] Exit

 Enter your choice:
  • Setting the variable will immedietly update the force calculation
  • Distance settings are stored in config_stand.json

Change Data Capture Rate

Enter the capture rate (Hz):
  • Prompts for the capture rate in Hz
  • Note that in command-response mode rates are unlikely to go above 1000Hz, but the program will attempt to sample as fast as possible
  • Stream-mode capture rate will be limited based on the LabJack's maximum sample rate which can be found in the datasheet page A-1 Data Rates