ISISComputingGroup / BeckhoffPLCCode

PLC Code that is downloaded into Beckhoff controllers
7 stars 3 forks source link

Major Revisions #7

Closed Simon-Cooper closed 5 years ago

Simon-Cooper commented 5 years ago

Latest revision of motion control code. New function block wrapping of PLCOPEN MC FBs pulled inside state machine logic. GearIn and GearInMultiMaster implemented to include coupling of limit switches from slave axes to master axes, these are fed in to the MC_Power Block.

A lot of new DUTs (Structures and Enumerations) added for simplicity: eRWParameter ST_MasterAxis ST_AxisControl etc...

Visualisation screens overhauled to allow scaling, also implements a basic (but hardcoded) slit set graphic.

MAIN POU includes state machine logic for implementing a Multi-master slit set. Main cleaned up to run through ACTS AXES() runs the FB_AxisDrive for the system PROG() runs custom system specific control - currently a slit set SIMULATE() runs axis simulation code for creating limits and flags

Advanced homing implemented but functionality not yet tested with hardware.

Things to test: Limit coupling of slaves to masters when gearing in and out, how robust is this. Scripting of other systems (not a slit set).

DominicOram commented 5 years ago

Look a lot better in general but as you said, this is a big change so a lot of comments here:

Functionality

Code Structure

VISUs

Documentation

Code Quality

I wasn't really sure whether to reject this or accept this PR as it's such a large change. I won't merge for now and we'll sit down and discuss it when you're back. Sorry for the wall of text, this is honestly very good work. I'm just keen that it's as good as possible and that it can be easily picked up by others if required.