Please enable JavaScript to view this site.

DAQFactory User's Guide

Navigation: 17 Devices > 17.9 LabJack M (T4 / T7 / T8 etc) > 17.9.3 Basic I/O, read/write analog/digital

17.9.3.1 Using the LabJack M with Channels

Scroll Prev Top Next More

To use your LabJack M device (T4, T7, etc) with channels, select LabJackM from the Device Type.  The D# should correspond to the identifier for your device.  You can use 0 or ANY in place of LJM_idANY.  Unlike other devices, you can put IP addresses directly in the D# column for the LabJackM.  DAQFactory opens the device using the LJM_Open() function (see LJM docs) with a device type of LJM_dtANY and connection type of LJM_ctANY.

The I/O types are pulled from the LJM driver table provided by LabJack and will vary depending on the version of the LJM you have installed.  Only core I/O types are displayed.  Please refer to their documentation for the meaning of each type.

For I/O types with # in them, you will need to provide a channel number as well.  Usually the range of valid channel #'s is displayed in parenthesis after the # in the I/O type.  For example, AIN#(0:254) would require you to specify a number from 0 - 254 depending on which analog input you wanted to read.

The I/O type list is limited to what LabJack identifies as a core type.  If you want to create a channel with a type that isn't in the list, you can select the Special I/O type, and then type in the name in the Quick Note / Special / OPC column.  If the type you want has a # in it, you can either substitute the desired channel right there in the Quick Note (for example: AIN1_EF_READ_A), in which case the channel # column is not used.  You can also leave the # sign and the channel # column is substituted for the #.  So if you put AIN#_EF_READ_A, and then a Channel # of 4, the LabJack driver would use AIN4_EF_READ_A.  This is better if you want to read the same type with different channel numbers, as you can just duplicate the channel and change the Channel #.  Note that you do not need to include the valid range, so for AIN#(0:254) you would just put AIN#.

Note: you need to be consistent with your IDs and should not use a different ID to address the same device.  This would include accessing a device with 0 for LJM_idANY and then accessing it explicitly using its ID.  If you want to change how you address a device, you will likely need to restart DAQFactory after the change is made.  

Note: DAQFactory currently does not distinguish between I/O types that are traditionally output only and inputs, for example DAC's, and will default the Timing to 1 for all I/O types.  Make sure and set the Timing to 0 for any output channels or DAQFactory will send a command to read from that I/O type at the Timing interval.