Package modbustcp.brainbox
Class BBED549
java.lang.Object
modbustcp.brainbox.BBED549
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int[]
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the connection.static Integer
getBBRangeCode
(AnalogRangeData rangeData) Find the internal code that matches this rangeData.static AnalogRangeData
getRangeData
(int range) Convert one of the internally used range codes into a standard PAMGuard analog range.static double
hexToEngineering
(int range, int data) convert integer data to engineering units.double[]
hexToEngineering
(int range, short[] data) convert integer data array to engineering units.short
readRawAnalogChannel
(int channel) short[]
readRawAnalogChannels
(int firstChannel, int nChannels) static String
sayInputRange
(int rangeCode) setInputRange
(int channel, int range)
-
Field Details
-
DISCRETE_INPUTS_READ
public static final int DISCRETE_INPUTS_READ- See Also:
-
COILS_READ
public static final int COILS_READ- See Also:
-
INPUT_REGISTERS_READ
public static final int INPUT_REGISTERS_READ- See Also:
-
HOLDING_REGISTERS_READ
public static final int HOLDING_REGISTERS_READ- See Also:
-
COILS_WRITE_SINGLE
public static final int COILS_WRITE_SINGLE- See Also:
-
HOLDING_REGISTERS_WRITE_SINGLE
public static final int HOLDING_REGISTERS_WRITE_SINGLE- See Also:
-
COILS_WRITE_MULTIPLE
public static final int COILS_WRITE_MULTIPLE- See Also:
-
HOLDING_REGISTERS_WRITE_MULTIPLE
public static final int HOLDING_REGISTERS_WRITE_MULTIPLE- See Also:
-
AI_INT_HOLDING_REGISTERS
public static final int AI_INT_HOLDING_REGISTERS- See Also:
-
AI_INT_INPUT_REGISTERS
public static final int AI_INT_INPUT_REGISTERS- See Also:
-
AI_FLOAT_HOLDING_REGISTERS
public static final int AI_FLOAT_HOLDING_REGISTERS- See Also:
-
AI_FLOAT_INPUT_REGISTERS
public static final int AI_FLOAT_INPUT_REGISTERS- See Also:
-
AI_ERROR_FLAGS
public static final int AI_ERROR_FLAGS- See Also:
-
AI_CHANNEL_ENABLE
public static final int AI_CHANNEL_ENABLE- See Also:
-
AI_INPUT_RANGE
public static final int AI_INPUT_RANGE- See Also:
-
AI_INTEGER_FORMAT
public static final int AI_INTEGER_FORMAT- See Also:
-
VOLTS_2pt5
public static final int VOLTS_2pt5- See Also:
-
mAMP_20
public static final int mAMP_20- See Also:
-
mAMP_20b
public static final int mAMP_20b- See Also:
-
mAMP_4_20
public static final int mAMP_4_20- See Also:
-
VOLTS_10
public static final int VOLTS_10- See Also:
-
VOLTS_5
public static final int VOLTS_5- See Also:
-
VOLTS_1
public static final int VOLTS_1- See Also:
-
VOLTS_1b
public static final int VOLTS_1b- See Also:
-
VOLTS_0pt5
public static final int VOLTS_0pt5- See Also:
-
VOLTS_0pt5b
public static final int VOLTS_0pt5b- See Also:
-
VOLTS_0pt15
public static final int VOLTS_0pt15- See Also:
-
mAMP_0_20
public static final int mAMP_0_20- See Also:
-
VOLTS_0pt075
public static final int VOLTS_0pt075- See Also:
-
VOLTS_0pt250
public static final int VOLTS_0pt250- See Also:
-
ALLRANGES
public static final int[] ALLRANGES
-
-
Constructor Details
-
BBED549
Create a Modbus TCP connnection to the BainBoxes ED-549- Parameters:
ipAddress
-- Throws:
ModbusTCPException
-
-
Method Details
-
close
public void close()Close the connection. Will need to build a new object to reopen the connection. -
setInputRange
- Throws:
ModbusTCPException
-
readRawAnalogChannel
- Throws:
ModbusTCPException
-
readRawAnalogChannels
- Throws:
ModbusTCPException
-
hexToEngineering
public double[] hexToEngineering(int range, short[] data) convert integer data array to engineering units.- Parameters:
range
- range on device, assumed the same for all channels.data
- data array- Returns:
- data in engineers units of Volts or Amps (not bothering with mV and mA - stick to SI)
-
hexToEngineering
public static double hexToEngineering(int range, int data) convert integer data to engineering units.- Parameters:
range
- range on device, assumed the same for all channels.data
- data array- Returns:
- data in engineers units of Volts or Amps (not bothering with mV and mA - stick to SI)
-
getBBRangeCode
Find the internal code that matches this rangeData.
This is super inefficient, so don't call too often !- Parameters:
rangeData
- PAMGaurd range data- Returns:
- BB range code. or Null if the range not found
-
getRangeData
Convert one of the internally used range codes into a standard PAMGuard analog range.- Parameters:
range
- BrainBox range code- Returns:
- PAMGuard range object.
-
sayInputRange
-