This function will create or modify a sensor on the display of the navigation unit.
Sensors are used to display information to the driver and has a log that can contain the last 24 updates. The sensor value and the log are available for the driver to access from the user interface.
The sensor data are text strings that can come from any source and does not necessarily have to be from an actual sensor.
Input:
id : INT
Unique ID to identify this sensor.
icon : INT (0..22, default: 0)
The icon of the sensor:
0
|
- No icon needed
|
1
|
- Driver Behavior
|
2
|
- Tire Pressure
|
3
|
- Temperature
|
4
|
- Door Ajar
|
5
|
- Vehicle Maintenance
|
6
|
- OBD-II Generic Sensor
|
7
|
- Generic Sensor 1
|
8
|
- Generic Sensor 2
|
9
|
- Generic Sensor 3
|
10
|
- No signal
|
11
|
- Day Hours counter
|
12
|
- Weekly Hours counter
|
13
|
- Rest Hours counter
|
14
|
- Break Hours counter
|
15
|
- Dispatcher Tasks
|
16
|
- Weight
|
17
|
- Information
|
18
|
- Fuel
|
19
|
- Available (EU symbol)
|
20
|
- Driving (EU symbol)
|
21
|
- Rest (EU symbol)
|
22
|
- Working (EU symbol)
|
index : INT (1..32767, default 1)
Used for sorting the sensors.
name : STRING
The name of the sensor. Max. 39 characters.
Returns: INT
0
|
- Success.
|
-1
|
- Navigation interface is not open.
|
-2
|
- Error communicating with navigation device.
|
-4
|
- The navigation device rejected the command.
|
-8
|
- Invalid parameter.
|
-10
|
- There is not space for any more sensors.
|
-11
|
- Sensor display is not supported.
|
-12
|
- Navigation interface is busy.
|
Declaration:
FUNCTION navSensorConfig : INT;
VAR_INPUT
ID : DINT;
icon : INT := 0;
index : INT := 0;
name : STRING;
END_VAR;
Example:
INCLUDE rtcu.inc
PROGRAM NavigationExample;
BEGIN
...
navSensorConfig(ID := 55, name := "Temperature", icon := 3);
...
navSensorUpdate(ID := 55, status := "40$B0C", log_status := TRUE, desc := "Hot");
...
END;
END_PROGRAM;
|