FB32 SEQ1 P03 :

 

 

 

// 30M2 > HBS1

"DI MAIN P03".MaDa.RunTimeSetP_seq1 := 280;

"DI MAIN P03".MaDa.RunTimeCntrl_seq1 := 0;

#XY_Coordinate(START := #SEQ1.S.stepfc,

INDEX_POS := #Box_Data_30M2.Trgt_Storage.Place,

ROWS_X := "DatOfMod".MaPa.HBS1.NoOf_Places_X,

ROWS_Y := "DatOfMod".MaPa.HBS1.NoOf_Places_Y,

REF_POS := "DatOfMod".MaPa.HBS1.RefPos,

GAP_FACTOR_X := "DatOfMod".MaPa.HBS1.Gap.X,

GAP_FACTOR_Y := "DatOfMod".MaPa.HBS1.Gap.Y,

TARGET_POS := "DatOfMod".MaPa.HBS1.PlacingPos);

#Distance_Xaxis_HBS1 := ABS(IN := "DI OUT P03"."31N1_X".DRV.Support.ActPos - "DatOfMod".MaPa.HBS1.PlacingPos.X);

// 30M3 > HBS2

#XY_Coordinate(START := #SEQ1.S.stepfc,

INDEX_POS := #Box_Data_30M3.Trgt_Storage.Place,

ROWS_X := "DatOfMod".MaPa.HBS2.NoOf_Places_X,

ROWS_Y := "DatOfMod".MaPa.HBS2.NoOf_Places_Y,

REF_POS := "DatOfMod".MaPa.HBS2.RefPos,

GAP_FACTOR_X := "DatOfMod".MaPa.HBS2.Gap.X,

GAP_FACTOR_Y := "DatOfMod".MaPa.HBS2.Gap.Y,

TARGET_POS := "DatOfMod".MaPa.HBS2.PlacingPos);

#Distance_Xaxis_HBS2 := ABS(IN := "DI OUT P03"."31N1_X".DRV.Support.ActPos - "DatOfMod".MaPa.HBS2.PlacingPos.X);

IF #Distance_Xaxis_HBS2 < #Distance_Xaxis_HBS1 THEN

// 30M3 > HBS2

#CurrentStoragePlace := #Box_Data_30M3.Trgt_Storage.Place;

"DI OUT P03"."33N1_Z".DRV.MC_MoveAbsolute.Position := -1 * "DatOfMod".MaPa.HBS2.Gap.Z * #Box_Data_30M3.Trgt_Storage.Depth;

"DI OUT P03"."33N1_Z".DRV.Support.SetVelo := #Velo_Zaxis_HBS2;

"DI OUT P03".HBS_2.RdyToTakOver_FrmNC := TRUE;

IF #Box_Data_30M3.Info.SizeTyp = 0 THEN

#Box_Data_30M3.Info.SmalBox := TRUE;

RETURN;

ELSE

#Box_Data_30M3.Info.LargeBox := TRUE;

RETURN;

END_IF;

ELSIF #Distance_Xaxis_HBS1 <= #Distance_Xaxis_HBS2 THEN

// 30M2 > HBS1

#CurrentStoragePlace := #Box_Data_30M2.Trgt_Storage.Place;

"DI OUT P03"."33N1_Z".DRV.MC_MoveAbsolute.Position := "DatOfMod".MaPa.HBS1.Gap.Z * #Box_Data_30M2.Trgt_Storage.Depth;

"DI OUT P03"."33N1_Z".DRV.Support.SetVelo := #Velo_Zaxis_HBS1;

"DI OUT P03".HBS_1.RdyToTakOver_FrmNC := TRUE;

IF #Box_Data_30M2.Info.SizeTyp = 0 THEN

#Box_Data_30M2.Info.SmalBox := TRUE;

RETURN;

ELSE

#Box_Data_30M3.Info.LargeBox := TRUE;

RETURN;

END_IF;

END_IF;

ELSE

// Move STC to TargetPos 30M2 > HBS1

IF "DI OUT P03".HBS_1.RdyToTakOver_FrmNC THEN

"POS REACHED P01"(START := #SEQ1.S.DlyStart.Q,

TARGET_POS := "DatOfMod".MaPa.HBS1.PlacingPos,

SET_VELO := #Velo_XYaxis,

POS_WINDOW := TRUE,

PRECISION := 1.0,

TARGET_REACHED => "M03 SEQ1 Active");

"M03 XY-GoToPosAbso" := NOT ("DI OUT P03"."31N1_X".HALT_01 OR "DI OUT P03"."32N1_Y".HALT_01);

"M03 33N1_Z GoToPosAbso" := NOT "DI OUT P03"."33N1_Z".HALT_01 AND "E03 GapCntrl HBS1" AND "M03 SEQ1 Active" AND ("E03 30M2 LB2_1" OR #SEQ1.S.c1.done);

IF "DI OUT P03"."33N1_Z".DRV.MC_MoveAbsolute.Done AND NOT "E03 33N1_Z MiddleCntrl" THEN

"M03 33N1_Z GoToPosAbso" := FALSE;

#SEQ1.S.c1.start := TRUE;

#SEQ1.S.c1.set := 10;

IF NOT #SEQ1.S.c1.done THEN

"DI OUT P03"."33N1_Z".DRV.MC_MoveAbsolute.Position := 0.0;

RETURN;

END_IF;

ELSIF "DI OUT P03"."33N1_Z".DRV.MC_MoveAbsolute.Done AND "E03 33N1_Z MiddleCntrl" THEN

"M03 SEQ1 Done" := #BoxCommissionDone_HSB1;

#CurrentCommission := 0;

END_IF;

// Move STC to TargetPos 30M3 > HBS2

ELSIF "DI OUT P03".HBS_2.RdyToTakOver_FrmNC THEN

"POS REACHED P01"(START := #SEQ1.S.DlyStart.Q,

TARGET_POS := "DatOfMod".MaPa.HBS2.PlacingPos,

SET_VELO := #Velo_XYaxis,

POS_WINDOW := TRUE,

PRECISION := 1.0,

TARGET_REACHED => "M03 SEQ1 Active");

"M03 XY-GoToPosAbso" := NOT ("DI OUT P03"."31N1_X".HALT_01 OR "DI OUT P03"."32N1_Y".HALT_01);

"M03 33N1_Z GoToPosAbso" := NOT "DI OUT P03"."33N1_Z".HALT_01 AND "E03 GapCntrl HBS2" AND "M03 SEQ1 Active" AND ("E03 30M5 LB5_2" OR #SEQ1.S.c1.done);

IF "DI OUT P03"."33N1_Z".DRV.MC_MoveAbsolute.Done AND NOT "E03 33N1_Z MiddleCntrl" THEN

"M03 33N1_Z GoToPosAbso" := FALSE;

#SEQ1.S.c1.start := TRUE;

#SEQ1.S.c1.set := 10;

IF NOT #SEQ1.S.c1.done THEN

"DI OUT P03"."33N1_Z".DRV.MC_MoveAbsolute.Position := 0.0;

RETURN;

END_IF;

ELSIF "DI OUT P03"."33N1_Z".DRV.MC_MoveAbsolute.Done AND "E03 33N1_Z MiddleCntrl" THEN

"M03 SEQ1 Done" := #BoxCommissionDone_HSB2;

#CurrentCommission := 0;

END_IF;

END_IF;

 

CEA Software Development

The stacker crane (STC) determinate the shortest distance to target position by factoring out the place number stored in the data-box. Hereby, the y-axis more specifically the x-axis factor witch is then used to calculate the distance to target position on x-axis to HBS1 or HBS2.

The code section shown below determinates the absolute distance of x-axis targeted in HBS1 or HBS2. If the shortest distance is the one in HBS1, the stacker crane will first travel to the storage place in HBS1, otherwise to HBS2

 

Home

 

Erfahrung

 

Referenzen

 

Sondermaschinen

 

MSR-Maschinen

 

SPS-Programmierung

 

Visualisierung HMI

 

Elektro CAD

 

Leistungsprofil

 

Personalia

 

SW-Development

 

Dokumentation

 

 

 

Impressum & DSGVO