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]TcoCarousel doesnt continue if is not in position #624

Merged
Merged
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 @@ -26,6 +26,8 @@ VAR
_varInfo : __SYSTEM.VAR_INFO;
{attribute 'hide'}
_sb : TcoCore.StringBuilder;
_notInPositionMessage : TcoCore.TcoMessenger(THIS^);
END_VAR
]]></Declaration>
Expand Down Expand Up @@ -59,23 +61,28 @@ END_VAR
END_IF
IF _progress=1 THEN
Messenger.Info('<#Calulate next expected Id position#>');
inoStatus.ExpectedNextPosition := GetIdentifierAtPosition( inoConfig.NumberOfPositions,inoStatus.Positions);
Messenger.OnCondition(inoStatus.CurrentPosition=0 AND inoInPosition).Error('<#Incorrectly coded current position. Check configuration of code bits! #>').Pin();
IF inoStatus.CurrentPosition <> 0 AND inoInPosition THEN
_progress := 10;
END_IF;
_notInPositionMessage.OnCondition(NOT inoInPosition).Error('<#Rotatiting started , but table is not in default position! Acknowledge this alarm if you still want to turn! #>').Pin();
_progress:=10;
END_IF;
IF _progress=10 THEN
Messenger.Warning('<#Expecting table in position. #>');
IF inoInPosition THEN
Messenger.Info('<#Calulate next expected Id position#>');
IF inoStatus.CurrentPosition <> 0 THEN
inoStatus.ExpectedNextPosition := GetIdentifierAtPosition( inoConfig.NumberOfPositions,inoStatus.Positions);
END_IF;
_progress := _progress+10;
END_IF
Messenger.OnCondition(inoStatus.CurrentPosition=0 AND inoInPosition).Error('<#Incorrectly coded current position. Check configuration of code bits! #>').Pin();
IF inoStatus.CurrentPosition <> 0 AND inoInPosition THEN
_progress := 20;
ELSIF NOT _notInPositionMessage.Pinned THEN
_progress:=20;
_notInPositionMessage.UnPin();
END_IF;
END_IF;
IF _progress=20 THEN
Expand Down Expand Up @@ -231,6 +238,7 @@ METHOD Restore : ITcoRestorable]]></Declaration>
_progress := 0;
CallTimers(FALSE);
Messenger.UnPin();
_notInPositionMessage.UnPin();
]]></ST>
</Implementation>
</Method>
Expand Down
Loading