Skip to content

Commit 7c81e43

Browse files
authored
Merge pull request #1 from simatic-ax/create-new-feature
Create new feature
2 parents 6ac29be + a122460 commit 7c81e43

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/ProcessControl/ProcessHandling.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ NAMESPACE Simatic.Ax.Process
4747
/// edge of the machine clock.
4848
METHOD PROTECTED ProcessFinished : BOOL
4949

50-
IF (machineClock.QRis() AND _processStarted) THEN
50+
IF (machineClock.QFal() AND _processStarted) THEN
5151
ProcessFinished := TRUE;
5252
_processStarted := FALSE;
5353
RETURN;

test/Process/TestProcess.st

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ NAMESPACE Simatic.Ax.Process
1010
p : ProcessHandler;
1111
pStateLess : ProcessHandler;
1212
risingSignalMock : BinSignalRisingEdgeMock;
13-
fallingSignalMock : BinSignalRisingEdgeMock;
13+
fallingSignalMock : BinSignalFallingEdgeMock;
1414
END_VAR
1515

1616
{TestSetup}
@@ -19,9 +19,9 @@ NAMESPACE Simatic.Ax.Process
1919
p.TimeProvider := timeProvider;
2020
END_METHOD
2121

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

0 commit comments

Comments
 (0)