public class YMultiCellWeighScale extends YSensor
Modifier and Type | Class and Description |
---|---|
static interface |
YMultiCellWeighScale.TimedReportCallback
TimedReportCallback for MultiCellWeighScale
|
static interface |
YMultiCellWeighScale.UpdateCallback
Deprecated UpdateCallback for MultiCellWeighScale
|
Modifier and Type | Field and Description |
---|---|
protected int |
_cellCount |
protected String |
_command |
protected double |
_compensation |
protected double |
_compTempAvg |
protected double |
_compTempChg |
protected int |
_excitation |
protected int |
_externalSense |
protected double |
_tempAvgAdaptRatio |
protected double |
_tempChgAdaptRatio |
protected YMultiCellWeighScale.TimedReportCallback |
_timedReportCallbackMultiCellWeighScale |
protected YMultiCellWeighScale.UpdateCallback |
_valueCallbackMultiCellWeighScale |
protected double |
_zeroTracking |
static int |
CELLCOUNT_INVALID
invalid cellCount value
|
static String |
COMMAND_INVALID
invalid command value
|
static double |
COMPENSATION_INVALID
invalid compensation value
|
static double |
COMPTEMPAVG_INVALID
invalid compTempAvg value
|
static double |
COMPTEMPCHG_INVALID
invalid compTempChg value
|
static int |
EXCITATION_AC |
static int |
EXCITATION_DC |
static int |
EXCITATION_INVALID |
static int |
EXCITATION_OFF
invalid excitation value
|
static int |
EXTERNALSENSE_FALSE
invalid externalSense value
|
static int |
EXTERNALSENSE_INVALID |
static int |
EXTERNALSENSE_TRUE |
static double |
TEMPAVGADAPTRATIO_INVALID
invalid tempAvgAdaptRatio value
|
static double |
TEMPCHGADAPTRATIO_INVALID
invalid tempChgAdaptRatio value
|
static double |
ZEROTRACKING_INVALID
invalid zeroTracking value
|
_advMode, _calhdl, _calibrationParam, _calpar, _calraw, _calref, _caltyp, _currentRawValue, _currentValue, _decexp, _highestValue, _iresol, _logFrequency, _lowestValue, _offset, _prevTimedReport, _reportFrequency, _resolution, _scale, _sensorState, _timedReportCallbackSensor, _unit, _valueCallbackSensor, ADVMODE_IMMEDIATE, ADVMODE_INVALID, ADVMODE_PERIOD_AVG, ADVMODE_PERIOD_MAX, ADVMODE_PERIOD_MIN, CALIBRATIONPARAM_INVALID, CURRENTRAWVALUE_INVALID, CURRENTVALUE_INVALID, HIGHESTVALUE_INVALID, LOGFREQUENCY_INVALID, LOWESTVALUE_INVALID, REPORTFREQUENCY_INVALID, RESOLUTION_INVALID, SENSORSTATE_INVALID, UNIT_INVALID
_advertisedValue, _cacheExpiration, _className, _dataStreams, _func, _funId, _hwId, _lastErrorMsg, _lastErrorType, _logicalName, _serial, _userData, _valueCallbackFunction, _yapi, ADVERTISEDVALUE_INVALID, FUNCTIONDESCRIPTOR_INVALID, LOGICALNAME_INVALID
Modifier | Constructor and Description |
---|---|
protected |
YMultiCellWeighScale(String func) |
protected |
YMultiCellWeighScale(YAPIContext ctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_invokeTimedReportCallback(YMeasure value) |
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
static YMultiCellWeighScale |
FindMultiCellWeighScale(String func)
Retrieves a multi-cell weighing scale sensor for a given identifier.
|
static YMultiCellWeighScale |
FindMultiCellWeighScaleInContext(YAPIContext yctx,
String func)
Retrieves a multi-cell weighing scale sensor for a given identifier in a YAPI context.
|
static YMultiCellWeighScale |
FirstMultiCellWeighScale()
Starts the enumeration of multi-cell weighing scale sensors currently accessible.
|
static YMultiCellWeighScale |
FirstMultiCellWeighScaleInContext(YAPIContext yctx)
Starts the enumeration of multi-cell weighing scale sensors currently accessible.
|
int |
get_cellCount()
Returns the number of load cells in use.
|
String |
get_command() |
double |
get_compensation()
Returns the current current thermal compensation value.
|
double |
get_compTempAvg()
Returns the current averaged temperature, used for thermal compensation.
|
double |
get_compTempChg()
Returns the current temperature variation, used for thermal compensation.
|
int |
get_excitation()
Returns the current load cell bridge excitation method.
|
int |
get_externalSense()
Returns true if entry 4 is used as external sense for 6-wires load cells.
|
double |
get_tempAvgAdaptRatio()
Returns the averaged temperature update rate, in per mille.
|
double |
get_tempChgAdaptRatio()
Returns the temperature change update rate, in per mille.
|
double |
get_zeroTracking()
Returns the zero tracking threshold value.
|
int |
getCellCount()
Returns the number of load cells in use.
|
double |
getCompensation()
Returns the current current thermal compensation value.
|
double |
getCompTempAvg()
Returns the current averaged temperature, used for thermal compensation.
|
double |
getCompTempChg()
Returns the current temperature variation, used for thermal compensation.
|
int |
getExcitation()
Returns the current load cell bridge excitation method.
|
int |
getExternalSense()
Returns true if entry 4 is used as external sense for 6-wires load cells.
|
double |
getTempAvgAdaptRatio()
Returns the averaged temperature update rate, in per mille.
|
double |
getTempChgAdaptRatio()
Returns the temperature change update rate, in per mille.
|
double |
getZeroTracking()
Returns the zero tracking threshold value.
|
YMultiCellWeighScale |
nextMultiCellWeighScale()
Continues the enumeration of multi-cell weighing scale sensors started using yFirstMultiCellWeighScale().
|
int |
registerTimedReportCallback(YMultiCellWeighScale.TimedReportCallback callback)
Registers the callback function that is invoked on every periodic timed notification.
|
int |
registerValueCallback(YMultiCellWeighScale.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
set_cellCount(int newval)
Changes the number of load cells in use.
|
int |
set_command(String newval) |
int |
set_excitation(int newval)
Changes the current load cell bridge excitation method.
|
int |
set_externalSense(int newval)
Changes the configuration to tell if entry 4 is used as external sense for
6-wires load cells.
|
int |
set_tempAvgAdaptRatio(double newval)
Changes the averaged temperature update rate, in per mille.
|
int |
set_tempChgAdaptRatio(double newval)
Changes the temperature change update rate, in per mille.
|
int |
set_unit(String newval)
Changes the measuring unit for the weight.
|
int |
set_zeroTracking(double newval)
Changes the zero tracking threshold value.
|
int |
setCellCount(int newval)
Changes the number of load cells in use.
|
int |
setExcitation(int newval)
Changes the current load cell bridge excitation method.
|
int |
setExternalSense(int newval)
Changes the configuration to tell if entry 4 is used as external sense for
6-wires load cells.
|
int |
setTempAvgAdaptRatio(double newval)
Changes the averaged temperature update rate, in per mille.
|
int |
setTempChgAdaptRatio(double newval)
Changes the temperature change update rate, in per mille.
|
int |
setUnit(String newval)
Changes the measuring unit for the weight.
|
int |
setupSpan(double currWeight,
double maxWeight)
Configures the load cells span parameters (stored in the corresponding genericSensors)
so that the current signal corresponds to the specified reference weight.
|
int |
setZeroTracking(double newval)
Changes the zero tracking threshold value.
|
int |
tare()
Adapts the load cell signal bias (stored in the corresponding genericSensor)
so that the current signal corresponds to a zero weight.
|
_applyCalibration, _decodeAvg, _decodeTimedReport, _decodeVal, _encodeCalibrationPoints, _parserHelper, calibrateFromPoints, FindSensor, FindSensorInContext, FirstSensor, FirstSensorInContext, get_advMode, get_calibrationParam, get_currentRawValue, get_currentValue, get_dataLogger, get_highestValue, get_logFrequency, get_lowestValue, get_recordedData, get_reportFrequency, get_resolution, get_sensorState, get_unit, getAdvMode, getCurrentRawValue, getCurrentValue, getHighestValue, getLogFrequency, getLowestValue, getReportFrequency, getResolution, getSensorState, getUnit, isSensorReady, loadCalibrationPoints, nextSensor, registerTimedReportCallback, registerValueCallback, set_advMode, set_calibrationParam, set_highestValue, set_logFrequency, set_lowestValue, set_reportFrequency, set_resolution, setAdvMode, setHighestValue, setLogFrequency, setLowestValue, setReportFrequency, setResolution, startDataLogger, stopDataLogger
_AddToCache, _clearDataStreamCache, _download, _escapeAttr, _FindFromCache, _FindFromCacheInContext, _get_json_path_struct, _get_json_path, _json_get_array, _json_get_key, _json_get_string, _parse, _setAttr, _throw, _UpdateTimedReportCallbackList, _UpdateValueCallbackList, _upload, _upload, _uploadEx, clearCache, describe, errMessage, errorMessage, errorType, errType, FindFunction, FindFunctionInContext, FirstFunction, FirstFunctionInContext, functionDescriptor, get_advertisedValue, get_errorMessage, get_errorType, get_friendlyName, get_functionDescriptor, get_functionId, get_hardwareId, get_logicalName, get_module, get_serialNumber, get_userData, getAdvertisedValue, getErrorMessage, getErrorType, getFriendlyName, getFunctionDescriptor, getFunctionId, getHardwareId, getLogicalName, getModule, getUserData, isOnline, isReadOnly, load, loadAttribute, module, muteValueCallbacks, nextFunction, registerValueCallback, set_advertisedValue, set_logicalName, set_userData, setLogicalName, setUserData, toString, unmuteValueCallbacks, userData
public static final int CELLCOUNT_INVALID
public static final int EXTERNALSENSE_FALSE
public static final int EXTERNALSENSE_TRUE
public static final int EXTERNALSENSE_INVALID
public static final int EXCITATION_OFF
public static final int EXCITATION_DC
public static final int EXCITATION_AC
public static final int EXCITATION_INVALID
public static final double TEMPAVGADAPTRATIO_INVALID
public static final double TEMPCHGADAPTRATIO_INVALID
public static final double COMPTEMPAVG_INVALID
public static final double COMPTEMPCHG_INVALID
public static final double COMPENSATION_INVALID
public static final double ZEROTRACKING_INVALID
public static final String COMMAND_INVALID
protected int _cellCount
protected int _externalSense
protected int _excitation
protected double _tempAvgAdaptRatio
protected double _tempChgAdaptRatio
protected double _compTempAvg
protected double _compTempChg
protected double _compensation
protected double _zeroTracking
protected String _command
protected YMultiCellWeighScale.UpdateCallback _valueCallbackMultiCellWeighScale
protected YMultiCellWeighScale.TimedReportCallback _timedReportCallbackMultiCellWeighScale
protected YMultiCellWeighScale(YAPIContext ctx, String func)
func
- : functionidprotected YMultiCellWeighScale(String func)
func
- : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) throws Exception
_parseAttr
in class YSensor
Exception
public int set_unit(String newval) throws YAPI_Exception
newval
- : a string corresponding to the measuring unit for the weightYAPI_Exception
- on errorpublic int setUnit(String newval) throws YAPI_Exception
newval
- : a string corresponding to the measuring unit for the weightYAPI_Exception
- on errorpublic int get_cellCount() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getCellCount() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_cellCount(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the number of load cells in useYAPI_Exception
- on errorpublic int setCellCount(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the number of load cells in useYAPI_Exception
- on errorpublic int get_externalSense() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getExternalSense() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_externalSense(int newval) throws YAPI_Exception
newval
- : either YMultiCellWeighScale.EXTERNALSENSE_FALSE or
YMultiCellWeighScale.EXTERNALSENSE_TRUE, according to the configuration to tell if entry 4 is used
as external sense for
6-wires load cellsYAPI_Exception
- on errorpublic int setExternalSense(int newval) throws YAPI_Exception
newval
- : either YMultiCellWeighScale.EXTERNALSENSE_FALSE or
YMultiCellWeighScale.EXTERNALSENSE_TRUE, according to the configuration to tell if entry 4 is used
as external sense for
6-wires load cellsYAPI_Exception
- on errorpublic int get_excitation() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getExcitation() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_excitation(int newval) throws YAPI_Exception
newval
- : a value among YMultiCellWeighScale.EXCITATION_OFF,
YMultiCellWeighScale.EXCITATION_DC and YMultiCellWeighScale.EXCITATION_AC corresponding to the
current load cell bridge excitation methodYAPI_Exception
- on errorpublic int setExcitation(int newval) throws YAPI_Exception
newval
- : a value among YMultiCellWeighScale.EXCITATION_OFF,
YMultiCellWeighScale.EXCITATION_DC and YMultiCellWeighScale.EXCITATION_AC corresponding to the
current load cell bridge excitation methodYAPI_Exception
- on errorpublic int set_tempAvgAdaptRatio(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the averaged temperature update rate, in per milleYAPI_Exception
- on errorpublic int setTempAvgAdaptRatio(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the averaged temperature update rate, in per milleYAPI_Exception
- on errorpublic double get_tempAvgAdaptRatio() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getTempAvgAdaptRatio() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_tempChgAdaptRatio(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the temperature change update rate, in per milleYAPI_Exception
- on errorpublic int setTempChgAdaptRatio(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the temperature change update rate, in per milleYAPI_Exception
- on errorpublic double get_tempChgAdaptRatio() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getTempChgAdaptRatio() throws YAPI_Exception
YAPI_Exception
- on errorpublic double get_compTempAvg() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getCompTempAvg() throws YAPI_Exception
YAPI_Exception
- on errorpublic double get_compTempChg() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getCompTempChg() throws YAPI_Exception
YAPI_Exception
- on errorpublic double get_compensation() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getCompensation() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_zeroTracking(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the zero tracking threshold valueYAPI_Exception
- on errorpublic int setZeroTracking(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the zero tracking threshold valueYAPI_Exception
- on errorpublic double get_zeroTracking() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getZeroTracking() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_command() throws YAPI_Exception
YAPI_Exception
public int set_command(String newval) throws YAPI_Exception
YAPI_Exception
public static YMultiCellWeighScale FindMultiCellWeighScale(String func)
func
- : a string that uniquely characterizes the multi-cell weighing scale sensor, for instance
YWMBRDG1.multiCellWeighScale.public static YMultiCellWeighScale FindMultiCellWeighScaleInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the multi-cell weighing scale sensor, for instance
YWMBRDG1.multiCellWeighScale.public int registerValueCallback(YMultiCellWeighScale.UpdateCallback callback)
callback
- : the callback function to call, or a null pointer. The callback function should take two
arguments: the function object of which the value has changed, and the character string describing
the new advertised value.public int _invokeValueCallback(String value)
_invokeValueCallback
in class YSensor
public int registerTimedReportCallback(YMultiCellWeighScale.TimedReportCallback callback)
callback
- : the callback function to call, or a null pointer. The callback function should take two
arguments: the function object of which the value has changed, and an YMeasure object describing
the new advertised value.public int _invokeTimedReportCallback(YMeasure value)
_invokeTimedReportCallback
in class YSensor
public int tare() throws YAPI_Exception
YAPI_Exception
- on errorpublic int setupSpan(double currWeight, double maxWeight) throws YAPI_Exception
currWeight
- : reference weight presently on the load cell.maxWeight
- : maximum weight to be expected on the load cell.YAPI_Exception
- on errorpublic YMultiCellWeighScale nextMultiCellWeighScale()
public static YMultiCellWeighScale FirstMultiCellWeighScale()
public static YMultiCellWeighScale FirstMultiCellWeighScaleInContext(YAPIContext yctx)
yctx
- : a YAPI context.Copyright © 2021. All rights reserved.