Skip to content

Questions regarding time #192

Answered by sagatowski
sagatowski asked this question in Q&A
Jul 4, 2022 · 2 comments · 12 replies
Discussion options

You must be logged in to vote

For 1:
Simply create a TON and once the TON has triggered, simply evaluate (assert) the output.
So simply something like

fbTon : TON := (PT := T#10S);
fbTestBlock : FB_YourBlockUnderTest;
---
TEST('HelloWorld');
fbTon(IN := TRUE);
IF fbTon.Q THEN
    AssertEquals(Expected := TRUE,
                         Actual := fbTestBlock.bBool,
                         Message := 'Not Matching');
END_IF
TEST_FINISHED();

For 2: The only two ways are RUN_IN_SEQUENCE() or by using this way.
You could also run TEST_ORDERED() and simply add a TON at the end of the test to delay the output of the test. Please see this.

Replies: 2 comments 12 replies

Comment options

sagatowski
Jul 4, 2022
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by sagatowski
Comment options

You must be logged in to vote
12 replies
@sagatowski
Comment options

sagatowski Feb 2, 2024
Maintainer Author

@bumbasor
Comment options

@sagatowski
Comment options

sagatowski Feb 2, 2024
Maintainer Author

@bumbasor
Comment options

@sagatowski
Comment options

sagatowski Feb 2, 2024
Maintainer Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants