Samples

Samples provided by Beckhoff Automation are installed on your system with the TwinCAT Tools for MATLAB and Simulink setup.

You can use the following command to display all available samples:

TwinCAT.ModuleGenerator.Samples.List
Samples 1:

You can access the samples by clicking on the blue Start link. To do this, the sample code is copied to your user directory so that you do not change the original sample. You can work with the copy of the sample accordingly and try it out.

Also available are

TwinCAT.ModuleGenerator.Samples.Show(SampleName)
TwinCAT.ModuleGenerator.Samples.Start(SampleName)

For displaying and starting individual samples. The argument SampleName is to be passed as a string, e.g.

TwinCAT.ModuleGenerator.Samples.Start(‘BaseStatistics’)