Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]Provide blocking information in Cylinders if suspend methods are called more than once. #760

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@

<RowDefinition />
</Grid.RowDefinitions>
<GroupBox Grid.ColumnSpan="2" Margin="10,0" Padding="10" Header="{x:Static p:strings.Tasks}" >
<GroupBox Grid.ColumnSpan="2" Margin="10,0" Padding="10" Header="{x:Static p:strings.Tasks}"
Visibility="{Binding HasTasks,Converter={tcoCore:BooleanToVisibilityConverter}}">
<ItemsControl ItemsPanel="{StaticResource HorizontalWraped}" HorizontalAlignment="Left" ItemsSource="{Binding Tasks}">

<ItemsControl.ItemTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ public bool HasComponents
get { return Components.Count()>0; }
}


public bool HasTask
{
get { return Tasks.Count() > 0; }
}

public object StatusControl
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ VAR
increment: INT;
_suspendedHome:BOOL;
_suspendedWork:BOOL;
{attribute 'hide'}
_suspendedHomeCounter:INT;
{attribute 'hide'}
_suspendedWorkCounter:INT;
END_VAR
VAR
_config : TcoCylinderConfig;
Expand All @@ -23,6 +27,8 @@ VAR
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[SUPER^(inoAtHomePos := inoAtHomePos, inoAtWorkPos := inoAtWorkPos, inoToHomePos := inoToHomePos, inoToWorkPos := inoToWorkPos);
_suspendedHomeCounter:=0;
_suspendedWorkCounter:=0;


IF(_atHomePos AND _atWorkPos) THEN Messenger.Error('<#Home and work position sensors are both active. Check the position of sensors!#>'); END_IF;
Expand Down Expand Up @@ -309,7 +315,10 @@ VAR
_signalInfo : TcoSignalInfo;
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[_suspendedHome:=inoDisableCondition;
<ST><![CDATA[IF inoDisableCondition THEN
_suspendedHomeCounter:=_suspendedHomeCounter+1;
END_IF
_suspendedHome:=_suspendedHomeCounter>0;

IF (_toHomePos OR _moveHomeDefault.Busy) AND inoDisableCondition THEN
_signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition));
Expand All @@ -328,7 +337,10 @@ VAR_INPUT
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[_suspendedHome:=inDisableCondition;
<ST><![CDATA[IF inDisableCondition THEN
_suspendedHomeCounter:=_suspendedHomeCounter+1;
END_IF
_suspendedHome:=_suspendedHomeCounter>0;

IF (_toHomePos OR _moveHomeDefault.Busy) AND inDisableCondition THEN
Messenger.Warning(CONCAT('<#Movement suspended due to#> : ' , inMessage));
Expand Down Expand Up @@ -366,7 +378,10 @@ VAR
_signalInfo : TcoSignalInfo;
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[_suspendedHome:=inoDisableCondition;
<ST><![CDATA[IF inoDisableCondition THEN
_suspendedHomeCounter:=_suspendedHomeCounter+1;
END_IF
_suspendedHome:=_suspendedHomeCounter>0;

IF (_toHomePos OR _moveHomeDefault.Busy) AND not inoDisableCondition THEN
_signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition));
Expand Down Expand Up @@ -405,7 +420,11 @@ VAR
_signalInfo : TcoSignalInfo;
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[_suspendedWork:=inoDisableCondition;
<ST><![CDATA[IF inoDisableCondition THEN
_suspendedWorkCounter:=_suspendedWorkCounter+1;
END_IF
_suspendedWork:=_suspendedWorkCounter>0;

IF (_toWorkPos OR _moveWorkDefault.Busy) AND inoDisableCondition THEN
_signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition));
Messenger.Warning(CONCAT('<#Movement suspended due to#> : ' , _signalInfo.SymbolPath));
Expand All @@ -423,7 +442,10 @@ VAR_INPUT
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[_suspendedWork := inDisableCondition;
<ST><![CDATA[IF inDisableCondition THEN
_suspendedWorkCounter:=_suspendedWorkCounter+1;
END_IF
_suspendedWork:=_suspendedWorkCounter>0;

IF (_toWorkPos OR _moveWorkDefault.Busy) AND inDisableCondition THEN
Messenger.Warning(CONCAT('<#Movement suspended due to#> : ', inMessage));
Expand Down Expand Up @@ -463,7 +485,10 @@ VAR
_signalInfo : TcoSignalInfo;
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[_suspendedWork := inoDisableCondition;
<ST><![CDATA[IF inoDisableCondition THEN
_suspendedWorkCounter:=_suspendedWorkCounter+1;
END_IF
_suspendedWork:=_suspendedWorkCounter>0;

IF (_toWorkPos OR _moveWorkDefault.Busy) AND not inoDisableCondition THEN
_signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ VAR
increment : INT;
_suspendedHome : BOOL;
_suspendedWork : BOOL;

{attribute 'hide'}
_suspendedHomeCounter:INT;
{attribute 'hide'}
_suspendedWorkCounter:INT;
END_VAR
VAR
_config : TcoCylinderConfig;
Expand All @@ -24,7 +27,8 @@ VAR
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[SUPER^(inoAtHomePos1 := inoAtHomePos1,inoAtHomePos2 := inoAtHomePos2, inoAtWorkPos1 := inoAtWorkPos1,inoAtWorkPos2 := inoAtWorkPos2, inoToHomePos := inoToHomePos, inoToWorkPos := inoToWorkPos);

_suspendedHomeCounter:=0;
_suspendedWorkCounter:=0;

IF(_atHomePos AND _atWorkPos) THEN Messenger.Error('<#Home and work position sensors are both active. Check the position of sensors!#>'); END_IF;

Expand Down Expand Up @@ -308,7 +312,10 @@ VAR
_signalInfo : TcoSignalInfo;
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[_suspendedHome:=inoDisableCondition;
<ST><![CDATA[IF inoDisableCondition THEN
_suspendedHomeCounter:=_suspendedHomeCounter+1;
END_IF
_suspendedHome:=_suspendedHomeCounter>0;

IF (_toHomePos OR _moveHomeDefault.Busy) AND inoDisableCondition THEN
_signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition));
Expand All @@ -328,8 +335,10 @@ VAR_INPUT
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[_suspendedHome := inDisableCondition;

<ST><![CDATA[IF inDisableCondition THEN
_suspendedHomeCounter:=_suspendedHomeCounter+1;
END_IF
_suspendedHome:=_suspendedHomeCounter>0;
IF (_toHomePos OR _moveHomeDefault.Busy) AND inDisableCondition THEN
Messenger.Warning(CONCAT('<#Movement suspended due to#> : ', inMessage));
_toHomePos := FALSE;
Expand Down Expand Up @@ -369,7 +378,10 @@ VAR
_signalInfo : TcoSignalInfo;
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[_suspendedHome := inoDisableCondition;
<ST><![CDATA[IF inoDisableCondition THEN
_suspendedHomeCounter:=_suspendedHomeCounter+1;
END_IF
_suspendedHome:=_suspendedHomeCounter>0;

IF (_toHomePos OR _moveHomeDefault.Busy) AND NOT inoDisableCondition THEN
_signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition));
Expand Down Expand Up @@ -411,7 +423,10 @@ VAR
_signalInfo : TcoSignalInfo;
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[_suspendedWork := inoDisableCondition;
<ST><![CDATA[IF inoDisableCondition THEN
_suspendedWorkCounter:=_suspendedWorkCounter+1;
END_IF
_suspendedWork:=_suspendedWorkCounter>0;

IF (_toWorkPos OR _moveWorkDefault.Busy) AND inoDisableCondition THEN
_signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition));
Expand All @@ -436,7 +451,10 @@ VAR
inoDisableCondition: BOOL;
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[_suspendedWork := inDisableCondition;
<ST><![CDATA[IF inDisableCondition THEN
_suspendedWorkCounter:=_suspendedWorkCounter+1;
END_IF
_suspendedWork:=_suspendedWorkCounter>0;

IF (_toWorkPos OR _moveWorkDefault.Busy) AND inDisableCondition THEN
Messenger.Warning(CONCAT('<#Movement suspended due to#> : ', inMessage));
Expand Down Expand Up @@ -477,7 +495,10 @@ VAR
_signalInfo : TcoSignalInfo;
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[_suspendedWork := inoDisableCondition;
<ST><![CDATA[IF inoDisableCondition THEN
_suspendedWorkCounter:=_suspendedWorkCounter+1;
END_IF
_suspendedWork:=_suspendedWorkCounter>0;

IF (_toWorkPos OR _moveWorkDefault.Busy) AND NOT inoDisableCondition THEN
_signalInfo.GetSignalInfo(SIZEOF(inoDisableCondition), ADR(inoDisableCondition));
Expand Down
Loading