FB42 SEQ1 P02 : Spring elasticity reading - SEQ1 (slave 2)

 

 

 

Netzwerk 1: Pre-Setting

 

"M02 RdyToStart" :=

"M02 HomPos" AND "DI MAIN P05".SEQ1.Shift_Register.%X8;

 

 

 

Netzwerk 2: Execute SEQ1

 

#SSM1(STEP_PLS := "HMI KEY".P02.GLB.F17_StepPls,

STEP_MNS := "HMI KEY".P02.GLB.F18_StepMns,

GOTO_STEP := "HMI KEY".P02.GLB.F19_GoToStep,

GOTO_STEP_NO := "HMI KEY".P02.GLB.GoToStep,

MAX_STEP := 4);

 

 

 

Netzwerk 3: Step jump distributor

 

CASE #SSM1.S.stepact OF

0: // Waiting for SEQ1 to start

"M02 SEQ1 Active" := FALSE;

#Index := 0;

IF NOT "DI MAIN P05".SEQ1.Shift_Register.%X8 THEN

"M02 Enbl toRTT" := TRUE;

RETURN;

END_IF;

#SSM1.S.stepd := #SSM1.S.steps AND "M02 RdyToStart" AND "M02 Enbl frmRTT";

1: // HSC wait for stable start value

"M02 SSM1 Active" := TRUE;

IF #SSM1.S.stepfc THEN

#Index := #Index + 1;

#SSM1.S.c1.set := 6;

RETURN;

ELSE

"M02 HSC OnOff" := TRUE;

#SSM1.S.c1.start := "DI OUT P02".HSC_FORC_IO.UserStatusFlags.StatusDQ1;

IF #SSM1.S.c1.done THEN

"M02 Enbl frmRTT" := FALSE;

#SSM1.S.stepd := TRUE;

END_IF;

END_IF;

2: // M5_Z axis move downward WP + spring elasticity measuring

IF #SSM1.S.stepfc THEN

#SSM1.S.c1.set := 5;

"DI OUT P02".M5_Z.DRV.MC_MoveAbsolute.Position := "DI OUT P02".MANUAL.M5_Z.Set_TchInPos_5;

"DI OUT P02".M5_Z.DRV.Support.SetVelo := "DI OUT P02".MANUAL.M5_Z.Set_TchInVelo_1;

RETURN;

ELSE

IF "DI OUT P02".M5_Z.DRV.Support.ActPos - "DI OUT P02".MANUAL.M5_Z.Set_TchInPos_1 >=

"DI OUT P02".MANUAL.M5_Z.Set_TchInPos_5 - "DI OUT P02".MANUAL.SpringFRC_F1.Offset AND NOT #M5_Z_ActPosL1_REg THEN

"DI OUT P02".MANUAL.SpringFRC_F1.Measurement[#Index] := "DI OUT P02".HSC_FORC_IO.OUT.MeasuredValue;

IF "DI OUT P02".MANUAL.SpringFRC_F1.Compensation < ABS("DI OUT P02".HSC_FORC_IO.OUT.MeasuredValue - "DI OUT P02".MANUAL.SpringFRC_F1.TrgtValue) THEN

"DI MAIN P05".SEQ1.Shift_Register_BadParts.%X8 := TRUE;

END_IF;

ELSIF "DI OUT P02".M5_Z.DRV.Support.ActPos - "DI OUT P02".MANUAL.M5_Z.Set_TchInPos_1 >=

"DI OUT P02".MANUAL.M5_Z.Set_TchInPos_5 - "DI OUT P02".MANUAL.SpringFRC_F2.Offset AND NOT #M5_Z_ActPosL2_REg THEN

"DI OUT P02".MANUAL.SpringFRC_F2.Measurement[#Index] := "DI OUT P02".HSC_FORC_IO.OUT.MeasuredValue;

IF "DI OUT P02".MANUAL.SpringFRC_F1.Compensation < ABS("DI OUT P02".HSC_FORC_IO.OUT.MeasuredValue - "DI OUT P02".MANUAL.SpringFRC_F2.TrgtValue) THEN

"DI MAIN P05".SEQ1.Shift_Register_BadParts.%X8 := TRUE;

END_IF;

ELSIF "DI OUT P02".M5_Z.DRV.Support.ActPos - "DI OUT P02".MANUAL.M5_Z.Set_TchInPos_1 >=

"DI OUT P02".MANUAL.M5_Z.Set_TchInPos_5 - "DI OUT P02".MANUAL.SpringFRC_F3.Offset AND NOT #M5_Z_ActPosL3_REg THEN

"DI OUT P02".MANUAL.SpringFRC_F3.Measurement[#Index] := "DI OUT P02".HSC_FORC_IO.OUT.MeasuredValue;

IF "DI OUT P02".MANUAL.SpringFRC_F1.Compensation < ABS("DI OUT P02".HSC_FORC_IO.OUT.MeasuredValue - "DI OUT P02".MANUAL.SpringFRC_F3.TrgtValue) THEN

"DI MAIN P05".SEQ1.Shift_Register_BadParts.%X8 := TRUE;

END_IF;

ELSIF "DI OUT P02".M5_Z.DRV.Support.ActPos - "DI OUT P02".MANUAL.M5_Z.Set_TchInPos_1 >=

"DI OUT P02".MANUAL.M5_Z.Set_TchInPos_5 - "DI OUT P02".MANUAL.SpringFRC_F4.Offset AND NOT #M5_Z_ActPosL4_REg THEN

"DI OUT P02".MANUAL.SpringFRC_F4.Measurement[#Index] := "DI OUT P02".HSC_FORC_IO.OUT.MeasuredValue;

IF "DI OUT P02".MANUAL.SpringFRC_F1.Compensation < ABS("DI OUT P02".HSC_FORC_IO.OUT.MeasuredValue - "DI OUT P02".MANUAL.SpringFRC_F4.TrgtValue) THEN

"DI MAIN P05".SEQ1.Shift_Register_BadParts.%X8 := TRUE;

END_IF;

END_IF;

#M5_Z_ActPosL1_REg := "DI OUT P02".M5_Z.DRV.Support.ActPos - "DI OUT P02".MANUAL.M5_Z.Set_TchInPos_1 >=

"DI OUT P02".MANUAL.M5_Z.Set_TchInPos_5 - "DI OUT P02".MANUAL.SpringFRC_F1.Offset;

#M5_Z_ActPosL2_REg := "DI OUT P02".M5_Z.DRV.Support.ActPos - "DI OUT P02".MANUAL.M5_Z.Set_TchInPos_1 >=

"DI OUT P02".MANUAL.M5_Z.Set_TchInPos_5 - "DI OUT P02".MANUAL.SpringFRC_F2.Offset;

#M5_Z_ActPosL3_REg := "DI OUT P02".M5_Z.DRV.Support.ActPos - "DI OUT P02".MANUAL.M5_Z.Set_TchInPos_1 >=

"DI OUT P02".MANUAL.M5_Z.Set_TchInPos_5 - "DI OUT P02".MANUAL.SpringFRC_F3.Offset;

#M5_Z_ActPosL4_REg := "DI OUT P02".M5_Z.DRV.Support.ActPos - "DI OUT P02".MANUAL.M5_Z.Set_TchInPos_1 >=

"DI OUT P02".MANUAL.M5_Z.Set_TchInPos_5 - "DI OUT P02".MANUAL.SpringFRC_F4.Offset;

"M02 M5_Z GoToPosAbso" := NOT "DI OUT P02".M5_Z.HALT_01;

#SSM1.S.c1.start := "DI OUT P02".M5_Z."MC MoveAbsolute".Done;

#SSM1.S.stepd := #SSM1.S.c1.done;

END_IF;

3: // M5_Z axis move upward HP

IF #SSM1.S.stepfc THEN

"DI OUT P02".M5_Z.DRV.MC_MoveAbsolute.Position := "DI OUT P02".MANUAL.M5_Z.Set_TchInPos_0;

"DI OUT P02".M5_Z.DRV.Support.SetVelo := "DI OUT P02".MANUAL.M5_Z.Set_TchInVelo_0;

RETURN;

ELSIF #Index < 4 THEN

#SSM1.S.stepnew := 1;

END_IF;

"M02 M5_Z GoToPosAbso" := NOT "DI OUT P02".M5_Z.HALT_01;

#SSM1.S.stepd := "DI OUT P02".M5_Z."MC MoveAbsolute".Done;

4: // Query spring elasticity fault

IF NOT #SSM1.S.DlyStart.Q THEN

#FLT."3_FAULT_00_15".%X0 := "DI MAIN P05".SEQ1.Shift_Register_BadParts.%X8;

"DatOfMod".P02.STS.MeanVal_F1 :=

("DI OUT P02".MANUAL.SpringFRC_F1.Measurement[1]

+ "DI OUT P02".MANUAL.SpringFRC_F1.Measurement[2]

+ "DI OUT P02".MANUAL.SpringFRC_F1.Measurement[3]

+ "DI OUT P02".MANUAL.SpringFRC_F1.Measurement[4]) / 4.0;

"DatOfMod".P02.STS.MeanVal_F2 :=

("DI OUT P02".MANUAL.SpringFRC_F2.Measurement[1]

+ "DI OUT P02".MANUAL.SpringFRC_F2.Measurement[2]

+ "DI OUT P02".MANUAL.SpringFRC_F2.Measurement[3]

+ "DI OUT P02".MANUAL.SpringFRC_F2.Measurement[4]) / 4.0;

"DatOfMod".P02.STS.MeanVal_F3 :=

("DI OUT P02".MANUAL.SpringFRC_F3.Measurement[1]

+ "DI OUT P02".MANUAL.SpringFRC_F3.Measurement[2]

+ "DI OUT P02".MANUAL.SpringFRC_F3.Measurement[3]

+ "DI OUT P02".MANUAL.SpringFRC_F3.Measurement[4]) / 4.0;

"DatOfMod".P02.STS.MeanVal_F4 :=

("DI OUT P02".MANUAL.SpringFRC_F4.Measurement[1]

+ "DI OUT P02".MANUAL.SpringFRC_F4.Measurement[2]

+ "DI OUT P02".MANUAL.SpringFRC_F4.Measurement[3]

+ "DI OUT P02".MANUAL.SpringFRC_F4.Measurement[4]) / 4.0;

"M02 SEQ1 Done" := "M02 Enbl toRTT" := TRUE;

END_IF;

END_CASE;

 

 

Home

 

Erfahrung

 

Referenzen

 

Sondermaschinen

 

MSR-Maschinen

 

SPS-Programmierung

 

Visualisierung HMI

 

Elektro CAD

 

Leistungsprofil

 

Personalia

 

SW-Development

 

Dokumentation

 

 

 

Impressum & DSGVO