Skip to content

MichaelDrostWago/CodesysProgramGeneration

Repository files navigation

Automated Code Generation for Codesys

With this scripts you can generate your own Module "frames". This is an example in how to work with Python-Scripts in CODESYS. Following features are availabe:

CreateEmptyFolderStructure

This script generates default folderstructure with the desirered "Modulename"

image image

CreateEmptyPrg

This Script generates the folderstructure from above and in addition an PRG-Block with the modulname and options:

image

You can choose following options:

  1. Enable -> The PRG-Block will have an enable input and internal enable handling
  2. Init -> The PRG-Block will have an init-routine, with mInit method
  3. Performance -> will ad an instance of fbTimeMeasurement to measure the perforamance of the PRG

image image

CreateModule

This script generates a "Module" or Functionblock, with diverse options and interfaces: You can choose following options:

  1. Ack -> input for ackknowledgement handling
  2. mode -> for mode handling
  3. ST_Config -> generates an configuration struct for the module
  4. VISU_ITF -> generates an Interface for Visualization or Scada

image image image

GetDocumentation

This exports all of your librarys and POUs, to document your actual state of the project. The File is then located in the projectfolder. It is example and not all functions are integrated. image

ExportXML and testXmlHandling

With ExportXml.py you can export your whole project to an XML-file. Then you can iterate trough this with testXmlHandling.py. You can also merge the two projects to get you information directly from your project. The Handling of the XML-file is much easier then the handling with the Built-In Codesys functions.

About

Generate default projectstructures and functionsblock

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages