11.12.2019

ST Generator

PLC Structure Text Generator

Recently I wrote a code generator for rotary index drive based control.

This generator helps generate the label declaration, manual control code, even the simple flow process for each station.

By all these process done, it generated more than half code in a cylinder based control project, all you need to do is to optmize the flow control for each station.

Generate code:

Gen code

Generate workflow:

Gen work flow

It’s all based on cylinders, so if we got a station with 3 cylinders like this:

Name Type Group
Down FbCylinder2x1y St8
Forward FbCylinder2x1y St8
Clamp FbCylinder0x1y St8

it generate code below:

With flow process like this:

Name State Group
Down on St1
Clamp on St1
Down off St1
Forward on St1
Down on St1
Clamp off St1
Down off St1

it generate code below:

Written with StackEdit.

沒有留言:

張貼留言