Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bmk10k
telescope_firmware
Commits
636d0c11
Commit
636d0c11
authored
Feb 03, 2020
by
Jörg Weingrill
Browse files
Added DomeComeError
parent
1874ba1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
BMK10k/BMK10kRuntime/POUs/DomeControl.TcPOU
View file @
636d0c11
...
...
@@ -3,7 +3,7 @@
<POU
Name=
"DomeControl"
Id=
"{0e02434d-920e-4c0f-81fc-5ff7d5573875}"
SpecialFunc=
"None"
>
<Declaration>
<![CDATA[PROGRAM DomeControl
VAR
DomeAxis: FB_Axis;
DomeAxis: FB_
Modulo
Axis;
fbWriteReq: ADSWRITE := ( NETID := '5.66.134.133.1.1', PORT := 851, TMOUT := DEFAULT_ADS_TIMEOUT );
fbReadReq: ADSREAD := ( NETID := '5.66.134.133.1.1', PORT := 851, TMOUT := DEFAULT_ADS_TIMEOUT );
DomeLog: FB_Eventlog;
...
...
@@ -14,8 +14,10 @@ VAR
DomeState: WORD := 0;
ReadCycle: BOOL;
Azimuth_set,
Azimuth_current: LREAL;
Azimuth_current,
Azimuth_old: LREAL;
move_azimuth, stop_azimuth: BOOL;
DomeCommError: TON;
END_VAR
]]>
</Declaration>
<Implementation>
...
...
@@ -34,16 +36,15 @@ END_IF
*)
DomeAxis(bPowerEnable := TRUE,
bEnable_Positive := Azimuth_current
<
360.0,
bEnable_Negative := Azimuth_current >= 0.0,
bMoveAbsExec := ABS(Azimuth_set - Azimuth_current) > 1.0, //ConvertEnvironment.WindSpeed > 15.0,
fMoveAbsPos := Azimuth_set,
fMoveAbsVelo := 3.0,
bStop := stop_azimuth,
bMoveModExec := (Azimuth_set
<
> Azimuth_old) OR move_azimuth, //ConvertEnvironment.WindSpeed > 15.0,
fMoveModPos := Azimuth_set,
fMoveModVelo := 3.0,
bHalt := stop_azimuth,
fActPos => Azimuth_current,
stAxis := GVL_Dome.DomeAxisRef);
Azimuth_old := Azimuth_set;
stop_azimuth := FALSE;
IF ReadCycle THEN
IF NOT bBusy THEN
...
...
@@ -95,7 +96,9 @@ ELSE // WriteCycle
END_IF
DomeLog(Trigger := bError,
DomeCommError(IN := bError, PT := T#30S);
DomeLog(Trigger := DomeCommError.Q,
Level := ADSLOG_MSGTYPE_ERROR,
OnMessage := 'Dome communication error',
OffMessage := 'Dome communiaction re-established',
...
...
@@ -112,11 +115,13 @@ DomeLog(Trigger := bError,
<LineId
Id=
"312"
Count=
"1"
/>
<LineId
Id=
"289"
Count=
"0"
/>
<LineId
Id=
"365"
Count=
"0"
/>
<LineId
Id=
"291"
Count=
"3"
/>
<LineId
Id=
"291"
Count=
"0"
/>
<LineId
Id=
"294"
Count=
"0"
/>
<LineId
Id=
"296"
Count=
"2"
/>
<LineId
Id=
"307"
Count=
"0"
/>
<LineId
Id=
"305"
Count=
"0"
/>
<LineId
Id=
"329"
Count=
"1"
/>
<LineId
Id=
"385"
Count=
"0"
/>
<LineId
Id=
"189"
Count=
"0"
/>
<LineId
Id=
"192"
Count=
"4"
/>
<LineId
Id=
"269"
Count=
"0"
/>
...
...
@@ -141,6 +146,8 @@ DomeLog(Trigger := bError,
<LineId
Id=
"237"
Count=
"1"
/>
<LineId
Id=
"236"
Count=
"0"
/>
<LineId
Id=
"191"
Count=
"0"
/>
<LineId
Id=
"405"
Count=
"0"
/>
<LineId
Id=
"404"
Count=
"0"
/>
<LineId
Id=
"275"
Count=
"0"
/>
<LineId
Id=
"154"
Count=
"0"
/>
<LineId
Id=
"346"
Count=
"3"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment