C# Mine
ContentsIndexHome
PreviousUpNext
UltrasonicRangerIndustrialBase.SensorEdit Method

Allows for the update of the specific type of sensor.

Syntax
C#
public static void SensorEdit(ISensor sens, double? heartBeat, double? awareStateHeartBeat, int? assessmentsPerHeartBeat, double? minimumThreshold, double? maximumThreshold, double? Hysteresis, int? offset, int? tolerance, int? delayTime, int? mode, bool? averageData, int? failedTransmissionsBeforeLinkMode);
Parameters 
Description 
ISensor sens 
sens the Sensor object to be updated  
double? heartBeat 
How often the sensor communicates with the gateway if no activity recorded. 
double? awareStateHeartBeat 
How often the sensor communicates with the gateway while in Aware State. 
int? assessmentsPerHeartBeat 
How many times between heartbeats a sensor will check its measurements against its thresholds to determine whether it will enter the Aware State. Warning if your sensor firmware is less than 2.5.2.0 Setting assessments greater than one will cause this sensor to not self elect follow a gateway to a new channel. if you reform your gateway you will need to power cycle the sensor for it to link on a new channel. 
double? minimumThreshold 
Any assessments below this Centimeter value will cause the sensor to enter the Aware State. 
double? maximumThreshold 
Any assessments above this Centimeter value will cause the sensor to enter the Aware State. 
double? Hysteresis 
A buffer to prevent the sensor from bouncing between Standard Operation and Aware State when the assessments are very close to a threshold. For example, if a Maximum threshold is set to 90 Centimeters and a Hysteresis of 1 Centimeter, then once the sensor takes an assessment of 90 Centimeter and enters the Aware State it will remain in the Aware state until the readings drop to 89 Centimeters similarly, at the minimum threshold the reading will have to rise a Centimeter above the threshold to return to Standard Operation. 
int? offset 
Adjusts sensor distance by this number of cm. 
int? tolerance 
Three consecutive readings per assessment must be within this number of cm of each other or the sensor indicates unstable via STS = 8. 
int? delayTime 
Amount of time to wait after turning on the ultrasonic element before taking readings. 
int? mode 
Determines what measurement type is presented as the primary readings. Delta Controlled Local Mean = 0, Min = 1, Mean = 2, Max = 3, Median = 4, Mode = 5 
bool? averageData 
If on, the data presented will use all valid readings from all assessments that take place between heartbeats. Otherwise the data presented will be calculated from the most recent measurement. If using assessments it is recommended that this is turned on. Delta Controlled Local Mean is only calculated from the most recent data regardless of this setting. 
int? failedTransmissionsBeforeLinkMode 
The number of transmissions the sensor sends without response from a gateway before it goes to battery saving link mode. In link mode the sensor will scan for a new gateway and if not found will enter battery saving sleep mode for 2 hours before trying to scan again. Lower number will allow sensors to find new gateways with fewer missed readings. Higher numbers will cause the sensor to hold it setting in a noisy RF environment better. (Zero will cause the sensor to never enter link mode. to find a new gateway channel the battery will have to be cycled out of the sensor.) 
Copyright (c) 2017. All rights reserved.
What do you think about this topic? Send feedback!