Write Outputs

Written by Kevin Cloutier on Jul 11, 2018 8:39 pm

Write Outputs

Sometimes you want to control the outputs. The outputs may be wired to things like lights, sirens, valves and maybe fans. (Note: You may need our Power 4 Relay Output Module for high loads).  This example will show you how to set the output states programmatically.

package com.integpg;
import com.integpg.system.JANOS;
public class WriteOutputs {
    public static void main(String[] args) {

        // to get the states of the outputs use the JANOS class and the getOutputStates method
        int outputStates = JANOS.getOutputStates();

        //print the Output States through telnet (console) connection.
        System.out.println("Output States are: " + outputStates);

        //set output relay for channel 5 (channel n-1) and true top turn the relay on, false to turn relay off.
        JANOS.setOutputRelay(4 , true);

        //Relay Output 5 should now be on.
        //print the Output States through telnet (console) connection.
        System.out.println("Output States are: " + outputStates);
    }
}
On this page