import com.LabJack.LabJackJNI; import com.LabJack.LabJackWrapper; import com.LabJack.LabJackException; /** * This program show how to set the TTL digital outputs (DB-25) * using com.LabJack.LabJackWrapper.digitalOut(). * * Caution: don't run this program if you have any of the LabJack * digital I/O pins connected to other outputs or to +5V. * The digital outputs are NOT short-circuit protected and can * be damaged if in-appropriately configured as outputs. */ public class DigitalOut { public static void main( String args[] ) { LabJackWrapper lj = new LabJackWrapper( -1 ); try { // set the TTL value on all 16 digital outputs low. for( int idx = 0; idx < 16; idx++ ) { lj.digitalOut( idx, 0 ); } } catch( LabJackException ex ) { ex.printStackTrace(); } } }