Commit eea5b51d authored by Jörg Weingrill's avatar Jörg Weingrill
Browse files

Production changes and improvements, added influxdb

GVL_Dome: stop added for future implementation, added FB_influxdb
added F_MeanDIrection (unused),
parent b036d4e1
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<GVL Name="GVL_Dome" Id="{8410bcc3-97cb-4334-927b-71c02664ab1a}"> <GVL Name="GVL_Dome" Id="{8410bcc3-97cb-4334-927b-71c02664ab1a}">
<Declaration><![CDATA[{attribute 'qualified_only'} <Declaration><![CDATA[{attribute 'qualified_only'}
VAR_GLOBAL VAR_GLOBAL
Dauer AT%Q*: BOOL; //Dauer AT%Q*: BOOL;
Clockwise AT%Q*: BOOL; Clockwise AT%Q*: BOOL;
CounterClockwise AT%Q*: BOOL; CounterClockwise AT%Q*: BOOL;
// EL5151 // EL5151
...@@ -20,6 +20,7 @@ VAR_GLOBAL ...@@ -20,6 +20,7 @@ VAR_GLOBAL
ShutterClosed: BOOL; ShutterClosed: BOOL;
FlapOpened: BOOL; FlapOpened: BOOL;
FlapClosed: BOOL; FlapClosed: BOOL;
Stop: BOOL;
DomeAxisRef: AXIS_REF; DomeAxisRef: AXIS_REF;
END_VAR]]></Declaration> END_VAR]]></Declaration>
</GVL> </GVL>
......
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.0">
<POU Name="FB_influxdb" Id="{1fea41b1-e692-4070-bc8f-e6709f9f4692}" SpecialFunc="None">
<Declaration><![CDATA[FUNCTION_BLOCK FB_influxdb
VAR_INPUT
// Process is started at rising edge
Trigger: BOOL;
// table,e.g. thermocontrol
table: STRING;
//e.g. dewar_pressure=1e-5, ...
measurements: STRING;
timeout: TIME := T#6S;
END_VAR
VAR_OUTPUT
Busy: BOOL;
Error: BOOL;
ErrorID: UDINT;
END_VAR
VAR
curl: NT_StartProcess;
arguments: STRING := '';
END_VAR
VAR CONSTANT
prefix: STRING(100) := '-i -XPOST "http://192.168.7.206:8086/write?db=bmkdb&precision=s" --connect-timeout 3 --data-binary ';
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[//curl -i -XPOST "http://192.168.7.206:8086/write?db=bmkdb&precision=s" --data-binary 'thermocontrol ...'
arguments := CONCAT('"', table);
arguments := CONCAT(arguments, ' ');
arguments := CONCAT(arguments, measurements);
arguments := CONCAT(arguments, '"');
curl(NETID := '',
PATHSTR := 'C:\bin\curl-7.65.3-win32-mingw\bin\curl.exe',
DIRNAME := 'C:\bin\curl-7.65.3-win32-mingw\bin',
COMNDLINE:= CONCAT(prefix, arguments),
START := Trigger,
TMOUT := timeout,
BUSY => Busy,
ERR => Error,
ERRID => ErrorID);
]]></ST>
</Implementation>
<LineIds Name="FB_influxdb">
<LineId Id="9" Count="0" />
<LineId Id="59" Count="3" />
<LineId Id="35" Count="0" />
<LineId Id="37" Count="3" />
<LineId Id="43" Count="0" />
<LineId Id="48" Count="0" />
<LineId Id="50" Count="1" />
<LineId Id="41" Count="0" />
</LineIds>
</POU>
</TcPlcObject>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment