- 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
31 comments
with LabJack U3-HV I can
with LabJack U3-HV I can capture a 20KHz signal?
The U3 can scan 1 channel at
The U3 can scan 1 channel at 50 kscans/second, so if you do that with a 20 kHz signal you will get just 2 or 3 samples per cycle. So the answer depends on what information you want from the signal. If you want to display a nice looking waveform, you need many more points per cycle.
For a fluorimeter operated
For a fluorimeter operated via LabVIEW which would be the best DAC to use and why?
Sounds like you have some
Sounds like you have some sort of device that provides some signal that you want to acquire. We will need details about the signal. I suggest you post on our forum, and provide a link to details about the output signal from your flourometer.
Hello. I need to measure the
Hello. I need to measure the time it takes to perform the conversion when I put my analog signal in one of the AIN inputs using Labview. how can i do it?
I am trying to understand the
I am trying to understand the T7 data acquisitionn rate, if a script contains a scansperread at 500 and a scanrate of 10,000 does that mean that the T7 is acquiring 50k data reads/second?
This is the U3 User's Guide,
This is the U3 User's Guide, and the U3 uses the UD library on Windows. The T7 uses the LJM library on all platforms.
UD or LJM: SampleRate = NumChannels * ScanRate. So if you have ScanRate = 10 kscans/second and NumChannels = 5 (NumAddresses on the T7), you are sampling at 50 ksamples/second and that is the number you use when looking at data rate limits.
LJM: ScansPerRead is not directly related to ScanRate or SampleRate. ScansPerRead controls how many scans you read per call to the read function. A typical value in this example would be 5k, so that the read call would wait and return 5k scans per call (which is a 1/2 second of data).
UD: The number of scans you retrieve per read is controlled by the value parameter in the request with ioType LJ_ioGET_STREAM_DATA (i.e. the stream read call). See Section 4.3.7 of the U3 User's Guide.
This section has been updated with clarification on sample versus scan, as have T7/LJM sections:
http://labjack.com/support/datasheets/t7/communication/stream-mode
http://labjack.com/support/datasheets/t7/appendix-a-1
http://labjack.com/support/ljm/users-guide/function-reference/ljmestream...
I have found that I can read
I have found that I can read and write data in stream mode at 50000 samples/s and resolution 0, causing a number of errors in each block equal to numPackets, but there are no missed readings. If no information is lost because of buffer overflow, what errors are actually occurring?
Is this low-level stream code
Is this low-level stream code or through the UD library? What errorcode are you getting?
Low-level stream code. I was
Low-level stream code. I was just looking at the number of errors per block, as given by the key 'error' to streamData. From 5.2.12 in the user guide that might be errorcode 11, though I'm not sure.
The error key's value is a
The error key's value is a count of the errors detected in the StreamData response packet byte 11. Byte 11 in each packet is an errorcode. You could do something like this to print out what the StreamData packets error codes are when streaming to give a better idea on what is happening:
cnt = 0
#StreamData packets are 64 bytes and the 11th byte is the error code.
#Iterating through error code bytes and displaying the error code
#when detected.
for err in r['result'][11::64]:
errNum = ord(err)
if errNum != 0:
#Error detected in this packet
print "Packet", cnt, "error:", errNum
cnt+=1
Error codes can be found here:
http://labjack.com/support/u3/users-guide/5.3
Keep in mind that for a 50k sample rate you may need a high-speed USB 2.0 hub as described in paragraph 4 on this page. If you cannot read the stream data from the U3 at the rate configured, that can lead to a stream buffer overflow and put the device into autorecovery mode. Autorecovery mode is documented here:
http://labjack.com/support/u3/users-guide/5.2.12
With the STREAM_AUTORECOVER_ACTIVE error you will be getting the valid data that was buffered on the U3 before the overflow occurred.
I am encountering a
I am encountering a STREAM_SCAN_OVERLAP (errorcode 55) when writing the streamed data from 1 channel to a file, using what seems like appropriate Resolution and sampleFrequency (e.g. 10000 samples/s at resolution index 1, 2, or 3). I don't see the error for 2500 samples/s and resolution index 0. Why might this be?
I'm not sure this is relevant, but I am also manually triggering the stream (since u3 doesn't support triggering) by monitoring an CIO channel and waiting for a TTL signal.
What are you using for
What are you using for software? See if you can reproduce this using LJStreamUD.exe, and then you can tell us some settings to reproduce it ourselves.
I am using a U3 in stream
I am using a U3 in stream mode with 6 AI channels at 1 KS/s. The buffer is read approximately every 25 ms by my LabVIEW application. I am also using an eDAC and 2 of the LJUD eDO to issue commands every 25 ms.
For reasons unknown to me, the stream will crash with error 15 (Stream packet received out of sequence, 6015 in LabVIEW). I have also briefly seen error 1008 (7008 in LabVIEW). What are potential causes of these errors?
My suspicion is that eDO and eDAC executions are somehow overlapping with the stream read and causing the misread.
I made an example that does
I made an example that does just what you describe and it works fine for me. I also made another example that does an add/go/get block rather than the 3 e-function calls, since the add/go/get is more efficient. To get the examples post on the forum or email [email protected].
Scan frequency accuracy
I am using about a dozen U3's, and each U3 is reading four analog signals. If I specify a scan frequency of X (in my case 200Hz), what is the accuracy of the actual scan frequency? I'm finding that we are receiving scans from most of our U3's at a frequency of 200.6Hz. Is there a +/- percentage bound that you can specify?
U3 clock accuracy is 1.5%
2 things to consider for stream scan rate accuracy:
1. Due to integer math and rounding limitations, the actual scan rate according to the U3 clock might be different than what you requested. Look at the return value of the START_STREAM call to see the actual scan rate. See Section 4.3.7.
2. The U3 has an RC clock, rather than quartz based, so the clock accuracy of the U3 is only 1.5% per Appendix A. Our other devices have quartz based clocks which are much more accurate, such as the U6 which is 30 ppm (0.003%) per its Appendix A.
I'm using the exodriver and
I'm using the exodriver and LabJackPython. What's the easiest way to grab the actual scan rate? The functions described in Section 4.3.7 are Windows only.
The scan rate is decided by
The scan rate is decided by the internal stream clock frequency configured and the 16-bit scan interval in the StreamConfig low-level level function/packets (the Windows driver configures stream mode with this too).
Currently LabJackPython does not store that information and there is no low-level function to read those values (only set), so you would need to modify the u3.py source code to add that functionality. So from the LabJackPython download, edit src/u3.py and in the streamConfig method add a return at the end of the function like:
freq = freq/ScanInterval
if SamplesPerPacket < 25:
#limit to one packet
self.packetsPerRequest = 1
else:
self.packetsPerRequest = max(1, int(freq/SamplesPerPacket))
self.packetsPerRequest = min(self.packetsPerRequest, 48)
#User added code
return freq
Build and reinstall the modified u3.py file (python setup.py install). Then the streamConfig return value is the actual scan frequency. That or just display the value in the u3,py file with print if you don't need a variable.
Scan frequency accuracy
I think this might be a duplicate post but I'm not sure.
I am using a bunch of U3's, and we've specified a scan frequency of 200Hz. We are finding that the scan frequency is closer to 200.6Hz. What I mean is that over a 48 hour period, we receive 0.3% more scans than expected. What is the accuracy of the scan frequency?
We answered your previous
We answered your previous question (which is the same as this one) on the day it was posted, but we just made both your posts public today. The response is above your post today.
Does U3 ADC have a sample-and-hold on its input?
We are using U3s to collect fluorescence decay data. The fluorescence decay looks like an exponential decay from an initially high level, similar to what you see if you put a square wave through a low-pass filter with a 1 ms RC time constant.
The user's guide says that the low-voltage inputs are "essentially connected directly to the input of an SAR ADC". Many such ADCs have sample-and-hold amplifiers at the input, so that the input voltage is captured when the conversion is first triggered and held steady while the ADC goes through its try-and-compare sequence. If there's no S/H at the input, then strange things can happen if the input voltage varies as the successive approximations are going on.
Does the U3's SAR ADC have this front-end sample and hold circuit?
Thanks,
George.
I looked closely at the chip
I looked closely at the chip's datasheet and it mentions tracking and I can see the sample capacitors, but does not explicitly say "track & hold". That is, does not clearly state that the sample capacitors are detached from the input connections during the conversion process. I assume that is true but we have contacted the manufacturer for confirmation.
datasheets/u3/operation/stream-mode
Note that most U3 readings are oversampled. Even at ResolutionIndex=3 each sample is oversampled 2x:
https://labjack.com/support/
oversampling on U3
> Note that most U3 readings are oversampled. Even at ResolutionIndex=3 each sample is oversampled 2x:
I thought so, though it's not clearly stated in the documentation, and I can't tell what the oversampling factors are for other resolution index values. (Also, you're actually oversampling a 10-bit ADC, right?) It's also unclear what the relation is between "QuickSample" which is described in some parts of the documentation, and the resolution index which is described in the stream mode docs.
When you oversample, I presume you start a new full conversion for each subsample, with whatever input voltage you have when the new subsample begins, rather than doing a new SAR conversion on the sampled-and-held value from the first subsample. Is that correct? In that case, the returned value is some sort of average of the time-varying input signal across the full oversampling period, with each relevant subsample taken at the beginning of each subsample period. For instance, if at resolution index 2 you use 4 subsamples (a guess!), and a single 10-bit SAR conversion requires 200 ns, then a single-channel sample reflects an average of the input signal at times 0, 200, 400, and 600 ns after the conversion begins, and is available for placement in the buffer after 800 ns.
Do I have this right?
Your description is correct
Yes, the U3 has a 10-bit ADC chip that is fast enough, linear enough, and has the right amount of white noise, to provide good 12-bit samples with oversampling. QuickSample and ResolutionIndex are essentially the same thing ... both control how much oversampling happens. QuickSample is for command-response mode and ResolutionIndex is for stream mode (See Section 3.0 for clarification on those modes).
Yes, your description is correct.
The stream mode provides a
The stream mode provides a sample rate at 50Khz, I have 2 questions, can I change this sample rate? and does it have the same value in command-response mode?
Thanks in advance
Are you asking about an
Are you asking about an example for some particular language provided by us?
Command/response is not as fast as stream mode. See Sections 3.0, 3.1 and 3.2:
https://labjack.com/support/datasheets/u3/operation
I'm communicating with my U3
I'm communicating with my U3 via labVIEW, so for example while using the "U3 eAIN loop with chart.vi" there's an option to change the "ms per iteration", so does varying that value affects the sampling rate of the ADC?
Yes, in effect, but the
Yes, in effect, but the mechanisms are different:
Command-Response: The sampling rate is controlled by software. For example, you make a loop in your program that uses LabVIEW timing to make the loop run evey 100 ms. Each time in the loop it reads 1 scan from your channels. Thus the host software is controlling sample rate.
Stream: The sampling rate is controlled by hardware. You tell the U3 how fast to scan a list of channels, and it then does it.
And I assume I shouldn't go
And I assume I shouldn't go below the loop's execution time while changing the time between each iteration, because in the source code I noticed the use of the "Wait Until Next ms Multiple" function...so to avoid having the loop taking more time to execute than the time specified at millisecond multiple, I think I should take a look at the tables mentioned in https://labjack.com/support/datasheets/u3/operation/command-response to keep my loop execution in a safe margin in comparison with the specified timing between each loop.
That is correct. If
That is correct. If concerned, I suggest you keep an eye on the actual time per iteration.