Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Twincat Oddities

Simon-Cooper edited this page Mar 27, 2019 · 2 revisions

The purpose of this page is document some of the hints and tricks around working with the Twincat IDE.

Versions

The IDE will put it's version inside each source code file, this will mean that the version of Twincat should be standardised across developers.

Adding New Files

When new files are added to a project Twincat will not always pick them up. The best way to ensure that it does is to make sure that the changes in *.plcproj are also committed.

PLC not running and I/O not triggering

If you have confirmed that the PLC is not running when it should be which can be confirmed with some simple code: heartbeat:=heartbeat+1 Then it is due to a sync master issue on the controller (working theory is that the I/O task is idling never allowing the PLC task to run). This can be fixed by setting the priority of the PlcTask higher. To do this:

  • Select the Real-time tab from the system drop down in the solution explorer
  • Located the Priority values of the "PlcTask" and "I/O Idle Task"
  • Set the "PlcTask" to a lower number (higher priority) than the "I/O Idle Task"
  • Reactivate the configuration
  • Check the heartbeat code in the PLC
Clone this wiki locally