LabJack U12 Скачать руководство пользователя страница 11

specified and a measurement of +5V returns 5.10 volts, the actual output voltage is 2.55 volts.  
Alternatively, the analog output can itself be measured with an analog input. 
 
There is a 1

st

 order low-pass filter on each analog output with a 3dB frequency around 22 Hz. 

 

Software 

The analog outputs are set using the function AOUpdate, which takes up to 20 ms to execute, 
providing a maximum update rate of at least 50 Hz per channel.  This function also 
controls/reads all 20 digital I/O and the counter. 

2.3  IO0 – IO3 

Connections to 4 of the LabJack’s 20 digital I/O are made at the screw terminals, and are 
referred to as IO0-IO3.  Each pin can individually be set to input, output high, or output low.  
These 4 channels include a 1.5 k

 Ω

 series resistor that provides overvoltage/short-circuit 

protection.  Each channel also has a 10 M

 resistor connected to ground. 

 
One common use of a digital input is for measuring the state of a switch as shown in Figure 2-5.  
If the switch is open, IO0 reads FALSE.  If the switch is closed, IO0 reads TRUE. 
 

 

Figure 2-5.  IO used to detect the state of a switch. 

 
While providing overvoltage/short-circuit protection, the 1.5 k

 Ω

 series resistor on each IO pin 

also limits the output current capability.  For instance, with an output current of 1 mA, the series 
resistor will drop 1.5 volts, resulting in an output voltage of about 3.5 volts. 
 

Software 

The functions AOUpdate or DigitalIO are used to set the direction, set the state, and/or read the 
state, of each IO pin.  Both of these functions take up to 20 ms to execute, providing a 
maximum update rate of at least 50 Hz per pin. 
 
The function AISample can set/read the state of each IO, and the function Counter reads the 
state of each IO. 
 
The functions AIBurst and AIStreamRead, take a reading of the IO states and return it with the 
analog data.  The states of the 4 IO are read every 4 samples, providing a data rate of up to 
2048 Hz per pin. 

2.4  D0 – D15 

Connections to 16 of the LabJack’s 20 digital I/O are made at the DB25 connector, and are 
referred to as D0-D15.  These 16 lines have no overvoltage/short-circuit protection, and can 
sink or source up to 25 mA each (total sink or source current of 200 mA max for all 16).  This 
allows the D pins to be used to directly control some relays.  All digital I/O are CMOS output and 

Содержание U12

Страница 1: ...LabJack U12 User s Guide Revision 1 00 9 21 2001 LabJack Corporation www labjack com support labjack com...

Страница 2: ...LabJack Corporation will not be liable for any such damage LabJack U12 Warranty The LabJack U12 comes with a 1 year limited warranty from LabJack Corporation LC covering this product and parts against...

Страница 3: ...18 4 Programming Reference 20 4 1 AISample 20 4 2 AIBurst 21 4 3 AIStreamStart 23 4 4 AIStreamRead 25 4 5 AIStreamClear 26 4 6 AOUpdate 26 4 7 BitsToVolts 27 4 8 VoltsToBits 27 4 9 Counter 27 4 10 Dig...

Страница 4: ...tage divider circuit 9 Figure 2 5 IO used to detect the state of a switch 11 Figure 3 1 LJconfig 13 Figure 3 2 LJconfig Change Local ID 14 Figure 3 3 LJlogger 14 Figure 3 4 LJlogger Configuration 15 F...

Страница 5: ...prompts and reboot the PC if asked to do so Enumeration occurs whenever the USB cable is connected and only takes a few seconds after the first time When enumeration is complete the LED will blink twi...

Страница 6: ...To test the installation start LJconfig by selecting Start Programs LabJack LJconfig and make sure 1 LabJack is listed...

Страница 7: ...nector provides connections for 16 digital I O lines called D0 D15 It also has connections for ground and 5 volts All connections besides D0 D15 are provided by the 30 screw terminals shown in Figure...

Страница 8: ...difference of 20 volts or AI0 could be 10 volts and AI1 could be 10 volts giving a difference of 20 volts Figure 2 2 shows a typical single ended connection measuring the voltage of a battery This sam...

Страница 9: ...n Va is connected to AI0 as shown in Figure 2 4 the input bias current of the LabJack affects the voltage divider circuit and if the resistance of R1 and R2 is too large this effect must be accounted...

Страница 10: ...e actual number of samples collected and transferred by the LabJack during an AIBurst call is the smallest power of 2 from 64 to 4096 which is at least as big as numSamples The execution time of this...

Страница 11: ...used to detect the state of a switch While providing overvoltage short circuit protection the 1 5 k series resistor on each IO pin also limits the output current capability For instance with an output...

Страница 12: ...z per pin 2 5 CNT The input connection to the 32 bit counter is made at screw terminal CNT This input has a Schmitt Trigger buffer and the counter is incremented each time the voltage at CNT changes f...

Страница 13: ...code for LJlogger and LJscope is installed in the examples directory 3 1 LJconfig Every LabJack has a local ID and serial number The local ID is a value between 0 and 255 that can be changed by the u...

Страница 14: ...ger sends and receives data in command response mode It is capable of saving data to disk writing data to an HTML page on the Internet and performing various actions including email on trigger events...

Страница 15: ...ectory where data and configuration files will be written Data File Name Determines the name of the data file to which data will be written New data is appended to the end of this file Data File Write...

Страница 16: ...Figure 3 5 LJlogger Internet Configuration Figure 3 6 LJlogger HTML Configuration...

Страница 17: ...output Trigger 4 If it has been 300 seconds since LJlogger started set D13 to an output Trigger 5 When the PC s clock is at 15 minute intervals the status LED will be turned off and an email will be...

Страница 18: ...ope 3 4 LJtest LJtest runs a sequence of tests on the LabJack itself Users will generally leave Test Fixture Installed unselected and execute the tests with nothing connected to the LabJack except the...

Страница 19: ...Figure 3 9 LJtest...

Страница 20: ...tErrorString to get a description of the error idnum Functions with this input take either a local ID serial number or 1 A local ID or serial number will specify a specific LabJack while 1 means the f...

Страница 21: ...with channelsPacked and gainsPacked The OCX has a function FourPack which will convert 4 elements to a packed value The packed value is determined as element 0 element 1 2 8 element 2 2 16 element 3 2...

Страница 22: ...ast numChannels elements Gain commands are 0 1 1 2 7 20 This amplification is only available for differential channels scanRate Scans acquired per second A scan is a reading from every channel 1 2 or...

Страница 23: ...nBits 4 22 to determine this parameter The voltages and stateIOout arrays are represented as strings Floating point data is returned as 13 characters per number XXXX XXXXXXXX and integers are returned...

Страница 24: ...ns acquired per second A scan is a reading from every channel 1 2 or 4 The sample rate scanRate numChannels must be between 200 and 1200 disableCal If 0 voltages returned will be raw readings that are...

Страница 25: ...s are returned Send filled with zeros stateIOout Pointer to a 4096 element array where IO states are returned Send filled with zeros Outputs voltages Pointer to a 4096 by 4 array where voltage reading...

Страница 26: ...ng resetCounter unsigned long count float analogOut0 float analogOut1 Parameter Description Returns LabJack errorcodes or 0 for no error Inputs idnum Local ID serial number or 1 for first found demo S...

Страница 27: ...t s 12 bit 0 4095 binary representation Bits 4096 Volts Gain Vmax 2 Vmax where Vmax 10 for SE 20 for Diff Declaration long __cdecl VoltsToBits long chnum long chgain float volts long bits Parameter De...

Страница 28: ...trisIO long stateD long stateIO long updateDigital long outputD Parameter Description Returns LabJack errorcodes or 0 for no error Inputs idnum Local ID serial number or 1 for first found demo Send 0...

Страница 29: ...cessor Execution time for this function is 20 milliseconds or less Declaration float __cdecl GetFirmwareVersion long idnum Parameter Description Returns Version number of the LabJack firmware or 0 for...

Страница 30: ...alIDList Pointer to a 127 element array Send filled with zeros powerList Pointer to a 127 element array Send filled with zeros calMatrix Pointer to a 127 by 20 element array Send filled with zeros Out...

Страница 31: ...Returns LabJack errorcodes or 0 for no error Inputs idnum Local ID serial number or 1 for first found Outputs idnum Returns the local ID or 1 if no LabJack is found 4 18 Reset Causes the LabJack to re...

Страница 32: ...ill reset on timeout activeDn If 0 Dn will be set to stateDn upon timeout stateDn Timeout state of Dn 0 low 0 high Outputs idnum Returns the local ID or 1 if no LabJack is found 4 20 ReadMem Reads 4 b...

Страница 33: ...no error Inputs idnum Local ID serial number or 1 for first found unlocked If 0 addresses 0 511 are unlocked for writing address Starting address for writing 0 8188 data3 Byte for address data2 Byte f...

Страница 34: ...written Otherwise just a read is performed stateIOin Output states for IO0 IO3 4 23 FourPack ActiveX only This function is only in the OCX and is used to convert a 4 element array into an integer The...

Страница 35: ...0 10 volts Maximum Input Range AIx to GND 40 40 volts Input Current 4 Vin 10 volts 70 1 A Vin 0 volts 11 7 A Vin 10 volts 93 5 A Resolution C R and Stream 12 bits Burst 5 11 bits Offset G 1 to 20 1 G...

Страница 36: ...at no load 7 The IO lines each have a 1500 ohm series resistor 9 CNT is a Schmitt Trigger input 8 These lines have no series resistor It is up to the user to make sure the maximum voltages and current...

Отзывы: