[r927]: / branches / develop / mqttsparkplug / mqttsparkplug / Sparkplug™ MQTT edge and host / Function Blocks / FB_Metric / FB_Property / IValue / Int8 / 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:
		Int8 := TO_SINT( _Ulint );
	PropertyDataType.Float,
	PropertyDataType.Double:
		Int8 := TO_SINT( _lReal );
	PropertyDataType.String_,
	PropertyDataType.Text:
		Int8 := TO_SINT( _wString );
ELSE
		Int8 := 0;
END_CASE