# LGF_ConvertSpeed (FC / 1.0.0)

Overview

Author: Siemens Industry Support

## Short description

This function converts a given speed value in another unit by using an appropriate mode

### Block Interface

| LGF_ConvertSpeed (FC) |
--- | --- | ---
Int |  |  | mode |  | Ret_Val |  |  | Real
Real |  |  | value |  | error |  |  | Bool
|  |  |  |  | status |  |  | Word

### Input parameter

Identifier | Data type | Description
--- | --- | ---
mode | Int | 1: MeterSecond_to_KilometerHour, 2: MeterSecond_to_Knot, 3: MeterSecond_to_MileHour, 4: KilometerHour_to_MeterSecond, 5: KilometerHour_to_Knot, 6: KilometerHour_to_MileHour, 7: Knot_to_MeterSecond, 8: Knot_to_KilometerHour, 9: Knot_to_MileHour, 10: MileHour_to_MeterSecond, 11: MileHour_to_KilometerHour, 12: MileHour_to_Knot
value | Real | Speed value to convert

### Output parameter

Identifier | Data type | Description
--- | --- | ---
Ret_Val | Real | converted speed result
error | Bool | if Error := True
status | Word | status code for error description

### Status & Error codes

Code / Value | Identifier / Description
--- | ---
16#8200 | ERR_WRONG_MODE Error: wrong mode selected, conversion do not exist

## Change log

Version & Date | Change description
--- | ---
| 1.0.0 | Siemens Industry Support
| 18.11.2025 | First released version