1

I have a TwinCAT PLC project with events. When I first added the event classes they were stored in the .tsproj file. For source control purposes I moved these events to separate .tmc files. However, now whenever I switch my target system the event classes are re-added to the .tsproj file. The event classes are not added with a rebuild or reopening the project.

Why are these files added to the .tsproj again? They should not be needed here, since they are stored in the .tmc files. I'm using TwinCAT 4022.29.

Roald
  • 2,459
  • 16
  • 43
  • How did you move the different event classes to separate TMC-files? – Jakob Aug 06 '21 at 07:54
  • Right click on , select Add New Item.... Give the tmc file a name and save it. Then open the tmc file you just created and go to the Event Classes tab. Then select the existing event classes you wan to save in the newly created tmc file. – Roald Aug 06 '21 at 08:03
  • You might also run into https://stackoverflow.com/q/68678539/6329629 if you're using 4022.x. – Roald Aug 06 '21 at 08:32

1 Answers1

1

The answer came to me when I tried to move the events into a separate .tmc file in a TwinCAT 4024.12 project. It turns out you need to uncheck "Persistent (even if unused)", as you can see by this clear tool-tip when the check mark is still there.

remove persistent mark

To remove the "Persistent (even if unsed)", right click on the event to uncheck the option.

enter image description here

Roald
  • 2,459
  • 16
  • 43