Fixed Decimal
Added Start Key Implementedt Reset (Testing)
This commit is contained in:
@@ -128,6 +128,18 @@ CASE enStepRS232 OF
|
||||
|
||||
usVCStatusCamPrg.0 := (gTM065.usPrgNr = gTM065.usPrgNrOld) AND NOT bWaitAck;
|
||||
|
||||
|
||||
FUBs.TON_Reset.IN := gbInStartKey;
|
||||
FUBs.TON_Reset.PT := t#3s;
|
||||
FUBs.TON_Reset ();
|
||||
|
||||
IF EDGEPOS (FUBs.TON_Reset.Q) THEN
|
||||
FUBs.FrameWrite1.enable := FALSE;
|
||||
bInit := TRUE;
|
||||
bWaitAck := FALSE;
|
||||
END_IF
|
||||
|
||||
|
||||
//Call FUBs
|
||||
IF FUBs.TON_Read1.Q THEN
|
||||
//Timeout
|
||||
|
||||
@@ -11,6 +11,7 @@ TYPE
|
||||
FrameReleaseBuffer1 : {REDUND_UNREPLICABLE} FRM_rbuf;
|
||||
FrameWrite1 : {REDUND_UNREPLICABLE} FRM_write;
|
||||
FrameXOpen1 : {REDUND_UNREPLICABLE} FRM_xopen;
|
||||
TON_Reset : TON;
|
||||
TON_Read1 : {REDUND_UNREPLICABLE} TON;
|
||||
END_STRUCT;
|
||||
END_TYPE
|
||||
|
||||
@@ -15,6 +15,7 @@ VAR
|
||||
gbInMeasureActive : BOOL; (*Messeinheit Messung Activ*)
|
||||
gbInMeasureReady : BOOL; (*Messeinheit Bereit*)
|
||||
gbInMeasureInvalid : BOOL; (*Messeinheit Messung ung<6E>ltig*)
|
||||
gbInStartKey : BOOL; (*Starttaster (Reset wenn l<>nger 5s)*)
|
||||
END_VAR
|
||||
(*----------------------------------------------------------------------------------------------------------------*)
|
||||
(*IF1.ST3 - DO9322 ( Ausg<73>nge Allgemein)*)
|
||||
|
||||
@@ -122,6 +122,16 @@ PROGRAM _CYCLIC
|
||||
ELSIF (lMachine.enMode = enMACH_AUTOMATIC) THEN
|
||||
// <EFBFBD>berwachungen w<EFBFBD>hrend Automatik
|
||||
//--------------------------------------------------------------------------------------------
|
||||
FUBs.TON_StartKey.IN := gbInStartKey;
|
||||
FUBs.TON_StartKey.PT := t#3s;
|
||||
FUBs.TON_StartKey ();
|
||||
|
||||
IF EDGEPOS (FUBs.TON_StartKey.Q) THEN
|
||||
enStepAuto := enAutoStep_INIT;
|
||||
MpFUB.AxBasic_01.MoveAdditive := FALSE;
|
||||
MpFUB.AxBasic_01.Home := FALSE;
|
||||
gbOuMeasureTrigger := TRUE;
|
||||
END_IF
|
||||
|
||||
IF (enStepAuto = enAutoStep_WAIT_START) THEN
|
||||
Recipe := gRecipies[uiRecipe + 1];
|
||||
@@ -153,7 +163,7 @@ PROGRAM _CYCLIC
|
||||
//Warten auf Start
|
||||
//---------------------------
|
||||
enAutoStep_WAIT_START:
|
||||
bTransitionCondition := ManualCommands.bStartMeasurement;
|
||||
bTransitionCondition := ManualCommands.bStartMeasurement OR EDGEPOS (gbInStartKey);
|
||||
IF bTransitionCondition THEN
|
||||
Times.udSteptime := 0;
|
||||
Times.udCycletime := 0;
|
||||
@@ -314,6 +324,9 @@ PROGRAM _CYCLIC
|
||||
brsitoa (REAL_TO_DINT (gMeasurements.MeasurementAvg * 1000.0) / 1000, ADR (strTemp));
|
||||
brsstrcat (ADR (gstrLogMsg), ADR (strTemp));
|
||||
brsstrcat (ADR (gstrLogMsg), ADR ('.'));
|
||||
IF (REAL_TO_DINT (gMeasurements.MeasurementAvg * 100.0) MOD 100) < 10 THEN
|
||||
brsstrcat (ADR (gstrLogMsg), ADR ('0'));
|
||||
END_IF
|
||||
brsitoa (REAL_TO_DINT (gMeasurements.MeasurementAvg * 100.0) MOD 100, ADR (strTemp));
|
||||
brsstrcat (ADR (gstrLogMsg), ADR (strTemp));
|
||||
gCmd1.bCmdWriteLogfile := TRUE;
|
||||
|
||||
@@ -39,6 +39,7 @@ TYPE
|
||||
bSpare : BOOL; (*Dummy*)
|
||||
END_STRUCT;
|
||||
typ_FUB : STRUCT (*Funktionsbausteine*)
|
||||
TON_StartKey : TON;
|
||||
END_STRUCT;
|
||||
typ_MpFUB : STRUCT (*MApp Funktionsbausteine*)
|
||||
AxBasic_01 : MpAxisBasic;
|
||||
|
||||
@@ -14,20 +14,21 @@ VAR_CONFIG
|
||||
gbOuTrigger1 AT %QX."X20DO9322-Allg1".DigitalOutput01;
|
||||
gbOuTrigger2 AT %QX."X20DO9322-Allg1".DigitalOutput02;
|
||||
gbOuEnable AT %QX."X20DO9322-Allg1".DigitalOutput03;
|
||||
Cyclic#1.gAxis01_DrvIf.iLifeCnt AT %IB."80SD100XS.C0XX-01".LifeCnt;
|
||||
Cyclic#1.gAxis01_DrvIf.iDrvOK AT %IX."80SD100XS.C0XX-01".DrvOk01;
|
||||
Cyclic#1.gAxis01_DrvIf.oBoostCurrent AT %QX."80SD100XS.C0XX-01".BoostCurrent01;
|
||||
Cyclic#1.gAxis01_DrvIf.oStandStillCurrent AT %QX."80SD100XS.C0XX-01".StandstillCurrent01;
|
||||
Cyclic#1.gAxis01_DrvIf.oSetTime AT %QW."80SD100XS.C0XX-01".SetTime01;
|
||||
Cyclic#1.gAxis01_MotorStep0 AT %QW."80SD100XS.C0XX-01".MotorStep0;
|
||||
Cyclic#1.gAxis01_DiDoIf.iLifeCntDriveEnable AT %IB."80SD100XS.C0XX-01".LifeCnt;
|
||||
Cyclic#1.gAxis01_DiDoIf.iLifeCntDriveReady AT %IB."80SD100XS.C0XX-01".LifeCnt;
|
||||
Cyclic#1.gAxis01_DiDoIf.iDriveReady AT %IX."80SD100XS.C0XX-01".DrvOk01;
|
||||
Cyclic#1.gAxis01_DiDoIf.oDriveEnable AT %QX."80SD100XS.C0XX-01".DriveEnable01;
|
||||
Cyclic#1.gAxis01_EncIf1.iLifeCnt AT %IB."80SD100XS.C0XX-01".LifeCnt;
|
||||
Cyclic#1.gAxis01_EncIf1.iEncOK AT %IX."80SD100XS.C0XX-01".EncOk01;
|
||||
Cyclic#1.gAxis01_EncIf1.iActPos AT %IW."80SD100XS.C0XX-01".ActPos01;
|
||||
Cyclic#1.gAxis01_EncIf1.iRefPulsePos AT %IW."80SD100XS.C0XX-01".RefPulsePos01;
|
||||
Cyclic#1.gAxis01_EncIf1.iRefPulseCnt AT %IB."80SD100XS.C0XX-01".RefPulseCnt01;
|
||||
Cyclic#1.gAxis01_EncIf1.iActTime AT %IW."80SD100XS.C0XX-01".ActTime01;
|
||||
Cyclic#1.gAxis01_DrvIf.iLifeCnt AT %IB."80SD100XS.C0XX-01".LifeCnt;
|
||||
Cyclic#1.gAxis01_DrvIf.iDrvOK AT %IX."80SD100XS.C0XX-01".DrvOk01;
|
||||
Cyclic#1.gAxis01_DrvIf.oBoostCurrent AT %QX."80SD100XS.C0XX-01".BoostCurrent01;
|
||||
Cyclic#1.gAxis01_DrvIf.oStandStillCurrent AT %QX."80SD100XS.C0XX-01".StandstillCurrent01;
|
||||
Cyclic#1.gAxis01_DrvIf.oSetTime AT %QW."80SD100XS.C0XX-01".SetTime01;
|
||||
Cyclic#1.gAxis01_MotorStep0 AT %QW."80SD100XS.C0XX-01".MotorStep0;
|
||||
Cyclic#1.gAxis01_DiDoIf.iLifeCntDriveEnable AT %IB."80SD100XS.C0XX-01".LifeCnt;
|
||||
Cyclic#1.gAxis01_DiDoIf.iLifeCntDriveReady AT %IB."80SD100XS.C0XX-01".LifeCnt;
|
||||
Cyclic#1.gAxis01_DiDoIf.iDriveReady AT %IX."80SD100XS.C0XX-01".DrvOk01;
|
||||
Cyclic#1.gAxis01_DiDoIf.oDriveEnable AT %QX."80SD100XS.C0XX-01".DriveEnable01;
|
||||
Cyclic#1.gAxis01_EncIf1.iLifeCnt AT %IB."80SD100XS.C0XX-01".LifeCnt;
|
||||
Cyclic#1.gAxis01_EncIf1.iEncOK AT %IX."80SD100XS.C0XX-01".EncOk01;
|
||||
Cyclic#1.gAxis01_EncIf1.iActPos AT %IW."80SD100XS.C0XX-01".ActPos01;
|
||||
Cyclic#1.gAxis01_EncIf1.iRefPulsePos AT %IW."80SD100XS.C0XX-01".RefPulsePos01;
|
||||
Cyclic#1.gAxis01_EncIf1.iRefPulseCnt AT %IB."80SD100XS.C0XX-01".RefPulseCnt01;
|
||||
Cyclic#1.gAxis01_EncIf1.iActTime AT %IW."80SD100XS.C0XX-01".ActTime01;
|
||||
gbInStartKey AT %IX."X20DI6371".DigitalInput06;
|
||||
END_VAR
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?AutomationStudio Version=4.2.10.53 SP?>
|
||||
<?AutomationStudio Version=4.2.11.97 SP?>
|
||||
<Hardware xmlns="http://br-automation.co.at/AS/Hardware">
|
||||
<Module Name="4PPC70_101G_20B" Type="4PPC70.101G-20B" Version="1.4.0.0">
|
||||
<Connector Name="IF1">
|
||||
@@ -84,7 +84,7 @@
|
||||
<Parameter ID="Stations" Value="16" />
|
||||
</Connector>
|
||||
</Module>
|
||||
<Module Name="X20BC0083" Type="X20BC0083" Version="2.5.3.0">
|
||||
<Module Name="X20BC0083" Type="X20BC0083" Version="2.7.0.0">
|
||||
<Connection Connector="PLK1" TargetModule="4PPC70_101G_20B" TargetConnector="IF1" NodeNumber="1" />
|
||||
<Connection Connector="SL" TargetModule="X20BB80" TargetConnector="SL1" />
|
||||
<Parameter ID="Supervision" Value="off" />
|
||||
|
||||
Reference in New Issue
Block a user