Fixed aligner and started main state machine
- Fixed datatype for received offsets - Added HMI Interface for Hot and Coolplate
This commit is contained in:
@@ -19,13 +19,11 @@ VAR
|
||||
_xDisableVacuum AT %Q* : BOOL := TRUE;
|
||||
_xVacuumOk AT %I* : BOOL;
|
||||
|
||||
_udiXOffset AT %I* : UDINT;
|
||||
_udiYOffset AT %I* : UDINT;
|
||||
_udiXOffset AT %I* : DINT;
|
||||
_udiYOffset AT %I* : DINT;
|
||||
|
||||
_rXPosToGo : REAL;
|
||||
_rYPosToGo : REAL;
|
||||
|
||||
_iState : INT := 0;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
@@ -39,13 +37,7 @@ END_VAR
|
||||
lrAcceleration:= 0,
|
||||
lrDecelleration:= 0,
|
||||
lrJerk:= 0,
|
||||
xConfirmAlarms:= xConfirmAlarms,
|
||||
xEnabled=> ,
|
||||
xHomed=> ,
|
||||
lrActPosition=> ,
|
||||
xIsStopped=> ,
|
||||
xBusy=> ,
|
||||
xError=> );
|
||||
xConfirmAlarms:= xConfirmAlarms);
|
||||
|
||||
_fbYAxis(
|
||||
xEnable:= TRUE,
|
||||
@@ -57,20 +49,14 @@ _fbYAxis(
|
||||
lrAcceleration:= 0,
|
||||
lrDecelleration:= 0,
|
||||
lrJerk:= 0,
|
||||
xConfirmAlarms:= xConfirmAlarms,
|
||||
xEnabled=> ,
|
||||
xHomed=> ,
|
||||
lrActPosition=> ,
|
||||
xIsStopped=> ,
|
||||
xBusy=> ,
|
||||
xError=> );
|
||||
xConfirmAlarms:= xConfirmAlarms);
|
||||
|
||||
// Drei mal ausführen damit die Position genau ist
|
||||
IF xAlign THEN
|
||||
xAlign := FALSE;
|
||||
|
||||
_rXPosToGo := UDINT_TO_REAL(_udiXOffset) * -0.001;
|
||||
_rYPosToGo := ((UDINT_TO_REAL(_udiYOffset) * 0.001) - 37.5) * -1;
|
||||
_rXPosToGo := DINT_TO_REAL(_udiXOffset) * -0.001;
|
||||
_rYPosToGo := ((DINT_TO_REAL(_udiYOffset) * 0.001) - 37.5) * -1;
|
||||
|
||||
IF (ABS(_rXPosToGo) < 10.0) AND (ABS(_rYPosToGo) < 10.0) AND (NOT _fbXAxis.xError) AND (NOT _fbYAxis.xError) THEN
|
||||
_fbXAxis.M_MoveRel(lrRelDist := _rXPosToGo);
|
||||
|
||||
Reference in New Issue
Block a user