U3-HV setting | LabJack
 

U3-HV setting

6 posts / 0 new
Last post
David_c
David_c's picture
U3-HV setting

I am new to Labjack U3-HV and this forum. I use U3-HV to control an external device. I set FIO4-FIO7 as digital I/O. 

d=u3.U3() 

d.configIO(FIOAnalog=240) 

My question is:

1) should I specify each node for input or output? For example, FIO4 is input node, FIO5 is output node. If so, how can I do it?

2) how can i send a logical high/low signal to the output?

Thanks in advance.

LabJack Support
labjack support's picture
The FIOAnalog setting

The FIOAnalog setting indicates which lines are analog, where a bit of 1 = analog and 0 = digital I/O. So you will want:

d.configIO(FIOAnalog=0x0F)  #0x0f = d15 = b00001111

Which sets FIO0-FIO3 to analog inputs (these lines are dedicated analog inputs on HVs) and FIO4-FIO7 to digital I/O. Then you'll want to set the digital I/O's direction (input/output) and state (high/low) if an output. Take a look at the quickstart which demonstrates digital I/O usage, and let us know if you have further functionality questions:

https://labjack.com/support/software/examples/ud/labjackpython/low-level

David_c
David_c's picture
Thank you for answering. I

Thank you for answering. I solved it. 

Now I am trying to control a relay via DAC0 on U3-HV. I use the configuration of (DAC0/GND) connected with the relay. However, I got no current from DAC0. Also, when I set DAC0 to 3V, it only shows 1.5V from measurement. I don't know if there is something wrong. 

I configure it in python like following: 

>>> import u3 >>> d = u3.U3()
>>> d.getCalibrationData()
>>> DAC0_VALUE = d.voltageToDACBits(3, dacNumber = 0, is16Bits = False)
>>> d.getFeedback(u3.DAC0_8(DAC0_VALUE))

Thank you for your help again!
LabJack Support
labjack support's picture
Your code looks fine, and

Your code looks fine, and should be setting DAC0 to about 3.0 volts. The problem is likely that the relay is too much load for the DAC. The DACs have about 50 Ω in series. If you get 1.5 V when trying to set the DAC to 3 V then your load must be about 50 Ω as well, which is too low for the DAC to drive.

Options are to use an amplifier to drive more current, or switch to a DIO if it will work with your relay. Here is an app-note that covers controlling relays using LabJack devices: https://labjack.com/support/app-notes/Controlling-Relays

David_c
David_c's picture
I appreciate for your answer

I appreciate for your answer and figured it out.

Is there a way I could read digital IO in terms of voltage? That is to say, checking if a digital IO gives 3.3 V.

Thanks.

LabJack Support
labjack support's picture
Connect a jumper wire from

Connect a jumper wire from the digital output terminal to one of your hv analog inputs (AIN0-AIN3) and then you can read the voltage.