- Datasheets
- Accessories
- CB15
- CB25
- CB37 V1.2
- CB37 V2.1
- EB37
- EI-1022
- EI-1034
- EI-1040
- EI-1050
- IDCA-10
- LJTick-CurrentShunt
- LJTick-DAC
- LJTick-DAC Testing Utility
- LJTick-DigitalOut5V
- LJTick-Divider
- LJTick-InAmp
- LJTick-InBuff
- LJTick-LVDigitalIO
- LJTick-OutBuff
- LJTick-Proto
- LJTick-RelayDriver
- LJTick-Resistance
- LJTick-VRef
- Mux80 AIN Expansion Board
- PS12DC
- RB12
- RB16
- T-Series Datasheet
- Preface: Warranty, Liability, Compliance
- 1.0 Device Overview
- 2.0 Installation
- 3.0 Communication
- 4.0 Hardware Overview
- 5.0 USB
- 6.0 Ethernet
- 7.0 WiFi (T7-Pro only)
- 8.0 LEDs
- 9.0 VS, Power Supply
- 10.0 SGND and GND
- 11.0 SPC
- 12.0 200uA and 10uA (T7 Only)
- 13.0 Digital I/O
- 13.1 Flexible I/O (T4 Only)
- 13.2 DIO Extended Features
- 13.2.1 EF Clock Source
- 13.2.2 PWM Out
- 13.2.3 PWM Out with Phase
- 13.2.4 Pulse Out
- 13.2.5 Frequency In
- 13.2.6 Pulse Width In
- 13.2.7 Line-to-Line In
- 13.2.8 High-Speed Counter
- 13.2.9 Interrupt Counter
- 13.2.10 Interrupt Counter with Debounce
- 13.2.11 Quadrature In
- 13.2.12 Interrupt Frequency In
- 13.2.13 Conditional Reset
- 13.3 I2C
- 13.4 SPI
- 13.5 SBUS
- 13.6 1-Wire
- 13.7 Asynchronous Serial
- 14.0 Analog Inputs
- 15.0 DAC
- 16.0 DB37 (T7 Only)
- 17.0 DB15
- 18.0 Internal Temp Sensor
- 19.0 RTC (T7 Only)
- 20.0 Internal Flash
- 21.0 SD Card (T7 Only)
- 22.0 OEM Versions
- 23.0 Watchdog
- 24.0 IO Config, _DEFAULT
- 25.0 Lua Scripting
- Appendix A - Specifications
- Appendix B - Drawings and CAD Models
- Appendix C - Firmware Revision History
- Appendix D - Packaging Information
- Appendix E - Software Options
- U3 Datasheet
- Preface
- 1 - Installation
- 2 - Hardware Description
- 2.1 - USB
- 2.2 - Status LED
- 2.3 - GND and SGND
- 2.4 - VS
- 2.5 - Flexible I/O (FIO/EIO)
- 2.6 - AIN
- 2.6.1 - Channel Numbers
- 2.6.2 - Converting Binary Readings to Voltages
- 2.6.3 - Typical Analog Input Connections
- 2.6.3.1 - Signal from the LabJack
- 2.6.3.2 - Unpowered Isolated Signal
- 2.6.3.3 - Signal Powered By the LabJack
- 2.6.3.4 - Signal Powered Externally
- 2.6.3.5 - Amplifying Small Signal Voltages
- 2.6.3.6 - Signal Voltages Beyond 0-2.44 Volts (and Resistance Measurement)
- 2.6.3.7 - Measuring Current (Including 4-20 mA) with a Resistive Shunt
- 2.6.3.8 - Floating/Unconnected Inputs
- 2.6.3.9 - Signal Voltages Near Ground
- 2.6.4 - Internal Temperature Sensor
- 2.7 - DAC
- 2.8 - Digital I/O
- 2.9 - Timers/Counters
- 2.9.1 - Timer Mode Descriptions
- 2.9.1.1 - PWM Output (16-Bit, Mode 0)
- 2.9.1.2 - PWM Output (8-Bit, Mode 1)
- 2.9.1.3 - Period Measurement (32-Bit, Modes 2 & 3)
- 2.9.1.4 - Duty Cycle Measurement (Mode 4)
- 2.9.1.5 - Firmware Counter Input (Mode 5)
- 2.9.1.6 - Firmware Counter Input With Debounce (Mode 6)
- 2.9.1.7 - Frequency Output (Mode 7)
- 2.9.1.8 - Quadrature Input (Mode 8)
- 2.9.1.9 - Timer Stop Input (Mode 9)
- 2.9.1.10 - System Timer Low/High Read (Modes 10 & 11)
- 2.9.1.11 - Period Measurement (16-Bit, Modes 12 & 13)
- 2.9.1.12 - Line-to-Line Measurement (Mode 14)
- 2.9.2 - Timer Operation/Performance Notes
- 2.9.1 - Timer Mode Descriptions
- 2.10 - SPC (… and SCL/SDA/SCA)
- 2.11 - DB15
- 2.12 - U3-OEM
- 2.13 - Hardware Revision Notes
- 3 - Operation
- 4 - LabJackUD High-Level Driver
- 4.1 - Overview
- 4.2 - Function Reference
- 4.2.1 - ListAll()
- 4.2.2 - OpenLabJack()
- 4.2.3 - eGet() and ePut()
- 4.2.4 - eAddGoGet()
- 4.2.5 - AddRequest()
- 4.2.6 - Go()
- 4.2.7 - GoOne()
- 4.2.8 - GetResult()
- 4.2.9 - GetFirstResult() and GetNextResult()
- 4.2.10 - DoubleToStringAddress()
- 4.2.11 - StringToDoubleAddress()
- 4.2.12 - StringToConstant()
- 4.2.13 - ErrorToString()
- 4.2.14 - GetDriverVersion()
- 4.2.15 - TCVoltsToTemp()
- 4.2.16 - ResetLabJack()
- 4.2.17 - eAIN()
- 4.2.18 - eDAC()
- 4.2.19 - eDI()
- 4.2.20 - eDO()
- 4.2.21 - eTCConfig()
- 4.2.22 - eTCValues()
- 4.3 - Example Pseudocode
- 4.3.1 - Open
- 4.3.2 - Configuration
- 4.3.3 - Analog Inputs
- 4.3.4 - Analog Outputs
- 4.3.5 - Digital I/O
- 4.3.6 - Timers & Counters
- 4.3.7 - Stream Mode
- 4.3.8 - Raw Output/Input
- 4.3.9 - Easy Functions
- 4.3.10 - SPI Serial Communication
- 4.3.11 - I²C Serial Communication
- 4.3.12 - Asynchronous Serial Communication
- 4.3.13 - Watchdog Timer
- 4.3.14 - Miscellaneous
- 4.4 - Errorcodes
- 5 - Low-level Function Reference
- 5.1 - General Protocol
- 5.2 - Low-Level Functions
- 5.2.1 - Bad Checksum
- 5.2.2 - ConfigU3
- 5.2.3 - ConfigIO
- 5.2.4 - ConfigTimerClock
- 5.2.5 - Feedback
- 5.2.5.1 - AIN: IOType = 1
- 5.2.5.2 - WaitShort: IOType=5
- 5.2.5.3 - WaitLong: IOType=6
- 5.2.5.4 - LED: IOType=9
- 5.2.5.5 - BitStateRead: IOType=10
- 5.2.5.6 - BitStateWrite: IOType=11
- 5.2.5.7 - BitDirRead: IOType=12
- 5.2.5.8 - BitDirWrite: IOType=13
- 5.2.5.9 - PortStateRead: IOType=26
- 5.2.5.10 - PortStateWrite: IOType=27
- 5.2.5.11 - PortDirRead: IOType=28
- 5.2.5.12 - PortDirWrite: IOType=29
- 5.2.5.13 - DAC# (8-bit): IOType=34,35
- 5.2.5.14 - DAC# (16-bit): IOType=38,39
- 5.2.5.15 - Timer#: IOType=42,44
- 5.2.5.16 - Timer#Config: IOType=43,45
- 5.2.5.17 - Counter#: IOType=54,55
- 5.2.5.18 - Buzzer: IOType=63
- 5.2.6 - ReadMem (ReadCal)
- 5.2.7 - WriteMem (WriteCal)
- 5.2.8 - EraseMem (EraseCal)
- 5.2.9 - Reset
- 5.2.10 - StreamConfig
- 5.2.11 - StreamStart
- 5.2.12 - StreamData
- 5.2.13 - StreamStop
- 5.2.14 - Watchdog
- 5.2.15 - SPI
- 5.2.16 - AsynchConfig
- 5.2.17 - AsynchTX
- 5.2.18 - AsynchRX
- 5.2.19 - I²C
- 5.2.20 - SHT1X
- 5.2.21 - SetDefaults (SetToFactoryDefaults)
- 5.2.22 - ReadDefaults (ReadCurrent)
- 5.2.23 - 1-Wire
- 5.3 - Errorcodes
- 5.4 - Calibration Constants
- Appendix A - Specifications
- Appendix B - Enclosure and PCB Drawings
- U3 Firmware Revision History
- U6 Datasheet
- Preface: Warranty, Liability, Compliance
- 1 - Installation
- 2 - Hardware Description
- 2.1 - USB
- 2.2 - Power and Status LED
- 2.3 - GND and SGND
- 2.4 - VS
- 2.5 - 10UA and 200UA
- 2.6 - AIN
- 2.6.1 - Channel Numbers
- 2.6.2 - Converting Binary Readings to Voltages
- 2.6.3 - Typical Analog Input Connections
- 2.6.3.1 - Signal from the LabJack
- 2.6.3.2 - Unpowered Isolated Signal
- 2.6.3.3 - Signal Powered By the LabJack
- 2.6.3.4 - Signal Powered Externally
- 2.6.3.5 - Amplifying Small Signal Voltages
- 2.6.3.6 - Signal Voltages Beyond ±10 Volts (and Resistance Measurement)
- 2.6.3.7 - Measuring Current (Including 4-20 mA) with a Resistive Shunt
- 2.6.3.8 - Floating/Unconnected Inputs
- 2.6.4 - Internal Temperature Sensor
- 2.6.5 - Signal Range
- 2.7 - DAC
- 2.8 - Digital I/O
- 2.9 - Timers/Counters
- 2.9.1 - Timer Mode Descriptions
- 2.9.1.1 - PWM Output (16-Bit, Mode 0)
- 2.9.1.2 - PWM Output (8-Bit, Mode 1)
- 2.9.1.3 - Period Measurement (32-Bit, Modes 2 & 3)
- 2.9.1.4 - Duty Cycle Measurement (Mode 4)
- 2.9.1.5 - Firmware Counter Input (Mode 5)
- 2.9.1.6 - Firmware Counter Input With Debounce (Mode 6)
- 2.9.1.7 - Frequency Output (Mode 7)
- 2.9.1.8 - Quadrature Input (Mode 8)
- 2.9.1.9 - Timer Stop Input (Mode 9)
- 2.9.1.10 - System Timer Low/High Read (Modes 10 & 11)
- 2.9.1.11 - Period Measurement (16-Bit, Modes 12 & 13)
- 2.9.1.12 - Line-to-Line Measurement (Mode 14)
- 2.9.2 - Timer Operation/Performance Notes
- 2.9.1 - Timer Mode Descriptions
- 2.10 - SPC (or VSPC)
- 2.11 - DB37
- 2.12 - DB15
- 2.13 - OEM Connector Options
- 3 - Operation
- 4 - LabJackUD High-Level Driver
- 4.1 - Overview
- 4.2 - Function Reference
- 4.2.1 - ListAll()
- 4.2.2 - OpenLabJack()
- 4.2.3 - eGet() and ePut()
- 4.2.4 - eAddGoGet()
- 4.2.5 - AddRequest()
- 4.2.6 - Go()
- 4.2.7 - GoOne()
- 4.2.8 - GetResult()
- 4.2.9 - GetFirstResult() and GetNextResult()
- 4.2.10 - DoubleToStringAddress()
- 4.2.11 - StringToDoubleAddress()
- 4.2.12 - StringToConstant()
- 4.2.13 - ErrorToString()
- 4.2.14 - GetDriverVersion()
- 4.2.15 - TCVoltsToTemp()
- 4.2.16 - ResetLabJack()
- 4.2.17 - eAIN()
- 4.2.18 - eDAC()
- 4.2.19 - eDI()
- 4.2.20 - eDO()
- 4.2.21 - eTCConfig()
- 4.2.22 - eTCValues()
- 4.3 - Example Pseudocode
- 4.3.1 - Open
- 4.3.2 - Configuration
- 4.3.3 - Analog Inputs
- 4.3.4 - Analog Outputs
- 4.3.5 - Digital I/O
- 4.3.6 - Timers & Counters
- 4.3.7 - Stream Mode
- 4.3.8 - Raw Output/Input
- 4.3.9 - Easy Functions
- 4.3.10 - SPI Serial Communication
- 4.3.11 - I²C Serial Communication
- 4.3.12 - Asynchronous Serial Communication
- 4.3.13 - Watchdog Timer
- 4.3.14 - Miscellaneous
- 4.4 - Errorcodes
- 5 - Low-level Function Reference
- 5.1 - General Protocol
- 5.2 - Low-Level Functions
- 5.2.1 - Bad Checksum
- 5.2.2 - ConfigU6
- 5.2.3 - ConfigIO
- 5.2.4 - ConfigTimerClock
- 5.2.5 - Feedback
- 5.2.5.1 - AIN: IOType = 1
- 5.2.5.2 - AIN24: IOType = 2
- 5.2.5.3 - AIN24AR: IOType = 3
- 5.2.5.4 - WaitShort: IOType=5
- 5.2.5.5 - WaitLong: IOType=6
- 5.2.5.6 - LED: IOType=9
- 5.2.5.7 - BitStateRead: IOType=10
- 5.2.5.8 - BitStateWrite: IOType=11
- 5.2.5.9 - BitDirRead: IOType=12
- 5.2.5.10 - BitDirWrite: IOType=13
- 5.2.5.11 - PortStateRead: IOType=26
- 5.2.5.12 - PortStateWrite: IOType=27
- 5.2.5.13 - PortDirRead: IOType=28
- 5.2.5.14 - PortDirWrite: IOType=29
- 5.2.5.15 - DAC# (8-bit): IOType=34,25
- 5.2.5.16 - DAC# (16-bit): IOType=38,39
- 5.2.5.17 - Timer#: IOType=42,44,46,48
- 5.2.5.18 - Timer#Config: IOType = 43, 45, 47, 49
- 5.2.5.19 - Counter#: IOType = 54, 55
- 5.2.6 - ReadMem (ReadCal)
- 5.2.7 - WriteMem (WriteCal)
- 5.2.8 - EraseMem (EraseCal)
- 5.2.9 - SetDefaults (SetToFactoryDefaults)
- 5.2.10 - ReadDefaults (ReadCurrent)
- 5.2.11 - Reset
- 5.2.12 - StreamConfig
- 5.2.13 - StreamStart
- 5.2.14 - StreamData
- 5.2.15 - StreamStop
- 5.2.16 - Watchdog
- 5.2.17 - SPI
- 5.2.18 - AsynchConfig
- 5.2.19 - AsynchTX
- 5.2.20 - AsynchRX
- 5.2.21 - I²C
- 5.2.22 - SHT1X
- 5.2.23 - 1-Wire
- 5.2.24 - StreamAddChannels
- 5.3 - Errorcodes
- 5.4 - Calibration Constants
- Appendix A - Specifications
- Appendix B - Noise and Resolution Tables
- Appendix C - Enclosure and PCB Drawings
- U6 Firmware Revision History
- Digit Datasheet (Discontinued)
- UE9 Datasheet
- Preface
- 1 - Installation
- 2 - Hardware Description
- 2.1 - USB
- 2.2 - Ethernet
- 2.3 - Vext (Screw Terminals and Power Jack)
- 2.4 - Comm and Control LEDs
- 2.5 - GND and SGND
- 2.6 - VS
- 2.7 - AIN
- 2.7.1 - Channel Numbers
- 2.7.2 - Converting Binary Readings to Voltages
- 2.7.3 - Typical Analog Input Connections
- 2.7.3.1 - Signal from the LabJack
- 2.7.3.2 - Unpowered Isolated Signal
- 2.7.3.3 - Signal Powered by the LabJack
- 2.7.3.4 - Signal Powered Externally
- 2.7.3.5 - Amplifying Small Signal Voltages
- 2.7.3.6 - Signal Voltages Beyond ±5 Volts (and Resistance Measurement)
- 2.7.3.7 - Measuring Current (Including 4-20 mA) with a Resistive Shunt
- 2.7.3.8 - Floating/Unconnected Inputs
- 2.7.4 - Internal Temperature Sensor
- 2.8 - DAC
- 2.9 - Digital I/O
- 2.10 - Timers/Counters
- 2.10.1 - Timer Mode Descriptions
- 2.10.1.1 - PWM Output (16-Bit, Mode 0)
- 2.10.1.2 - PWM Output (8-Bit, Mode 1)
- 2.10.1.3 - Period Measurement (32-Bit, Modes 2 & 3)
- 2.10.1.4 - Duty Cycle Measurement (Mode 4)
- 2.10.1.5 - Firmware Counter Input (Mode 5)
- 2.10.1.6 - Firmware Counter Input With Debounce (Mode 6)
- 2.10.1.7 - Frequency Output (Mode 7)
- 2.10.1.8 - Quadrature Input (Mode 8)
- 2.10.1.9 - Timer Stop Input (Mode 9)
- 2.10.1.10 - System Timer Low/High Read (Modes 10 & 11)
- 2.10.1.11 - Period Measurement (16-Bit, Modes 12 & 13)
- 2.10.2 - Timer Operation/Performance Notes
- 2.10.1 - Timer Mode Descriptions
- 2.11 - SCL and SDA (or SCA)
- 2.12 - DB37
- 2.13 - DB15
- 2.14 - OEM Connector Options
- 3 - Operation
- 4 - LabJackUD High-Level Driver
- 4.1 - Overview
- 4.2 - Function Reference
- 4.2.1 - ListAll()
- 4.2.2 - OpenLabJack()
- 4.2.3 - eGet() and ePut()
- 4.2.4 - eAddGoGet()
- 4.2.5 - AddRequest()
- 4.2.6 - Go()
- 4.2.7 - GoOne()
- 4.2.8 - GetResult()
- 4.2.9 - GetFirstResult() and GetNextResult()
- 4.2.10 - DoubleToStringAddress()
- 4.2.11 - StringToDoubleAddress()
- 4.2.12 - StringToConstant()
- 4.2.13 - ErrorToString()
- 4.2.14 - GetDriverVersion()
- 4.2.15 - TCVoltsToTemp()
- 4.2.16 - ResetLabJack()
- 4.2.17 - eAIN()
- 4.2.18 - eDAC()
- 4.2.19 - eDI()
- 4.2.20 - eDO()
- 4.2.21 - eTCConfig()
- 4.2.22 - eTCValues()
- 4.3 - Example Pseudocode
- 4.3.1 - Open
- 4.3.2 - Configuration
- 4.3.3 - Analog Inputs
- 4.3.4 - Analog Outputs
- 4.3.5 - Digital I/O
- 4.3.6 - Timers & Counters
- 4.3.7 - Stream Mode
- 4.3.8 - Raw Output/Input
- 4.3.9 - Easy Functions
- 4.3.10 - SPI Serial Communication
- 4.3.11 - I²C Serial Communication
- 4.3.12 - Asynchronous Serial Communication
- 4.3.13 - Watchdog Timer
- 4.3.14 - Miscellaneous
- 4.4 - Errorcodes
- 5 - Low-level Function Reference
- 5.1 - General Protocol
- 5.2 - Comm Functions
- 5.3 - Control Functions
- 5.3.1 - BadChecksum
- 5.3.2 - ControlConfig
- 5.3.3 - Feedback (and FeedbackAlt)
- 5.3.4 - SingleIO
- 5.3.5 - TimerCounter
- 5.3.6 - StreamConfig
- 5.3.7 - StreamStart
- 5.3.8 - StreamData
- 5.3.9 - StreamStop
- 5.3.10 - ReadMem
- 5.3.11 - WriteMem
- 5.3.12 - EraseMem
- 5.3.13.1 - WatchdogConfig
- 5.3.13.2 - WatchdogRead
- 5.3.13.3 - Extended WatchdogConfig
- 5.3.13.4 - WatchdogClear
- 5.3.15 - Reset
- 5.3.16 - SPI
- 5.3.17 - AsynchConfig
- 5.3.18 - AsynchTX
- 5.3.19 - AsynchRX
- 5.3.20 - I²C
- 5.3.21 - SHT1X
- 5.3.22 - StreamDAC
- 5.3.23 - SetDefaults (SetToFactoryDefaults)
- 5.3.24 - ReadDefaults (ReadCurrent)
- 5.3.25 - 1-Wire
- 5.4 - Low-Level Errorcodes
- 5.5 - Modbus
- 5.6 - Calibration Constants
- 6 - Low-level Native Examples
- Appendix A - Specifications
- Appendix B - Noise and Resolution Tables
- Appendix C - Enclosure and PCB Drawings
- UE9 Firmware Revision History
- U12 Datasheet
- 1 - Installation
- 2 - Hardware Description
- 3 - Example Applications
- 4 - Programming Reference
- 4.1 - EAnalogIn
- 4.2 - EAnalogOut
- 4.3 - ECount
- 4.4 - EDigitalIn
- 4.5 - EDigitalOut
- 4.6 - AISample
- 4.7 - AIBurst
- 4.8 - AIStreamStart
- 4.9 - AIStreamRead
- 4.10 - AIStreamClear
- 4.11 - AOUpdate
- 4.12 - AsynchConfig
- 4.13 - Asynch
- 4.14 - BitsToVolts
- 4.15 - VoltsToBits
- 4.16 - Counter
- 4.17 - DigitalIO
- 4.18 - GetDriverVersion
- 4.19 - GetErrorString
- 4.20 - GetFirmwareVersion
- 4.21 - GetWinVersion
- 4.22 - ListAll
- 4.23 - LocalID
- 4.24 - NoThread
- 4.25 - PulseOut
- 4.26 - PulseOutStart
- 4.27 - PulseOutFinish
- 4.28 - PulseOutCalc
- 4.29 - ReEnum
- 4.30 - Reset (or ResetLJ)
- 4.31 - SHT1X
- 4.32 - SHTComm
- 4.33 - SHTCRC
- 4.34 - Synch
- 4.35 - Watchdog
- 4.36 - ReadMem
- 4.37 - WriteMem
- 4.38 - BuildOptionBits (ActiveX only)
- 4.39 - FourPack (ActiveX only)
- 4.40 - Description of Errorcodes
- 5 - Low-Level Function Reference
- Appendix A - Specifications
- Appendix B - Dimensions
- Appendix C - U12 Hardware Troubleshooting
- Appendix D - Maximum Data Rates for the LabJack U12
- Accessories
14 comments
Hello, I have recently
Hello,
I have recently purchased a U3-HV to act as a datalogger for a number of small "shed" projects. I am currently trying to log a simple 1-5V signal outputed from a thermal gas flow meter. Not being an electrical guru (chemical engineer) the amount of circuitry knowledge in your explanations is very difficult to follow. However, i am having a lot of trouble simply getting a correct signal to appear on the LJLogUD.
My first issue is that there appears to be a large amount of interference in the measured signals, particularly a random cyclic interference which is different on each single ended wire. I find that not being able to directly use a differential measurment (due to it converting it directly into binary) is enormously aggravating, particularly when the converted binary (ie by dividing by 65536) still gives me a resultant cyclic interference. Please help, i had very high hopes for this little device, but have so far found other dataloggers far more user friendly and accurate.
I think Section 2.6.3.4 would
I think Section 2.6.3.4 would be better for this topic, although to continue in detail about your particular signal I would start a forum topic or email [email protected].
Start with all connections removed except for USB and your signal. Connect your signal to AIN0 and GND, monitor it in the test panel in LJControlPanel or in LJLogUD, and let us know what you see.
We can't provide a single calibration for the differential high-voltage channels on the U3-HV, because the calibration depends on the common-mode voltage on both inputs, so we leave it to the user to calibrate in their actual system. However, a differential measurement seldom makes sense with high-level signals. The differential app note has more information.
T7/T7-PRO binary to voltage conversion
I can't find similar formula for T7/T7-PRO we use.
Could you point me to correct calculation?
The code I found it one of examples C_T7_TCP_Modbus_Stream/src/calibration.c does the following:
if(*volts < devCal->HS[gainIndex].Center)
*volts = (devCal->HS[gainIndex].Center - rawAIN) * devCal->HS[gainIndex].NSlope;
else
*volts = (rawAIN - devCal->HS[gainIndex].Center) * devCal->HS[gainIndex].PSlope;
return 0;
So it doesn't use the offset at all to calculate value in volts.
That would be okay, but changing the range results in different voltages read from the same output.
Specifically here is what I have:
Range: 0.01: Slope: 3.1554174e-7 Center: 33342.086 Offset: -0.010516284 Raw-value: 33529 -> Volts: 5.897919e-5
Range: 0.1: Slope: 3.1550958e-6 Center: 33493.71 Offset: -0.10566833 Raw-value: 35948 -> Volts: 0.007743517
Range: 1.0: Slope: 3.1550582e-5 Center: 33508.027 Offset: -1.057076 Raw-value: 35369 -> Volts: 0.05871477
Range: 10.0: Slope: 3.1554952e-4 Center: 33510.492 Offset: -10.572616 Raw-value: 33716 -> Volts: 0.064847894
So for the range of 0.1V 0.0077V error seems to be way to hight for a 14bit ADC - more like 8bit one.
I totally might be doing something wrong elsewhere, but this is the first thing I found that looks wrong.
Thank you in advance!
I think the problem you are
I think the problem you are running into is that the T7 is using the high-resolution (HR) converter, and we are applying the high-speed (HS) constants. The T7 defaults to a resolution index of 0 which is "automatic." When set to automatic the T7-Pro will use index 9 for normal command-response operations. We either need to adjust the calibration routine to use HR in place of HS, or set the AIN's resolution somewhere between 1 and 7 to force the T7-Pro to use the HS converter.
Conversion
I posted a comment already, but forgot to confirm that the conversion formula I am using is correct, even though it doesn't use offset from the calibration values. You didn't write anything about it:
if(*volts < devCal->HS[gainIndex].Center)
*volts = (devCal->HS[gainIndex].Center - rawAIN) * devCal->HS[gainIndex].NSlope;
else
*volts = (rawAIN - devCal->HS[gainIndex].Center) * devCal->HS[gainIndex].PSlope;
The offset is not used. The
The offset is not used. The PSlope is used when the binary reading is >= the center point and the NSlope is used when the binary reading is below the center point.
What is called streaming?
One more thing I am confused with is what is called streaming.
There are 3 (or 2.5) modes of operation:
However, when referring to streaming table https://labjack.com/support/datasheets/t7/appendix-a-1 says that high resolution is not supported. I assume that is because 16bit can't hold 22bit values.
There are two modes of
There are two modes of communication. Command-Response (CR) and Spontaneous (SP). Command-Response is a two-way communication. The host computer sends a request and the LabJack sends a response. Spontaneous is a one-way communication. The LabJack sends packets to the host without a request.
Stream mode defaults to spontaneous, but can be set to command-response. In CR mode stream will buffer the data in RAM and the host will have to send requests to read out the buffered data.
"Am I correct that both..." Stream mode produces 16-bit binary data.
"Is there any way of achieving 10-100Hz..." Yes. Command-Response polling can be as fast as 1 kHz. The max speed is heavily dependent on the chosen operations and communication medium. CR is not limited to a single operation. To make usage easier we provide functions that perform only a single function, such as LJM_eWriteName and LJM_eReadName. Functions such a LJM_eReadNames, LJM_eWriteNames, and LJM_eNames can read or write multiple registers in a single packet. So you can read analog inputs and digital IO in a single packet. Keeping the operations in a single packet removes timing errors due to operating systems and communications. With those errors out of the way firmware can quickly read multiple inputs with consistent timing. Jitter will be on the order of 10 µs. You can also measure the time between measurements in a packet by adding reads of the CORE_TIMER register. The core timer register counts at 40 MHz, so you can measure times with 50 ns resolution.
More detail can be found here: https://labjack.com/support/datasheets/t7/communication
Valid settings combinations, please...
Your guess is wrong, but I think it points me to the right direction. I am using HS values (confirmed) because I am reading in stream/spontaneous mode with the sampling rate of 30Hz on 1 single-ended channel at a resolution index 7 and settling 100:
[ ] READ-MODE = :SP
[ ] RESOLUTION = 7
[ ] SAMPLING-RATE = 30
[ ] SETTLING = 100.0d0
Unfortunately it is hard for me to confirm that this combination makes sense as details are sort of scattered over documentation. As a suggestion, it'd be convenient to have a single table for each reading mode (command-response, spontaneous, single reading) that would cover all valid combinations of all relevant parameters, something similar to this https://labjack.com/support/datasheets/t7/appendix-a-1 but including all the values, maximizing precision for number of channels and specific sampling rate.
It seems to me that the combination of settings I use is invalid:
- settling time might be too low (unsure, as resolution index 7 is missing here: https://labjack.com/support/appnotes/SettlingTime)
- high gains (ranges of 0.1 and 0.01V) are not supported with resolution index 7 as per last table here: https://labjack.com/support/datasheets/t7/appendix-a-1
I would appreciate if you can provide valid combinations of settings for ~10-100Hz and ~100-1000Hz sampling rates on 1-3 channels. One example of valid parameter combinations maximizing precision at each gain would be sufficient.
I would also like to make sure that there are no other settings that I should pay attention to with regards to 16bit -> float conversion.
Thank you very much, I really appreciate your help!
Normally we don't use stream
Normally we don't use stream until we are sampling faster than 800 Hz. At 30 Hz you could use the high-resolution converter (resolution 9-12). From appendix_A I would say resolution_index 10, with settling set to 0 (auto) would work best. The high-resolution converter is much better at rejecting noise and is less prone to settling issues.
When selecting AIN settings I first determine the maximum useful gain. Gain will depend on the maximum range that you need to measure. With gain selected I determine the sampling rate I need and find the best resolution setting (table in appendix_A) that takes less time than one period of my sampling rate. From there if I suspect settling errors I will increase settling and reduce resolution if necessary. Settling errors will depend on your signal's source impedance.
For Example, to measure a ±1V signal at 100 Hz: We can set gain to 10 which is the same as saying "set the range to ±1 V." At 100 Hz our period is 10 ms, so from Appendix_A we find the best resolution at range 1.0V that takes less than 10 ms. Which is resolution 9. To check for settling issues read a grounded channel, then read your signal multiple times in rapid succession (eReadNames). If the results converge on a value that is significantly far from the first value then more settling can help your reading.
If we need 3, ±1.0 V channels in the above example then the sample rate is 300 Hz which leaves us 3.3 ms per sample. Resolution 9 takes 3.5 ms, so we need to drop down to 8. 8 is cutting it a little close if we want to squeeze in other options we may encounter issues.
When applying calibration constants range and converter type are the important factors. If you are reading the temperature sensor you will need to apply the temperature slope and offset to the calculated voltage.
Unfortunately this is T7
After looking into it more I found out that I can't use HR calibration because this particular physicist chose to be thrifty and bought T7, rather than T7-PRO.
We can try to swap it for one of PRO devices we have, however, given that we still will be owning one T7 (unless you can offer an upgrade) I need to figure out how to use it. Regardless if I am using it in CR or SP mode, I have to perform the same calculation I asked in the initial question to convert from 16bit int to float.
I tried increasing resolution from 7 to 8 and settling set to default 0 allowing device to figure it out, but it still doesn't produce results that are acceptable. Here are the outputs measuring same voltage (only for ranges of 1V and 10V as 0.1 and 0.01 are N.S.):
1.0: Slope:3.1550582e-5 Center:33508.027 Offset:-1.057076 Raw: 34329 -> Float: 0.025902165
10.0: Slope:3.1554952e-4 Center:33510.492 Offset:-10.572616 Raw: 34344 -> Float: 0.263013
I tried using both CR and SP modes and don't see difference.Which still differ by the order of 10 and the error for either one or both ranges is much greater than ADC noise as per specification.
Any other ideas of why I have different results, assuming I have to use T7 and therefore HS constants?
What are you measuring with
What are you measuring with that test, a channel tied to ground?
We can swap out our T7 for a Pro for the normal price difference.
It is possible that the converter has been damaged. If you measure a grounded channel (or just channel 15) and the results are not close to the binary center specified in the calibration constants then the converter is indeed bad.
FGM1D
We are measuring output of this sensor http://www.sensysmagnetometer.com/en/fgm1d-4-s1.html
It is connected in single-ended mode, sensor's output connected to channel 0 of T7 and sensor's ground is connected to T7's ground.
We are measuring rather small outputs (as per my previous post, depending on which gain gives better estimate it's either 0.026V or 0.26V) and are trying to convert them into nT. The problem is that there is 10x difference between no amplification and 10x amplification. We'll try to switch T7 to T7-PRO here and if it helps I'll contact you about upgrade.
That is unusual behavior. I
That is unusual behavior. I believe this is going to be related to details of your system such as impedance or perhaps ground issues. Try increasing your settling time and making sure you do not have ground loops.
If you continue to have issues please email us at [email protected] so we can get into the details of your system.