Count example
-
We're looking for an example showing how to count the number of times a task has iterated. We know this is possible using the REXLANG block, but it seems it should also be possible (and simpler) using the COUNT block. (We also want to use the nmax/Q option on the block.) I guess we need access to a rising edge that is triggered at the start of each block.
Or perhaps there is a predefined internal variable with the task count? That would also be convenient.
General comment: It would be nice to include at least one basic example for each entry in the Reference Manual (e.g., after the current text). It would also be nice to have your library of examples be accessible from the web.
(Or are they? I can't find them.) -
@bech Hi John,
There is the exec counter feature built into the REXYGEN diagnostics. And it is accessible via special signals. The example you are looking for is "0001 Special Signals", and the parameter is excnt.
Thanks for your comment. We are working on better interconnection between the Function block documentation and the Example library. For now, you can use search input within the Examples library to help you find the right example.
Let me know if it helped.
Kind Regards,
Tomas -
Hi Tomas,
Thank you for your quick and precise response -- this is precisely what I was looking for.