Usermode Runtime
The TF5100 TwinCAT 3 NCI function is partially supported (GST interpreter, PLC interpolation) by the TwinCAT 3 Usermode Runtime. The Classic interpreter is not supported.
GST interpreter
In addition to the general user mode runtime installation, the following packages must also be installed on the Usermode Runtime system in order to use the GST interpreter:
- TwinCAT.XARUM.NCPTP
- TwinCAT.XAR.NCI.GST
The GST interpreter is an ADS server which is started by the Usermode Runtime. To do this, the StartManConfig.xml file with the following content must be set up in the 3.1\Target directory of the Usermode Runtime (for example: C:\ProgramData\Beckhoff\TwinCAT\3.1\Runtimes\UmRT_Default\3.1\Target) once the function has been installed.
<StartMan>
<TwinCATServers>
<TwinCATServer Enabled="1">
<Name>TcMcGst</Name>
<Path>C:\Program Files (x86)\Beckhoff\TwinCAT\3.1\Components\Mc\Nci\TcMcGst.exe</Path>
</TwinCATServer>
</TwinCATServers>
</StartMan>
Each Usermode Runtime instance has its own registry: TcRegistry.xml. This defines the default directories for the GST interpreter. If the TcRegistry.xml file needs to be edited, the associated Usermode Runtime instance must not be started.
<Key Name="Nc">
<Key Name="TcMcGst">
<Value Name="searchpath" Type="SZ">C:\ProgramData\Beckhoff\TwinCAT\Mc\Nci\</Value>
<Value Name="workingdirectory" Type="SZ">C:\ProgramData\Beckhoff\TwinCAT\Mc\Nci\UmRT_Default\</Value>
</Key>
</Key>
GST interpreter and Fast As Possible mode
The GST interpreter is an ADS server outside the runtime in the Windows context. This means that the state of the GST interpreter is not taken into account when the cycle tick is presented in the Fast As Possible modes of the Usermode Runtime. This can result in the NC executing the Motion commands faster than the interpreter sends the commands to the NC. This results in unrealistic dynamic progressions and a lack of smoothing. To prevent this, when using the Fast As Possible mode in conjunction with the GST interpreter, the lookahead of the NC should be monitored and switched to cyclic mode if the value falls below a threshold so that the interpreter has the chance to fill the lookahead again.
IF fbSetRtMode.bExecute = FALSE THEN
IF io_X.NcToPlc.SafEntries > nSafEntriesThreshold THEN
IF fbSetRtMode.rtMode <> E_RtMode.RtMode_FastAsPossible THEN
fbSetRtMode.rtMode := E_RtMode.RtMode_FastAsPossible;
fbSetRtMode.bExecute := TRUE;
END_IF
ELSIF fbSetRtMode.rtMode <> E_RtMode.RtMode_Cyclic THEN
fbSetRtMode.rtMode := E_RtMode.RtMode_Cyclic;
fbSetRtMode.bExecute := TRUE;
END_IF
ELSIF NOT fbSetRtMode.bBusy THEN
fbSetRtMode.bExecute := FALSE;
END_IF
fbSetRtMode();