The Open Commissioning Assistant is an application designed to facilitate engineering processes based on the Open Commissioning Framework. It specializes in implementing various plugins for virtual commissioning and optimizing TwinCAT project workflows.
The goal of this application is to keep it as simple as possible with a clean design and let it only do what it needs to do. It is currently optimized for a connection to a TwinCAT3 Shell. Supported Versions:
TcXaeShell.DTE.15.0
(based on VS2017, TwinCAT v3.1.4024.x)TcXaeShell.DTE.17.0
(based on VS2022, TwinCAT v3.1.4026.x).NET 8.0
OC.Assistant.Sdk
, see nuget packageOC.Assistant.Theme
, see nuget packageenvdte
, see nuget packageBeckhoff.TwinCAT.Ads
, see nuget packageTCatSysManagerLib
, see nuget packageDownload the OC.Assistant.exe from the Release page and start it.
.NET 8.0
is required to run the application.
The application's primary functions are:
The File
menu contains functions regarding TwinCAT Solutions:
The Project
menu contains functions to update the connected TwinCAT Solution. Note that this menu is only active when the Assistant is
connected to a TwinCAT solution and this solution is in Config Mode.
Client
component in the Open Commissioning Unity package, so in most cases this funcion does not need to be called via this menu.Recreate Plugins: Reads the plugin configurations from the current configuration and creates the correspondig GVLs in the connected TwinCAT project and creates their configuration interface in the Assistant application.
Update Task: Generates Input and Output variables based on the Devices of the PLC Project in the Task of the connected TwinCAT solution and links those to the corresponding variables in the PLC Project. Note that the PLC Project needs to be build successfully before updating the task.
PlcName: specifies the name of the PLC project in the connected solution in which the device models should be generated in when using Update Project
PlcTaskName: specifies the name of the Task in which the input and output variables should be generated in when using Update Task
Task AutoUpdate: if checked, the TwinCAT task gets updated automatically with the new input and ouptut variables when the PLC Project is build.
The Profinet
menu provides the function to automatically scan for Profinet devices on a selected network interface and create corresponding
Profinet device nodes in the connected TwinCAT solution.
Note: When using it for the first time, the dsian.TcPnScanner
tool has to be installed. This can be done via the Assistant application itself
by clicking on Install dsian.TcPnScanner in the Profinet
menu.
After successful installation, the function Scan Profinet function becomes available.
To scan for Profinet devices:
The scan will create Profinet nodes in the connected TwinCAT solution for each detected device.
Plugins enable the Assistant to connect to external systems such as PLCs, robot controllers, and other control data sources, making this data available to the TwinCAT solution via Global Variable Lists (GVLs).
There will be plugins for:
[!NOTE] There are no plugins released for the public yet.
OC.Assistant.exe
.OC.Assistant.exe
application.*.plugin
files and load any compatible plugin assemblies.+
buttonThe OC.Assistant.xml
file in the project folder of the TwinCAT solution serves as the base for generating objects in the TwinCAT solution.
It gets created the first time the Assistant connects to the solution.
This configuration includes all plugin connections and devices of the project for which behavior models should be generated
The plugin connection section is populated by adding plugins via the Assistant application itself. The device section is populated by using the "Update TwinCAT Project" function of the Client component in the Unity package.
This is an example configuration file containing a Plugin configuration and Devices:
<?xml version="1.0" encoding="utf-8"?>
<Config>
<TaskAutoUpdate />
<Plugins>
<Plugin Name="PLC1" Type="PlcSimAdvanced" IoType="Address">
<Parameter>
<AutoStart>true</AutoStart>
<PlcName>PLC_1</PlcName>
<Identifier>1</Identifier>
<CycleTime>10</CycleTime>
<InputAddress>0-1023</InputAddress>
<OutputAddress>0-1023</OutputAddress>
</Parameter>
<InputStructure />
<OutputStructure />
</Plugin>
</Plugins>
<Project>
<Hil />
<Main>
<Group Name="Devices">
<Group Name="Cylinders">
<Device Name="Cylinder_1" Type="FB_Cylinder" />
<Device Name="Cylinder_2" Type="FB_Cylinder" />
<Device Name="Cylinder_3" Type="FB_Cylinder" />
<Device Name="Cylinder_4" Type="FB_Cylinder" />
</Group>
<Group Name="Drives">
<Device Name="Drive_Position" Type="FB_Drive" />
<Device Name="Drive_Simple" Type="FB_Drive" />
<Device Name="Drive_Speed" Type="FB_Drive" />
</Group>
<Group Name="Interactions">
<Device Name="Button" Type="FB_Button" />
<Device Name="Lamp" Type="FB_Lamp" />
<Device Name="Lock" Type="FB_Lock" />
<Device Name="Panel_1" Type="FB_Panel" />
<Device Name="Toggle" Type="FB_Button" />
</Group>
<Group Name="SensorsAnalog">
<Device Name="SensorAnalog_1" Type="FB_SensorAnalog" />
<Device Name="SensorAnalog_2" Type="FB_SensorAnalog" />
<Device Name="SensorAnalog_3" Type="FB_SensorAnalog" />
</Group>
<Group Name="SensorsBinary">
<Device Name="SensorBinary_1" Type="FB_SensorBinary" />
<Device Name="SensorBinary_2" Type="FB_SensorBinary" />
<Device Name="SensorBinary_3" Type="FB_SensorBinary" />
</Group>
</Group>
</Main>
</Project>
</Config>
We welcome contributions from everyone and appreciate your effort to improve this project. We have some basic rules and guidelines that make the contributing process easier for everyone involved.
After your pull request is reviewed and merged.
[!NOTE] All contributions will be licensed under the project's license.
Please follow these naming conventions in your code:
Type | Rule |
---|---|
Private field | _lowerCamelCase |
Public field | UpperCamelCase |
Protected field | UpperCamelCase |
Internal field | UpperCamelCase |
Property | UpperCamelCase |
Method | UpperCamelCase |
Class | UpperCamelCase |
Interface | IUpperCamelCase |
Local variable | lowerCamelCase |
Parameter | lowerCamelCase |
Constant | UPPER_SNAKE_CASE |
We appreciate your contributions and look forward to collaborating with you to improve this project!