FB52 SEQ1 P03 : Stacker Crane SEQ1 (1/3)

 

The main issue is to find out all possibilities for the required box transport. (see table above).

 

Netzwerk 1: Pre-Setting

 

// Query loading condition HSB1 or HSB2 is done

#BoxCommissionDone_HSB1 :=

"DI OUT P03".HBS_1.RdyToTakOver_FrmNC AND "E03 33N1_Z MiddleCntrl"

AND NOT ("HMI KEY".P03."30M3".F15_Actor_isMoving_HP OR "HMI KEY".P03."30M4".F15_Actor_isMoving_HP OR "HMI KEY".P03."30M5".F15_Actor_isMoving_HP);

#BoxCommissionDone_HSB2 :=

"DI OUT P03".HBS_2.RdyToTakOver_FrmNC AND "E03 33N1_Z MiddleCntrl"

AND NOT ("HMI KEY".P03."30M2".F16_Actor_isMoving_WP OR "HMI KEY".P03."30M3".F16_Actor_isMoving_WP OR "HMI KEY".P03."30M4".F16_Actor_isMoving_WP);

#DlyOnCommissionDone(IN:=#BoxCommissionDone_HSB1 OR #BoxCommissionDone_HSB2 OR #STCtoLoadPosDone,PT:=t#2000ms);

// Write max number of places in HBS1 and HBS2

"DatOfMod".MaPa.HBS1.MaxNoPlaces := "DatOfMod".MaPa.HBS1.NoOf_Places_X * "DatOfMod".MaPa.HBS1.NoOf_Places_Y;

"DatOfMod".MaPa.HBS2.MaxNoPlaces := "DatOfMod".MaPa.HBS2.NoOf_Places_X * "DatOfMod".MaPa.HBS2.NoOf_Places_Y;

 

 

 

Netzwerk 2: Execute SEQ1

 

#SSM1(MAX_STEP := 8);

 

Checking if the stacker crane is ready to go or if its charge distribution is fully completed. If it is ready to go, it forms a bit pattern in witch it reads which conveyor is occupied. If the data is valid, it create a precedence order called current commission.

 

Netzwerk 3: Step jump distributor

 

CASE #SSM1.S.stepact OF

0: // Waiting for SEQ1 to Start

"M03 SEQ1 Active" := FALSE;

#SSM1.S.stepd := #SSM1.S.steps;

1: // Query box data for next destination

#Box_Data_30M2.Info.Occupied := #Box_Data_30M2.BoxCode <> '----';

#Box_Data_30M3.Info.Occupied := #Box_Data_30M3.BoxCode <> '----';

#Box_Data_30M4.Info.Occupied := #Box_Data_30M4.BoxCode <> '----';

#Box_Data_30M5.Info.Occupied := #Box_Data_30M5.BoxCode <> '----';

"M03 RdyToStart" := #Box_Data_30M2.Info.Occupied OR #Box_Data_30M3.Info.Occupied OR #Box_Data_30M4.Info.Occupied OR #Box_Data_30M5.Info.Occupied;

IF #SSM1.S.stepfc AND NOT "M03 RdyToStart" THEN

"M03 SEQ1 Active" := TRUE;

#SSM1.S.stepnew := 7;

#SSM1.S.stepd := TRUE;

RETURN;

ELSE // if HBS =1, then Load_HBS12.%X = 0, if HBS =2, then Load_HBS12.%X =1

"DI OUT P03".HBS_1.RdyToTakOver_FrmNC := "DI OUT P03".HBS_2.RdyToTakOver_FrmNC := #STCtoLoadPosDone := FALSE;

#Load_HBS12.%X0 := #Box_Data_30M2.Trgt_Storage.HBS > 1 AND NOT (#Box_Data_30M2.Trgt_Storage.HBS = 0);

#Load_HBS12.%X1 := #Box_Data_30M3.Trgt_Storage.HBS > 1 AND NOT (#Box_Data_30M3.Trgt_Storage.HBS = 0);

#Load_HBS12.%X2 := #Box_Data_30M4.Trgt_Storage.HBS > 1 AND NOT (#Box_Data_30M4.Trgt_Storage.HBS = 0);

#Load_HBS12.%X3 := #Box_Data_30M5.Trgt_Storage.HBS > 1 AND NOT (#Box_Data_30M5.Trgt_Storage.HBS = 0);

// Target destination order of precedence.

"PRECEDENCE ORDER"(LOAD_HBS12 := #Load_HBS12,

BOXDATA1_OCCUPIED := #Box_Data_30M2.Info.Occupied,

BOXDATA2_OCCUPIED := #Box_Data_30M3.Info.Occupied,

BOXDATA3_OCCUPIED := #Box_Data_30M4.Info.Occupied,

BOXDATA4_OCCUPIED := #Box_Data_30M5.Info.Occupied,

COMMISSION_POINTER => #CurrentCommission);

END_IF;

2: // 30M2 > HBS1, 30M3 > HBS1, 30M4 > HBS1, 30M5 > HBS1

IF #SSM1.S.stepfc THEN

// 30M2 > HBS1

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

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

IF #Box_Data_30M2.Info.Occupied THEN

#XY_Coordinate(START := #SSM1.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);

#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_30M2.Info.LargeBox := TRUE;

RETURN;

END_IF;

// 30M3 > HBS1

ELSIF #Box_Data_30M3.Info.Occupied THEN

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

INDEX_POS := #Box_Data_30M3.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);

#CurrentStoragePlace := #Box_Data_30M3.Trgt_Storage.Place;

"DI OUT P03"."33N1_Z".DRV.MC_MoveAbsolute.Position := "DatOfMod".MaPa.HBS1.Gap.Z * #Box_Data_30M3.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_30M3.Info.SizeTyp = 0 THEN

#Box_Data_30M3.Info.SmalBox := TRUE;

RETURN;

ELSE

#Box_Data_30M3.Info.LargeBox := TRUE;

RETURN;

END_IF;

// 30M4 > HBS1

ELSIF #Box_Data_30M4.Info.Occupied THEN

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

INDEX_POS := #Box_Data_30M4.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);

#CurrentStoragePlace := #Box_Data_30M4.Trgt_Storage.Place;

"DI OUT P03"."33N1_Z".DRV.Support.SetVelo := "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_30M4.Info.SizeTyp = 0 THEN

#Box_Data_30M4.Info.SmalBox := TRUE;

RETURN;

ELSE

#Box_Data_30M4.Info.LargeBox := TRUE;

RETURN;

END_IF;

ELSE

// 30M5 > HBS1

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

INDEX_POS := #Box_Data_30M5.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);

#CurrentStoragePlace := #Box_Data_30M5.Trgt_Storage.Place;

"DI OUT P03"."33N1_Z".DRV.MC_MoveAbsolute.Position := "DatOfMod".MaPa.HBS1.Gap.Z * #Box_Data_30M5.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_30M5.Info.SizeTyp = 0 THEN

#Box_Data_30M5.Info.SmalBox := TRUE;

RETURN;

ELSE

#Box_Data_30M5.Info.LargeBox := TRUE;

RETURN;

END_IF;

END_IF;

ELSE // Move STC to TargetPos HBS1

"POS REACHED P01"(START := #SSM1.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 #SSM1.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;

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

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

IF NOT #SSM1.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

#SSM1.S.c2.start := #BoxCommissionDone_HSB1;

#SSM1.S.c2.set := 25;

"M03 SEQ1 Done" := #SSM1.S.c2.done;

#CurrentCommission := 0;

END_IF;

END_IF;

3: // 30M5 > HBS2, 30M4 > HBS2, 30M3 > HBS2, 30M2 > HBS2

IF #SSM1.S.stepfc THEN

// 30M5 > HBS2

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

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

IF #Box_Data_30M5.Info.Occupied THEN

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

INDEX_POS := #Box_Data_30M5.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);

#CurrentStoragePlace := #Box_Data_30M5.Trgt_Storage.Place;

"DI OUT P03"."33N1_Z".DRV.MC_MoveAbsolute.Position := -1 * "DatOfMod".MaPa.HBS2.Gap.Z * #Box_Data_30M5.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_30M5.Info.SizeTyp = 0 THEN

#Box_Data_30M5.Info.SmalBox := TRUE;

RETURN;

ELSE

#Box_Data_30M5.Info.LargeBox := TRUE;

RETURN;

END_IF;

// 30M4 > HBS2

ELSIF #Box_Data_30M4.Info.Occupied THEN

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

INDEX_POS := #Box_Data_30M4.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);

#CurrentStoragePlace := #Box_Data_30M4.Trgt_Storage.Place;

"DI OUT P03"."33N1_Z".DRV.MC_MoveAbsolute.Position := -1 * "DatOfMod".MaPa.HBS2.Gap.Z * #Box_Data_30M4.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_30M4.Info.SizeTyp = 0 THEN

#Box_Data_30M4.Info.SmalBox := TRUE;

RETURN;

ELSE

#Box_Data_30M4.Info.LargeBox := TRUE;

RETURN;

END_IF;

// 30M3 > HBS2

ELSIF #Box_Data_30M3.Info.Occupied THEN

#XY_Coordinate(START := #SSM1.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);

#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;

ELSE

// 30M2 > HBS2

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

INDEX_POS := #Box_Data_30M2.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);

#CurrentStoragePlace := #Box_Data_30M2.Trgt_Storage.Place;

"DI OUT P03"."33N1_Z".DRV.MC_MoveAbsolute.Position := -1 * "DatOfMod".MaPa.HBS2.Gap.Z * #Box_Data_30M2.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_30M2.Info.SizeTyp = 0 THEN

#Box_Data_30M2.Info.SmalBox := TRUE;

RETURN;

ELSE

#Box_Data_30M2.Info.LargeBox := TRUE;

RETURN;

END_IF;

END_IF;

ELSE

// Move STC to TartePos HBS2

"POS REACHED P01"(START := #SSM1.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 #SSM1.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;

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

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

IF NOT #SSM1.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

#SSM1.S.c2.start := #BoxCommissionDone_HSB2;

#SSM1.S.c2.set := 25;

"M03 SEQ1 Done" := #SSM1.S.c2.done;

#CurrentCommission := 0;

END_IF;

END_IF;

 

FB52 SEQ1 1/3

 

 

read more..

CEA Software Development

Here a kind of a truth table, which should to be the means for describing all possibilities for the required box movement of the conveyor system.

 

Home

 

Erfahrung

 

Referenzen

 

Sondermaschinen

 

MSR-Maschinen

 

SPS-Programmierung

 

Visualisierung HMI

 

Elektro CAD

 

Leistungsprofil

 

Personalia

 

SW-Development

 

Dokumentation

 

 

 

Impressum & DSGVO