beautypg.com

Program module for sensorcue – CUE sensorCUE-W User Manual

Page 10

background image

6. Program module for sensorCUE


For easier programming you can use the module sensorCUE.csm. You can find it on the CUE
Application CD in folder XPL Drivers and Modules. This module is also compatible with sensorCUE-W.

This module has two functions:

Public Function GetTemperature (PanelAddress As Word, ByRef TemperatureAsText As String) As
Integer

GetTemperature
returns current temperature measured in 1/10 degrees of Celsius as integer value (it

allows negative values). Returned values are -200 (-20

°C) to 500 (+50 °C). The first parameter is the

panel address of sensorCUE-W, the second parameter is string, where temperature value will be
stored as string (“-20.0” to “+50.0”)

Example:

Declarations:
Public TemperatureInt As Integer
Public TemperatureString As String *10

Program:
TemperatureInt = GetTemperature(38, TemperatureString)

This command has assigned the temperature from sensorCUE-W (with the address 38) to the

TemperatureInt variable. If current temperature is for example +23.5

°C, in TemperatureInt variable

will be value 235. In string TemperatureString will be value “+23.5”.

Public Function GetLight(PanelAddress As Word) As Word

GetLight returns current lighting level as a word value. Returned values are 1 (straight full light) to cca
30000 (dark).

Example:

Declarations:
Public LightLevel As Word

Program:
LightLevel = GetLight(48)

This command has assigned the lighting level from sensorCUE-W (with the address 48) to the
LightLevel variable.

User Manual sensorCUE-W

www.cuesystem.com

Page 10 of 14