If the license has expired then the 'TC' light on the back of the PLC will be blue, as well as the icon in the system tray. I believe blue indicates that the program is present and not in error but is not running.

In the software team we use a virtual machine for interacting with the PLC. I say 'interacting' and not 'development' because we don't develop the PLC code, we just sometimes log in to it to see structs and handle names so we can use the correct names in the code. We use a virtual machine because we've found the software plays havoc with a desktop machine and it's not something we want on our development machines. Part of the package is an emulator for the PLC itself. This requires some kernel level drivers which has caused us issues in the past that resulted in a full reinstall of a development machine.

On a machine with TwinCat installed open the Visual Studio environment and select File ➔ Open ➔ Open Project from Target...

Select the machine with the correct IP or hostname. I took these images after I'd done it once already so normally the box here would be blue not green. When I first attempted this the box was yellow with a question mark. If this is the case then proceeding will not work and give no error message. I solved the problem by deleting all the routes and re-adding the correct one.

I then received this error box. It just means that the version of TwinCat I have installed on the computer is newer than the version used to build the code on the PLC. Clicking OK here is fine.

Next we wait. Our virtual machine is sometimes incredibly slow. The host machine also hosts our build server so things can sometimes be slow but this felt like a long time looking at nothing but the Windows 10 egg timer. After a few minutes, this box will appear. Create a folder to save the resulting .sln and other files and select the folder.

After waiting some more, Visual Studio will finally load in something resembling a normal configuration.

On the left hand side is the Solution Explorer. Expand SYSTEM and then double click on License. Here you can see the licenses on the PLC. We have a valid TwinCat 3 license and a temporary HMI-Web license so we want to renew that. Since this is my second time through it didn't say expired here.

Click on the button labelled '7 Days Trial License...' and you'll have to enter the code provided.

Clicking OK should then grant you with a renewed trial license. You don't need to do anything with the license file generated, it will work now. Although the License page in Visual Studio won't update until you close and open it again.

The 'TC' light on the back of the PLC should now be green, so should the icon in the system tray. Be sure to save the solution when closing Visual Studio so that next time you can just open the .sln file rather than opening from the target. This is much faster.