Skip to content

Commit

Permalink
Merge pull request #1 from simatic-ax/create-new-feature
Browse files Browse the repository at this point in the history
Create new feature
  • Loading branch information
sjuergen authored Mar 13, 2024
2 parents 6ac29be + a122460 commit 7c81e43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ProcessControl/ProcessHandling.st
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ NAMESPACE Simatic.Ax.Process
/// edge of the machine clock.
METHOD PROTECTED ProcessFinished : BOOL

IF (machineClock.QRis() AND _processStarted) THEN
IF (machineClock.QFal() AND _processStarted) THEN
ProcessFinished := TRUE;
_processStarted := FALSE;
RETURN;
Expand Down
8 changes: 4 additions & 4 deletions test/Process/TestProcess.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ NAMESPACE Simatic.Ax.Process
p : ProcessHandler;
pStateLess : ProcessHandler;
risingSignalMock : BinSignalRisingEdgeMock;
fallingSignalMock : BinSignalRisingEdgeMock;
fallingSignalMock : BinSignalFallingEdgeMock;
END_VAR

{TestSetup}
Expand All @@ -19,9 +19,9 @@ NAMESPACE Simatic.Ax.Process
p.TimeProvider := timeProvider;
END_METHOD

{Test}
METHOD PUBLIC Process_Finished_OnRisingEdgeOfMachineClock
p.machineClock := risingSignalMock;
{Test} // This test checks the finished process on falling edge of the next clock signal
METHOD PUBLIC Process_Finished_OnfallingEdgeOfMachineClock // change to falling edge
p.machineClock := fallingSignalMock;
p.Start();
AxUnit.Assert.Equal(actual := p.GetState(), expected := ProcessState#Fill);
p.Execute();
Expand Down

0 comments on commit 7c81e43

Please sign in to comment.