Using Fast As Possible (TC1702)

If the TwinCAT 3 Usermode Runtime is configured accordingly, the "Fast As Possible" interface can be used to instruct the execution environment not to use delays in order to map a real execution speed. Instead, the next cycle is started immediately after the program has been processed.

In return, this also means that the computer is loaded accordingly. To ensure that this remains available, it is recommended to have at least one more core than there are tasks in the project.

Use

The TwinCAT 3 Usermode Runtime must be called with the command line parameter "-f 0x4". The easiest way to achieve this is to extend the corresponding Start.bat in the ProgramData:
start "%TC_INST_NAME%" /min "%TWINCAT3DIR%Runtimes\bin\TcSystemServiceUm.exe" -t bin -i path -n %TC_INST_NAME% -c .\3.1 -f 0x4

This enables the functionality of switching between the modes described below.

If this mode is set to the value RtMode_FastAsPossible via the ITcRTimeSimulation interface, the code is executed as quickly as possible without delays.

The application can return to cyclic execution by setting the value RtMode_Cyclic using ITcRTimeSimulation->ChangeTickMode.

The documentation for this is shown in the chapter API as well as in the sample.