Please enable JavaScript to view this site.

DAQFactory User's Guide

Navigation: 17 Devices > 17.7 LabJack UE9 / U6 / U3 > 17.7.5 Analog and Digital I/O > 17.7.5.2 High Speed Acquisition - streaming

17.7.5.2.3 Streaming Other Inputs

Scroll Prev Top Next More

You can stream other inputs besides the analog inputs of your LabJack.  This is done by specifying special channel numbers when doing LJ_ioADD_STREAM_CHANNEL.  The important part here is that even though the LabJack is actually streaming something other than an analog input, you MUST specify A to D for the I/O Type when creating your DAQFactory Channels to receive the data.  

The available channel numbers are slightly different for each LabJack and listed here for your reference.  Please see the LabJack device documentation for more detail:

U3:

193        EIO_FIO
200        Timer0
201        Timer1
210        Counter0
211        Counter1
224        TC_Capture0
225        TC_Capture1
226        TC_Capture2
227        TC_Capture3

UE9:

193        EIO_FIO
194        MIO_CIO
200        Timer0
201        Timer1
202        Timer2
203        Timer3
204        Timer4
205        Timer5
210        Counter0
224        TC_Capture0
225        TC_Capture1
226        TC_Capture2
227        TC_Capture3
227        TC_Capture4
227        TC_Capture5
227        TC_Capture6

You may notice that in DAQFactory, we have multiple TC_Capture channel numbers, where the LabJack documentation only lists one.  This is to allow you to stream the high order word of multiple timers and counters and keep the data separate in separate channels.  Internally, they are exactly the same, so you have to specify the appropriate TC_Capture immediately following its Timer or Counter channel #.  In other words, to read the entire 32 bits of Timers 0 and 1, you'd do:

AddRequest(0, LJ_ioADD_STREAM_CHANNEL, 200, 0, 0, 0)
AddRequest(0, LJ_ioADD_STREAM_CHANNEL, 224, 0, 0, 0)
AddRequest(0, LJ_ioADD_STREAM_CHANNEL, 201, 0, 0, 0)
AddRequest(0, LJ_ioADD_STREAM_CHANNEL, 225, 0, 0, 0)