Package com.tinkerforge
Class BrickletIndustrialAnalogOut
- java.lang.Object
-
- com.tinkerforge.DeviceBase
-
- com.tinkerforge.Device
-
- com.tinkerforge.BrickletIndustrialAnalogOut
-
public class BrickletIndustrialAnalogOut extends Device
Generates configurable DC voltage and current, 0V to 10V and 4mA to 20mA
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
BrickletIndustrialAnalogOut.Configuration
-
Nested classes/interfaces inherited from class com.tinkerforge.Device
Device.Identity
-
-
Field Summary
Fields Modifier and Type Field Description static short
CURRENT_RANGE_0_TO_20MA
static short
CURRENT_RANGE_0_TO_24MA
static short
CURRENT_RANGE_4_TO_20MA
static java.lang.String
DEVICE_DISPLAY_NAME
static int
DEVICE_IDENTIFIER
static byte
FUNCTION_DISABLE
static byte
FUNCTION_ENABLE
static byte
FUNCTION_GET_CONFIGURATION
static byte
FUNCTION_GET_CURRENT
static byte
FUNCTION_GET_IDENTITY
static byte
FUNCTION_GET_VOLTAGE
static byte
FUNCTION_IS_ENABLED
static byte
FUNCTION_SET_CONFIGURATION
static byte
FUNCTION_SET_CURRENT
static byte
FUNCTION_SET_VOLTAGE
static short
VOLTAGE_RANGE_0_TO_10V
static short
VOLTAGE_RANGE_0_TO_5V
-
Constructor Summary
Constructors Constructor Description BrickletIndustrialAnalogOut(java.lang.String uid, IPConnection ipcon)
Creates an object with the unique device ID \c uid.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disable()
Disables the output of voltage and current.void
enable()
Enables the output of voltage and current.BrickletIndustrialAnalogOut.Configuration
getConfiguration()
Returns the configuration as set bysetConfiguration(short, short)
.int
getCurrent()
Returns the current as set bysetCurrent(int)
.Device.Identity
getIdentity()
Returns the UID, the UID where the Bricklet is connected to, the position, the hardware and firmware version as well as the device identifier.int
getVoltage()
Returns the voltage as set bysetVoltage(int)
.boolean
isEnabled()
Returns *true* if output of voltage and current is enabled, *false* otherwise.void
setConfiguration(short voltageRange, short currentRange)
Configures the voltage and current range.void
setCurrent(int current)
Sets the output current.void
setVoltage(int voltage)
Sets the output voltage.-
Methods inherited from class com.tinkerforge.DeviceBase
getAPIVersion, getResponseExpected, setResponseExpected, setResponseExpectedAll
-
-
-
-
Field Detail
-
DEVICE_IDENTIFIER
public static final int DEVICE_IDENTIFIER
- See Also:
- Constant Field Values
-
DEVICE_DISPLAY_NAME
public static final java.lang.String DEVICE_DISPLAY_NAME
- See Also:
- Constant Field Values
-
FUNCTION_ENABLE
public static final byte FUNCTION_ENABLE
- See Also:
- Constant Field Values
-
FUNCTION_DISABLE
public static final byte FUNCTION_DISABLE
- See Also:
- Constant Field Values
-
FUNCTION_IS_ENABLED
public static final byte FUNCTION_IS_ENABLED
- See Also:
- Constant Field Values
-
FUNCTION_SET_VOLTAGE
public static final byte FUNCTION_SET_VOLTAGE
- See Also:
- Constant Field Values
-
FUNCTION_GET_VOLTAGE
public static final byte FUNCTION_GET_VOLTAGE
- See Also:
- Constant Field Values
-
FUNCTION_SET_CURRENT
public static final byte FUNCTION_SET_CURRENT
- See Also:
- Constant Field Values
-
FUNCTION_GET_CURRENT
public static final byte FUNCTION_GET_CURRENT
- See Also:
- Constant Field Values
-
FUNCTION_SET_CONFIGURATION
public static final byte FUNCTION_SET_CONFIGURATION
- See Also:
- Constant Field Values
-
FUNCTION_GET_CONFIGURATION
public static final byte FUNCTION_GET_CONFIGURATION
- See Also:
- Constant Field Values
-
FUNCTION_GET_IDENTITY
public static final byte FUNCTION_GET_IDENTITY
- See Also:
- Constant Field Values
-
VOLTAGE_RANGE_0_TO_5V
public static final short VOLTAGE_RANGE_0_TO_5V
- See Also:
- Constant Field Values
-
VOLTAGE_RANGE_0_TO_10V
public static final short VOLTAGE_RANGE_0_TO_10V
- See Also:
- Constant Field Values
-
CURRENT_RANGE_4_TO_20MA
public static final short CURRENT_RANGE_4_TO_20MA
- See Also:
- Constant Field Values
-
CURRENT_RANGE_0_TO_20MA
public static final short CURRENT_RANGE_0_TO_20MA
- See Also:
- Constant Field Values
-
CURRENT_RANGE_0_TO_24MA
public static final short CURRENT_RANGE_0_TO_24MA
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BrickletIndustrialAnalogOut
public BrickletIndustrialAnalogOut(java.lang.String uid, IPConnection ipcon)
Creates an object with the unique device ID \c uid. and adds it to the IP Connection \c ipcon.
-
-
Method Detail
-
enable
public void enable() throws TinkerforgeException
Enables the output of voltage and current. The default is disabled.- Throws:
TinkerforgeException
-
disable
public void disable() throws TinkerforgeException
Disables the output of voltage and current. The default is disabled.- Throws:
TinkerforgeException
-
isEnabled
public boolean isEnabled() throws TinkerforgeException
Returns *true* if output of voltage and current is enabled, *false* otherwise.- Throws:
TinkerforgeException
-
setVoltage
public void setVoltage(int voltage) throws TinkerforgeException
Sets the output voltage. The output voltage and output current are linked. Changing the output voltage also changes the output current.- Throws:
TinkerforgeException
-
getVoltage
public int getVoltage() throws TinkerforgeException
Returns the voltage as set bysetVoltage(int)
.- Throws:
TinkerforgeException
-
setCurrent
public void setCurrent(int current) throws TinkerforgeException
Sets the output current. The output current and output voltage are linked. Changing the output current also changes the output voltage.- Throws:
TinkerforgeException
-
getCurrent
public int getCurrent() throws TinkerforgeException
Returns the current as set bysetCurrent(int)
.- Throws:
TinkerforgeException
-
setConfiguration
public void setConfiguration(short voltageRange, short currentRange) throws TinkerforgeException
Configures the voltage and current range. Possible voltage ranges are: * 0V to 5V * 0V to 10V Possible current ranges are: * 4mA to 20mA * 0mA to 20mA * 0mA to 24mA The resolution will always be 12 bit. This means, that the precision is higher with a smaller range.- Throws:
TinkerforgeException
-
getConfiguration
public BrickletIndustrialAnalogOut.Configuration getConfiguration() throws TinkerforgeException
Returns the configuration as set bysetConfiguration(short, short)
.- Throws:
TinkerforgeException
-
getIdentity
public Device.Identity getIdentity() throws TinkerforgeException
Returns the UID, the UID where the Bricklet is connected to, the position, the hardware and firmware version as well as the device identifier. The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port). A Bricklet connected to an :ref:`Isolator Bricklet <isolator_bricklet>` is always at position 'z'. The device identifier numbers can be found :ref:`here <device_identifier>`. |device_identifier_constant|- Specified by:
getIdentity
in classDevice
- Throws:
TinkerforgeException
-
-