[r927]: / branches / develop / mqttsparkplug / mqttsparkplug / Sparkplug™ MQTT edge and host / Function Blocks / FB_Metric / FB_Property / IValue / Double / Get / svnobj  Maximize  Restore  History

Download this file

26 lines (25 with data), 2.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
VAR
END_VAR
IsGet
CASE _dataType OF
	PropertyDataType.Unknown,
	PropertyDataType.Int8,
	PropertyDataType.Int16,
	PropertyDataType.Int32,
	PropertyDataType.Int64,
	PropertyDataType.UInt8,
	PropertyDataType.UInt16,
	PropertyDataType.UInt32,
	PropertyDataType.UInt64,
	PropertyDataType.Boolean,
	PropertyDataType.DateTime:
		Double :=  TO_LREAL( _Ulint );
	PropertyDataType.Float,
	PropertyDataType.Double:
		Double := _lReal ;
	PropertyDataType.String_,
	PropertyDataType.Text:
		Double := TO_LREAL( _wString );
ELSE
		Double := 0;
END_CASE