PLC (315-2DP) gaat in stop in FC62

De Modulaire PLC die vrijwel alles kan.

Moderator: GJ_

Plaats reactie
Niels_1980
Berichten: 77
Lid geworden op: 11-10-2009 16:16:35

PLC (315-2DP) gaat in stop in FC62

Bericht door Niels_1980 » 05-01-2018 15:29:42

Beste,


Ik zit met een probleem dat de plc in stop gaat na cyclus tijd overschrijding in blok FC62, dit heb ik via de diagnose buffer en de ondersteuning van Siemens al uitgezocht. Volgens siemens gaat het mis wanneer de instructie in NW 69 wordt uitgevoerd en er gejumped wordt naar M005, hierdoor komt de CPU in een loop en gaat deze in stop. Ik kan echter niet vinden waar het dan ergens misgaat, ik heb de netwerken al een aantal malen overlopen maar kan niets vinden. Het is ook zo dat het maar af en toe voorkomt, soms een aantal malen per dag soms dagen / weken niet. Heeft er iemand van jullie een idee ? Bijgesloten de source code :

Code: Selecteer alles

FUNCTION "Pickup AUTO" : VOID
TITLE =Pickup automatic management
AUTHOR : 
VERSION : 0.1


VAR_INPUT
  ENABLE_FUNCTION : BOOL ;	
  PICKUP_HORIZ_ACTUAL_POS : INT ;	
  PICKUP_VERTIC_ACTUAL_POS : INT ;	
END_VAR
VAR_TEMP
  AUX_ACTIVATION_VENTOSE : INT ;	
  DIM_HZ_ON_STOCK_LESS : INT ;	
  AUX : BOOL ;	
  AAAAAAAA : INT ;	
  POS_PIECE2 : INT ;	
END_VAR
BEGIN
NETWORK
TITLE =Automatic conditions
//
//
M006: A     #ENABLE_FUNCTION; 
      A     "98SA3_1"; 
      AN    "M20.2"; 
      A     "M20.6"; 
      A(    ; 
      AN    "Allarm to OP".PICKUP_ALLARM_081; 
      A     "Data exchange to OP".PICKUP_SETTING_VALUE.ENA_OPEN_CLOSE_CENTER; 
      )     ; 
      A(    ; 
      AN    "Allarm to OP".PICKUP_ALLARM_082; 
      A     "Data exchange to OP".PICKUP_SETTING_VALUE.ENA_OPEN_CLOSE_CENTER; 
      )     ; 
      AN    "Allarm to OP".PICKUP_ALLARM_091; 
      AN    "Allarm to OP".PICKUP_ALLARM_092; 
      AN    "Allarm to OP".PICKUP_ALLARM_093; 
      AN    "Allarm to OP".PICKUP_ALLARM_095; 
      AN    "Allarm to OP".PICKUP_ALLARM_105; 
      AN    "Allarm to OP".PICKUP_ALLARM_106; 
      AN    "Allarm to OP".PICKUP_ALLARM_109; 
      AN    "Allarm to OP".PICKUP_ALLARM_111; 
      AN    "Allarm to OP".PICKUP_ALLARM_112; 
      AN    "Allarm to OP".PICKUP_ALLARM_097; 
      AN    "Allarm to OP".PICKUP_ALLARM_098; 
      AN    "Allarm to OP".PICKUP_ALLARM_099; 
      AN    "Allarm to OP".PICKUP_ALLARM_100; 
      AN    "Allarm to OP".PICKUP_ALLARM_101; 
      AN    "Allarm to OP".PICKUP_ALLARM_102; 
      AN    "Allarm to OP".PICKUP_ALLARM_104; 
      AN    "Allarm to OP".PICKUP_ALLARM_121; 
      AN    "Allarm to OP".PICKUP_ALLARM_122; 
      AN    "Allarm to OP".PICKUP_ALLARM_123; 
      AN    "Allarm to OP".PICKUP_ALLARM_126; 
      JC    M007; 
      L     L#0; 
      T     DB62.DBD    0; 
      T     DB62.DBD    4; 
      T     DB62.DBD    8; 
      T     DB62.DBD   12; 
      T     DB62.DBD   16; 
      T     DB62.DBD   20; 
      T     DB62.DBD   24; 
      T     DB62.DBD   28; 
      T     DB62.DBD   32; 
      T     DB62.DBD   36; 
      ON    #ENABLE_FUNCTION; 
      ON    "98SA3_1"; 
      O     "M20.2"; 
      ON    "M20.6"; 
      ON    "M22.2"; 
      R     "M61.2"; 
      R     "M61.3"; 
      R     "M63.6"; 
      R     "M63.7"; 
      R     "M64.6"; 
      R     "M61.1"; 
      ON    #ENABLE_FUNCTION; 
      ON    "98SA3_1"; 
      O     "M20.2"; 
      ON    "M20.6"; 
      ON    "M22.2"; 
      BEC   ; 
M007: NOP   0; 
NETWORK
TITLE =Picked up (only) first piece of 2

      AN    "Pickup DATA".ENABLE_HORI_DISPLACEMENT; 
      R     "M61.7"; 
NETWORK
TITLE =

      A     "Pickup STEP".Pickup_Step[310]; 
      A     "98SA4"; 
      R     "Pickup STEP".Pickup_Step[310]; 
NETWORK
TITLE =Pickup start Stap 0

      A(    ; 
      A     "M20.6"; 
      AN    "M61.2"; 
      O     "Pickup STEP".Pickup_Step[310]; 
      )     ; 
      AN    "98SA4"; 
      S     "Pickup STEP".Pickup_Step[0]; 
      R     "Pickup STEP".Pickup_Step[310]; 
      S     "M61.2"; 
      R     "M61.7"; 
NETWORK
TITLE =Centering is full set merker

      A     "Pickup STEP".Pickup_Step[0]; 
      A(    ; 
      O(    ; 
      L     "Pickup DATA".ACTUAL_PIECE_ON_CENETER; 
      L     "Pickup DATA".PIECE_ON_CENTERING_BY_OP; 
      >=I   ; 
      )     ; 
      O     ; 
      A     "E1.3"; 
      A     "85SA2"; 
      O     "M160.1"; 
      )     ; 
      S     "M63.7"; 
NETWORK
TITLE =Centering full reset merker

      A     "Pickup STEP".Pickup_Step[0]; 
      A(    ; 
      AN    "E1.3"; 
      AN    "85SA2"; 
      O     "M160.1"; 
      )     ; 
      A(    ; 
      L     "Pickup DATA".ACTUAL_PIECE_ON_CENETER; 
      L     "Pickup DATA".PIECE_ON_CENTERING_BY_OP; 
      <I    ; 
      )     ; 
      R     "M63.7"; 
NETWORK
TITLE =Jump if centering is full
//Niet springen als ik tool 3 heb want dan sla ik de centrering over
//DB1.DBX0.2= I19.3    P14 Rearseatback
//DB1.DBX0.3= I19.4    P15 TLUT
      A     "Pickup STEP".Pickup_Step[0]; 
      A(    ; 
      O     "M63.7"; 
      O     ; 
      A     "M23.1"; 
      A(    ; 
      L     "Pickup DATA".ACTUAL_PIECE_ON_CENETER; 
      L     2; 
      >I    ; 
      )     ; 
      )     ; 
      AN    "Tool 3"; 
      AN    "Tool 4"; 
      JC    M001; 
NETWORK
TITLE =Enable open/close centering in automatic cycle

      O(    ; 
      A(    ; 
      L     "Pickup DATA".DIM_HORIZONTAL_ON_STOCK; 
      L     7; 
      >I    ; 
      )     ; 
      JNB   _001; 
      L     "Pickup DATA".DIM_HORIZONTAL_ON_STOCK; 
      L     7; 
      -I    ; 
      T     #DIM_HZ_ON_STOCK_LESS; 
      AN    OV; 
      SAVE  ; 
      CLR   ; 
_001: A     BR; 
      )     ; 
      O(    ; 
      A(    ; 
      L     "Pickup DATA".DIM_HORIZONTAL_ON_STOCK; 
      L     7; 
      <=I   ; 
      )     ; 
      JNB   _002; 
      L     "Pickup DATA".DIM_HORIZONTAL_ON_STOCK; 
      T     #DIM_HZ_ON_STOCK_LESS; 
      SET   ; 
      SAVE  ; 
      CLR   ; 
_002: A     BR; 
      )     ; 
      =     #AUX; 
NETWORK
TITLE =

      A     "Pickup STEP".Pickup_Step[0]; 
      AN    "M61.3"; 
      S     "Pickup STEP".Pickup_Step[1]; 
      R     "Pickup STEP".Pickup_Step[0]; 
NETWORK
TITLE =

      A(    ; 
      A     "Pickup STEP".Pickup_Step[1]; 
      L     S5T#800MS; 
      SD    T     62; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      A     T     62; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     #DIM_HZ_ON_STOCK_LESS; 
      >I    ; 
      )     ; 
      O     ; 
      A     "Pickup STEP".Pickup_Step[0]; 
      A     "M61.3"; 
      S     "Pickup STEP".Pickup_Step[2]; 
      R     "Pickup STEP".Pickup_Step[1]; 
      R     "Pickup STEP".Pickup_Step[0]; 
NETWORK
TITLE =Descent fast

      A     "Pickup STEP".Pickup_Step[2]; 
      S     "Pickup STEP".Pickup_Step[10]; 
      R     "Pickup STEP".Pickup_Step[2]; 
NETWORK
TITLE =Pickup forward only at first cycle

      A     "Pickup STEP".Pickup_Step[10]; 
      S     "M61.3"; 
NETWORK
TITLE =Descent slow

      A     "Pickup STEP".Pickup_Step[10]; 
      A     "M62.7"; 
      L     S5T#500MS; 
      SD    "T102"; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      A     "T102"; 
      S     "Pickup STEP".Pickup_Step[20]; 
      R     "Pickup STEP".Pickup_Step[10]; 
NETWORK
TITLE =Activation ventose

      A(    ; 
      A     "Pickup STEP".Pickup_Step[20]; 
      JNB   _003; 
      L     "Pickup DATA".AUXDIM_VERT_TAKE_ON_STOC; 
      L     "Pickup DATA".DIM_ANTICIPO_VENTOSE; 
      -I    ; 
      T     #AUX_ACTIVATION_VENTOSE; 
      AN    OV; 
      SAVE  ; 
      CLR   ; 
_003: A     BR; 
      )     ; 
      A(    ; 
      L     #PICKUP_VERTIC_ACTUAL_POS; 
      L     #AUX_ACTIVATION_VENTOSE; 
      >=I   ; 
      )     ; 
      =     L     10.0; 
      A     L     10.0; 
      A(    ; 
      AN    "Pickup DATA".ENABLE_HORI_DISPLACEMENT; 
      A     "Data exchange to OP".PICKUP_SETTING_VALUE.PALLET_TYPE_SING_DOUBLE; 
      O     ; 
      A     "Pickup DATA".ENABLE_HORI_DISPLACEMENT; 
      A     "M61.7"; 
      O     ; 
      AN    "Data exchange to OP".PICKUP_SETTING_VALUE.PALLET_TYPE_SING_DOUBLE; 
      A     "Tool 7"; 
      )     ; 
      S     "M63.6"; 
      S     "M64.6"; 
      A     L     10.0; 
      A(    ; 
      ON    "Data exchange to OP".PICKUP_SETTING_VALUE.PALLET_TYPE_SING_DOUBLE; 
      O     ; 
      A     "Data exchange to OP".PICKUP_SETTING_VALUE.PALLET_TYPE_SING_DOUBLE; 
      A     "Pickup DATA".ENABLE_HORI_DISPLACEMENT; 
      AN    "M61.7"; 
      )     ; 
      S     "M64.6"; 
NETWORK
TITLE =Afblazen woodstock

      A     "Pickup DATA".SEL_NEEDLES_SUCTION_CUP; 
      A(    ; 
      O     "M63.6"; 
      O     "M64.6"; 
      )     ; 
      A(    ; 
      O     "Pickup STEP".Pickup_Step[20]; 
      O     "Pickup STEP".Pickup_Step[140]; 
      )     ; 
      S     "Merker afblaas nozzles"; 
      A(    ; 
      O     "Pickup STEP".Pickup_Step[60]; 
      O     "Pickup STEP".Pickup_Step[162]; 
      O     "M20.2"; 
      ON    "Pickup DATA".SEL_NEEDLES_SUCTION_CUP; 
      O     "Pickup STEP".Pickup_Step[161]; 
      )     ; 
      R     "Merker afblaas nozzles"; 
      NOP   0; 
NETWORK
TITLE =Vertraging Stop Pickup 
//Bij tool 3 en 4 moet ik later stoppen omdat we met naalden werken 
//DB1.DBX0.2= TOOL 3   I19.3    P14 Rearseatback
//DB1.DBX0.3= TOOL 4   I19.4    P15 TLUT
//Na een verschuiving tussen de twee delen moet enkel nog rekening worden 
//gehouden 
//met het tweede deel
      A     "Pickup STEP".Pickup_Step[20]; 
      A(    ; 
      ON    "84SQ1"; 
      O     ; 
      A(    ; 
      ON    "Pickup DATA".ENABLE_HORI_DISPLACEMENT; 
      O     ; 
      A     "Pickup DATA".ENABLE_HORI_DISPLACEMENT; 
      AN    "M61.7"; 
      )     ; 
      AN    "84SQ2"; 
      )     ; 
      =     L     10.0; 
      A     L     10.0; 
      A(    ; 
      O     "Tool 3"; 
      O     "Tool 4"; 
      )     ; 
      L     S5T#1S500MS; 
      SD    "T54"; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      A     L     10.0; 
      AN    "Tool 3"; 
      AN    "Tool 4"; 
      L     S5T#1S100MS; 
      SD    "T64"; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
NETWORK
TITLE =Stop on piece

      A     "Pickup STEP".Pickup_Step[20]; 
      A(    ; 
      ON    "84SQ1"; 
      ON    "84SQ2"; 
      )     ; 
      A(    ; 
      AN    "Tool 3"; 
      AN    "Tool 4"; 
      A     "T64"; 
      O     "T54"; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[30]; 
      R     "Pickup STEP".Pickup_Step[20]; 
NETWORK
TITLE =Delay for rise with piece

      A     "Pickup STEP".Pickup_Step[30]; 
      L     "Pickup DATA".DELAY_RISE_PIECE_RELEASE; 
      SD    "T60"; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      A     "T60"; 
      S     "Pickup STEP".Pickup_Step[40]; 
      R     "Pickup STEP".Pickup_Step[30]; 
NETWORK
TITLE =Rise slow

      A     "Pickup STEP".Pickup_Step[40]; 
      =     L     10.0; 
      A     L     10.0; 
      BLD   102; 
      S     "Pickup STEP".Pickup_Step[50]; 
      A     L     10.0; 
      BLD   102; 
      R     "Pickup STEP".Pickup_Step[40]; 
      A     L     10.0; 
      A     "Pickup DATA".ENABLE_HORI_DISPLACEMENT; 
      =     L     10.1; 
      A     L     10.1; 
      AN    "M61.7"; 
      FN    M     61.5; 
      S     "M61.7"; 
      A     L     10.1; 
      A     "M61.7"; 
      FP    M     61.6; 
      R     "M61.7"; 
NETWORK
TITLE =Stop slow rise for caduta pezzo

      A     "Pickup STEP".Pickup_Step[50]; 
      A(    ; 
      O     "Pickup DATA".ENABLE_SHORT_STOP_PAL; 
      O     "Pickup DATA".ENABLE_HORI_DISPLACEMENT; 
      )     ; 
      L     "Pickup DATA".aaaa; 
      SD    "T69"; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      A     "T69"; 
      S     "Pickup STEP".Pickup_Step[51]; 
      R     "Pickup STEP".Pickup_Step[50]; 
NETWORK
TITLE =Time for wait caduta pezzo

      A     "Pickup STEP".Pickup_Step[51]; 
      A(    ; 
      O     "Pickup DATA".ENABLE_SHORT_STOP_PAL; 
      O     "Pickup DATA".ENABLE_HORI_DISPLACEMENT; 
      )     ; 
      L     "Pickup DATA".aaaa1; 
      SD    "T75"; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      A     "T75"; 
      =     L     10.0; 
      A     L     10.0; 
      AN    "Pickup DATA".ENABLE_HORI_DISPLACEMENT; 
      S     "Pickup STEP".Pickup_Step[53]; 
      A     L     10.0; 
      A     "Pickup DATA".ENABLE_HORI_DISPLACEMENT; 
      S     "Pickup STEP".Pickup_Step[52]; 
      A     L     10.0; 
      BLD   102; 
      R     "Pickup STEP".Pickup_Step[51]; 
NETWORK
TITLE =Slow forward to pick up second piece

      A(    ; 
      A     "Pickup STEP".Pickup_Step[52]; 
      JNB   _004; 
      L     #DIM_HZ_ON_STOCK_LESS; 
      L     125; 
      +I    ; 
      T     #POS_PIECE2; 
      AN    OV; 
      SAVE  ; 
      CLR   ; 
_004: A     BR; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     #POS_PIECE2; 
      >=I   ; 
      )     ; 
      =     L     10.0; 
      A     L     10.0; 
      A     "M61.7"; 
      S     "Pickup STEP".Pickup_Step[20]; 
      A     L     10.0; 
      AN    "M61.7"; 
      S     "Pickup STEP".Pickup_Step[53]; 
      A     L     10.0; 
      BLD   102; 
      R     "Pickup STEP".Pickup_Step[52]; 
NETWORK
TITLE =Rise fast

      A(    ; 
      A     "Pickup STEP".Pickup_Step[50]; 
      AN    "Pickup DATA".ENABLE_SHORT_STOP_PAL; 
      AN    "Pickup DATA".ENABLE_HORI_DISPLACEMENT; 
      O     "Pickup STEP".Pickup_Step[53]; 
      )     ; 
      A(    ; 
      ON    "M62.7"; 
      O     ; 
      A(    ; 
      L     #PICKUP_VERTIC_ACTUAL_POS; 
      L     0; 
      >I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_VERTIC_ACTUAL_POS; 
      L     100; 
      <I    ; 
      )     ; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[60]; 
      R     "Pickup STEP".Pickup_Step[50]; 
      R     "Pickup STEP".Pickup_Step[53]; 
NETWORK
TITLE =Rise slow

      A     "Pickup STEP".Pickup_Step[60]; 
      A     "M62.6"; 
      S     "Pickup STEP".Pickup_Step[70]; 
      R     "Pickup STEP".Pickup_Step[60]; 
NETWORK
TITLE =Traslation slow to centering

M001: A(    ; 
      O     "Pickup STEP".Pickup_Step[70]; 
      O     ; 
      A     "Pickup STEP".Pickup_Step[0]; 
      A(    ; 
      O     "M63.7"; 
      O     ; 
      A     "M23.1"; 
      A(    ; 
      L     "Pickup DATA".ACTUAL_PIECE_ON_CENETER; 
      L     2; 
      >I    ; 
      )     ; 
      )     ; 
      )     ; 
      A     "83SQ1"; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     5000; 
      <I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     0; 
      >=I   ; 
      )     ; 
      =     L     10.0; 
      A     L     10.0; 
      BLD   102; 
      S     "Pickup STEP".Pickup_Step[80]; 
      A     L     10.0; 
      BLD   102; 
      R     "Pickup STEP".Pickup_Step[70]; 
      A     L     10.0; 
      BLD   102; 
      R     "Pickup STEP".Pickup_Step[0]; 
      A     L     10.0; 
      A     "Data exchange to OP".PICKUP_SETTING_VALUE.ENA_OPEN_CLOSE_CENTER; 
      S     "M61.1"; 
      A     L     10.0; 
      BLD   102; 
      S     "M61.3"; 
NETWORK
TITLE =

      A     "Pickup STEP".Pickup_Step[80]; 
      A(    ; 
      O     "Tool 3"; 
      O     "Tool 4"; 
      )     ; 
      JC    M010; 
NETWORK
TITLE =Traslation fast to centering

      A(    ; 
      A     "Pickup STEP".Pickup_Step[80]; 
      L     S5T#2S; 
      SD    T     66; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      A     T     66; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     5000; 
      <I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     0; 
      >=I   ; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[81]; 
      R     "Pickup STEP".Pickup_Step[80]; 
NETWORK
TITLE =Traslation slow to centering

      A     "Pickup STEP".Pickup_Step[81]; 
      A     "M63.3"; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     5000; 
      <I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     0; 
      >=I   ; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[90]; 
      R     "Pickup STEP".Pickup_Step[81]; 
NETWORK
TITLE =Stop traslation

      A     "Pickup STEP".Pickup_Step[90]; 
      A     "M62.3"; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     5000; 
      <I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     0; 
      >=I   ; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[100]; 
      R     "Pickup STEP".Pickup_Step[90]; 
NETWORK
TITLE =Descent slow to centering

      A     "Pickup STEP".Pickup_Step[100]; 
      A     "M62.6"; 
      S     "Pickup STEP".Pickup_Step[110]; 
      R     "Pickup STEP".Pickup_Step[100]; 
NETWORK
TITLE =Descent fast to centering

M005: A(    ; 
      O     "Pickup STEP".Pickup_Step[110]; 
      O     "Pickup STEP".Pickup_Step[292]; 
      )     ; 
      AN    "M62.6"; 
      FP    "M64.3"; 
      S     "Pickup STEP".Pickup_Step[120]; 
      R     "Pickup STEP".Pickup_Step[110]; 
NETWORK
TITLE =Descent slow to centering

      A     "Pickup STEP".Pickup_Step[120]; 
      A     "M63.0"; 
      =     L     10.0; 
      A     L     10.0; 
      BLD   102; 
      S     "Pickup STEP".Pickup_Step[130]; 
      A     L     10.0; 
      BLD   102; 
      R     "Pickup STEP".Pickup_Step[120]; 
      A     L     10.0; 
      AN    "Pickup STEP".Pickup_Step[292]; 
      AN    "M63.7"; 
      AN    "M23.1"; 
      FP    "M64.2"; 
      JNB   _005; 
      L     "Pickup DATA".ACTUAL_PIECE_ON_CENETER; 
      L     1; 
      +I    ; 
      T     "Pickup DATA".ACTUAL_PIECE_ON_CENETER; 
_005: NOP   0; 
NETWORK
TITLE =

      O(    ; 
      L     "Pickup DATA".DIM_VERT_TAKE_ON_STO_CEN; 
      L     50; 
      +I    ; 
      T     MW   274; 
      AN    OV; 
      SAVE  ; 
      CLR   ; 
      A     BR; 
      )     ; 
      O(    ; 
      L     "Pickup DATA".DIM_VERT_TAKE_ON_STO_CEN; 
      L     50; 
      -I    ; 
      T     MW   276; 
      AN    OV; 
      SAVE  ; 
      CLR   ; 
      A     BR; 
      )     ; 
      =     M    278.1; 
NETWORK
TITLE =Picking in positie vertikaal voor lossen deel

      A     "M62.2"; 
      A(    ; 
      L     #PICKUP_VERTIC_ACTUAL_POS; 
      L     MW   276; 
      >I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_VERTIC_ACTUAL_POS; 
      L     MW   274; 
      <I    ; 
      )     ; 
      =     "M 278.0"; 
NETWORK
TITLE =Release the piece on centering

      A     "Pickup STEP".Pickup_Step[130]; 
      A     "M 278.0"; 
      S     "Pickup STEP".Pickup_Step[131]; 
      R     "Pickup STEP".Pickup_Step[130]; 
      R     "M63.6"; 
      R     "M64.6"; 
      R     "M61.1"; 
NETWORK
TITLE =Salta if oven not ready for take the pieces

      A     "Pickup STEP".Pickup_Step[131]; 
      AN    "M63.7"; 
      AN    "Pickup STEP".Pickup_Step[292]; 
      AN    "Pickup STEP".Pickup_Step[180]; 
      A     "M63.0"; 
      AN    "M250.0"; 
      AN    "M252.0"; 
      AN    "M254.0"; 
      AN    "M254.1"; 
      AN    "M250.1"; 
      AN    "M252.1"; 
      S     "Pickup STEP".Pickup_Step[132]; 
NETWORK
TITLE =Salta if oven not ready for take the pieces

      A     "Pickup STEP".Pickup_Step[132]; 
      JC    M002; 
NETWORK
TITLE =Go down for take the piece from centering

      A(    ; 
      O(    ; 
      A     "Pickup STEP".Pickup_Step[131]; 
      AN    "Pickup STEP".Pickup_Step[292]; 
      AN    "M63.7"; 
      L     S5T#2S; 
      SD    "T61"; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      A     "T61"; 
      )     ; 
      O     ; 
      A     "Pickup STEP".Pickup_Step[131]; 
      A     "M63.7"; 
      O     "Pickup STEP".Pickup_Step[292]; 
      )     ; 
      A     "M65.4"; 
      A     "M65.5"; 
      =     L     10.0; 
      A     L     10.0; 
      BLD   102; 
      S     "Pickup STEP".Pickup_Step[140]; 
      A     L     10.0; 
      BLD   102; 
      R     "Pickup STEP".Pickup_Step[130]; 
      A     L     10.0; 
      BLD   102; 
      R     "Pickup STEP".Pickup_Step[292]; 
      A     L     10.0; 
      A(    ; 
      O     "Data exchange to OP".PICKUP_SETTING_VALUE.PALLET_TYPE_SING_DOUBLE; 
      O     ; 
      AN    "Data exchange to OP".PICKUP_SETTING_VALUE.PALLET_TYPE_SING_DOUBLE; 
      A     "Tool 7"; 
      )     ; 
      S     "M63.6"; 
      A     L     10.0; 
      BLD   102; 
      S     "M64.6"; 
NETWORK
TITLE =Take the piece on centering

      A     "Pickup STEP".Pickup_Step[140]; 
      A(    ; 
      ON    "84SQ1"; 
      ON    "84SQ2"; 
      )     ; 
      =     L     10.0; 
      A     L     10.0; 
      AN    "Tool 5"; 
      L     S5T#900MS; 
      SD    T     68; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      A     L     10.0; 
      A     "Tool 5"; 
      L     S5T#400MS; 
      SD    T     95; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
NETWORK
TITLE =

      A     "Pickup STEP".Pickup_Step[140]; 
      A(    ; 
      ON    "84SQ1"; 
      ON    "84SQ2"; 
      )     ; 
      A(    ; 
      O     T     68; 
      O     T     95; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[150]; 
      R     "Pickup STEP".Pickup_Step[140]; 
NETWORK
TITLE =Delay for slow rise with piece from centering

M002: A(    ; 
      O     "Pickup STEP".Pickup_Step[150]; 
      O     "Pickup STEP".Pickup_Step[132]; 
      )     ; 
      L     "Pickup DATA".DELAY_RISE_PIECE_RELEASE; 
      SD    "T65"; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      A     "T65"; 
      S     "Pickup STEP".Pickup_Step[160]; 
      R     "Pickup STEP".Pickup_Step[150]; 
      R     "Pickup STEP".Pickup_Step[131]; 
NETWORK
TITLE =Stop slow rise for caduta pezzo on centering

      A     "Pickup STEP".Pickup_Step[160]; 
      A     "Pickup DATA".ENABLE_SHORT_STOP_CENTRE; 
      L     "Pickup DATA".aaaa2; 
      SD    "T76"; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      A     "T76"; 
      S     "Pickup STEP".Pickup_Step[161]; 
      R     "Pickup STEP".Pickup_Step[160]; 
NETWORK
TITLE =Time for wait caduta pezzo

      A     "Pickup STEP".Pickup_Step[161]; 
      A     "Pickup DATA".ENABLE_SHORT_STOP_CENTRE; 
      L     "Pickup DATA".aaaa3; 
      SD    "T77"; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      A     "T77"; 
      S     "Pickup STEP".Pickup_Step[162]; 
      R     "Pickup STEP".Pickup_Step[161]; 
NETWORK
TITLE =Rise fast

      A(    ; 
      A     "Pickup STEP".Pickup_Step[160]; 
      AN    "Pickup DATA".ENABLE_SHORT_STOP_CENTRE; 
      O     ; 
      A     "Pickup STEP".Pickup_Step[162]; 
      A     "Pickup DATA".ENABLE_SHORT_STOP_CENTRE; 
      )     ; 
      AN    "M63.0"; 
      S     "Pickup STEP".Pickup_Step[170]; 
      R     "Pickup STEP".Pickup_Step[160]; 
      R     "Pickup STEP".Pickup_Step[162]; 
NETWORK
TITLE =Rise slow

      A     "Pickup STEP".Pickup_Step[170]; 
      A     "M62.6"; 
      S     "Pickup STEP".Pickup_Step[180]; 
      R     "Pickup STEP".Pickup_Step[170]; 
NETWORK
TITLE =

      A     "Pickup STEP".Pickup_Step[180]; 
      A     "Pickup STEP".Pickup_Step[132]; 
      AN    "Tool 3"; 
      AN    "Tool 4"; 
      JC    M003; 
NETWORK
TITLE =Traslation fast to rete

M010: A(    ; 
      A     "Pickup STEP".Pickup_Step[180]; 
      A     "83SQ1"; 
      O     ; 
      A     "Pickup STEP".Pickup_Step[80]; 
      A(    ; 
      O     "Tool 3"; 
      O     "Tool 4"; 
      )     ; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     5000; 
      <I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     0; 
      >=I   ; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[190]; 
      R     "Pickup STEP".Pickup_Step[180]; 
      R     "Pickup STEP".Pickup_Step[80]; 
NETWORK
TITLE =Traslation slow to rete

      A     "Pickup STEP".Pickup_Step[190]; 
      A     "M63.3"; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     5000; 
      <I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     0; 
      >=I   ; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[200]; 
      R     "Pickup STEP".Pickup_Step[190]; 
NETWORK
TITLE =Traslation fast to rete

      A     "Pickup STEP".Pickup_Step[200]; 
      AN    "M63.4"; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     5000; 
      <I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     0; 
      >=I   ; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[201]; 
      R     "Pickup STEP".Pickup_Step[200]; 
NETWORK
TITLE =Traslation slow to rete

      A     "Pickup STEP".Pickup_Step[201]; 
      A     "M63.4"; 
      S     "Pickup STEP".Pickup_Step[202]; 
      R     "Pickup STEP".Pickup_Step[201]; 
NETWORK
TITLE =Stop traslation

      A     "Pickup STEP".Pickup_Step[202]; 
      A     "M62.5"; 
      S     "Pickup STEP".Pickup_Step[210]; 
      R     "Pickup STEP".Pickup_Step[202]; 
NETWORK
TITLE =Wait piece on rete will go in the oven

      A     "Pickup STEP".Pickup_Step[210]; 
      A(    ; 
      O     "M250.0"; 
      O     "M252.0"; 
      O     "M254.0"; 
      O     "M254.1"; 
      O     "M250.1"; 
      O     "M252.1"; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[220]; 
      R     "Pickup STEP".Pickup_Step[210]; 
      R     "M250.0"; 
      R     "M252.0"; 
      R     "M254.0"; 
NETWORK
TITLE =Descent slow to rete

      A(    ; 
      O     "Pickup STEP".Pickup_Step[220]; 
      O     ; 
      A     "Pickup STEP".Pickup_Step[281]; 
      A     "Data exchange to OP".PICKUP_SETTING_VALUE.PALLET_TYPE_SING_DOUBLE; 
      A(    ; 
      O     "M72.0"; 
      O     "M72.2"; 
      )     ; 
      A(    ; 
      O     "M250.0"; 
      O     "M252.0"; 
      )     ; 
      )     ; 
      =     "M23.7"; 
      A     "M23.7"; 
      AN    M    106.0; 
      L     "Pickup DATA".aaaa4; 
      SD    "T78"; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
NETWORK
TITLE =

      A     "M23.7"; 
      A(    ; 
      O     "T78"; 
      O     "M23.1"; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[230]; 
      R     "Pickup STEP".Pickup_Step[220]; 
      R     "Pickup STEP".Pickup_Step[281]; 
NETWORK
TITLE =Descent fast to rete

      A     "Pickup STEP".Pickup_Step[230]; 
      S     "Pickup STEP".Pickup_Step[240]; 
      R     "Pickup STEP".Pickup_Step[230]; 
NETWORK
TITLE =Descent slow to rete

      A(    ; 
      A     "Pickup STEP".Pickup_Step[240]; 
      JNB   _006; 
      L     "Pickup DATA".DIM_VERT_RELEASE_ON_RETE; 
      L     150; 
      -I    ; 
      T     MW   170; 
      AN    OV; 
      SAVE  ; 
      CLR   ; 
_006: A     BR; 
      )     ; 
      A(    ; 
      L     #PICKUP_VERTIC_ACTUAL_POS; 
      L     0; 
      >I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_VERTIC_ACTUAL_POS; 
      L     500; 
      <I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_VERTIC_ACTUAL_POS; 
      L     MW   170; 
      >I    ; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[250]; 
      R     "Pickup STEP".Pickup_Step[240]; 
NETWORK
TITLE =Stop and release piece

      A     "Pickup STEP".Pickup_Step[250]; 
      A     "M62.4"; 
      =     L     10.0; 
      A     L     10.0; 
      BLD   102; 
      S     "Pickup STEP".Pickup_Step[260]; 
      A     L     10.0; 
      BLD   102; 
      R     "Pickup STEP".Pickup_Step[250]; 
      A     L     10.0; 
      A(    ; 
      A     "Data exchange to OP".PICKUP_SETTING_VALUE.PALLET_TYPE_SING_DOUBLE; 
      A(    ; 
      O     "M72.0"; 
      O     "M72.2"; 
      )     ; 
      A(    ; 
      O     "M250.0"; 
      O     "M252.0"; 
      O     "M254.0"; 
      )     ; 
      O     "M72.4"; 
      O     ; 
      A(    ; 
      O     "Tool 3"; 
      O     "Tool 4"; 
      O     "Tool 7"; 
      )     ; 
      AN    "Data exchange to OP".PICKUP_SETTING_VALUE.PALLET_TYPE_SING_DOUBLE; 
      A     "M72.0"; 
      )     ; 
      R     "M63.6"; 
      A     L     10.0; 
      BLD   102; 
      R     "M64.6"; 
      A     L     10.0; 
      A(    ; 
      A     "Data exchange to OP".PICKUP_SETTING_VALUE.PALLET_TYPE_SING_DOUBLE; 
      A(    ; 
      O     "M72.0"; 
      O     "M72.2"; 
      O     "M72.4"; 
      )     ; 
      ON    "Data exchange to OP".PICKUP_SETTING_VALUE.PALLET_TYPE_SING_DOUBLE; 
      )     ; 
      AN    "M63.6"; 
      AN    "M64.6"; 
      AN    "Tool 3"; 
      AN    "Tool 4"; 
      FP    "M64.1"; 
      JNB   _007; 
      L     "Pickup DATA".ACTUAL_PIECE_ON_CENETER; 
      L     1; 
      -I    ; 
      T     "Pickup DATA".ACTUAL_PIECE_ON_CENETER; 
_007: NOP   0; 
NETWORK
TITLE =Wait and fast rise

      A(    ; 
      A     "M72.4"; 
      AN    "M63.6"; 
      AN    "M64.6"; 
      ON    "M72.4"; 
      )     ; 
      A     "Pickup STEP".Pickup_Step[260]; 
      L     "Pickup DATA".DELAY_RISE_PIECE_RELEASE; 
      SD    "T63"; 
      NOP   0; 
      NOP   0; 
      NOP   0; 
      A     "T63"; 
      S     "Pickup STEP".Pickup_Step[270]; 
      R     "Pickup STEP".Pickup_Step[260]; 
NETWORK
TITLE =Slow rise

      A     "Pickup STEP".Pickup_Step[270]; 
      A     "M62.6"; 
      S     "Pickup STEP".Pickup_Step[280]; 
      R     "Pickup STEP".Pickup_Step[270]; 
NETWORK
TITLE =

      A     "Pickup STEP".Pickup_Step[280]; 
      A     "Data exchange to OP".PICKUP_SETTING_VALUE.PALLET_TYPE_SING_DOUBLE; 
      A(    ; 
      O     "M72.0"; 
      O     "M72.2"; 
      )     ; 
      A     "83SQ1"; 
      A     "M63.6"; 
      AN    "M64.6"; 
      S     "Pickup STEP".Pickup_Step[281]; 
      R     "Pickup STEP".Pickup_Step[280]; 
NETWORK
TITLE =Pickup fast traslation to stock position

M003: A(    ; 
      O     "Pickup STEP".Pickup_Step[280]; 
      O     "Pickup STEP".Pickup_Step[131]; 
      O     ; 
      A     "Pickup STEP".Pickup_Step[180]; 
      A     "Pickup STEP".Pickup_Step[132]; 
      )     ; 
      A     "83SQ1"; 
      S     "Pickup STEP".Pickup_Step[290]; 
      R     "Pickup STEP".Pickup_Step[280]; 
      R     "Pickup STEP".Pickup_Step[131]; 
      R     "Pickup STEP".Pickup_Step[180]; 
      R     "Pickup STEP".Pickup_Step[132]; 
NETWORK
TITLE =Salta if change pallet is active or centering full

      A     "Pickup STEP".Pickup_Step[290]; 
      A(    ; 
      A     "E1.3"; 
      A     "85SA2"; 
      O     "M160.1"; 
      O(    ; 
      L     "Pickup DATA".ACTUAL_PIECE_ON_CENETER; 
      L     "Pickup DATA".PIECE_ON_CENTERING_BY_OP; 
      >=I   ; 
      )     ; 
      )     ; 
      AN    "Tool 3"; 
      AN    "Tool 4"; 
      A(    ; 
      L     "Pickup DATA".ACTUAL_PIECE_ON_CENETER; 
      L     0; 
      >I    ; 
      )     ; 
      JC    M004; 
NETWORK
TITLE =Pickup fast traslation to stock position

      A     "Pickup STEP".Pickup_Step[290]; 
      A     "M63.2"; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     5000; 
      <I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     0; 
      >=I   ; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[300]; 
      R     "Pickup STEP".Pickup_Step[290]; 
NETWORK
TITLE =Pickup slow traslation to stock position

      A     "Pickup STEP".Pickup_Step[300]; 
      AN    "M63.2"; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     5000; 
      <I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     0; 
      >=I   ; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[301]; 
      R     "Pickup STEP".Pickup_Step[300]; 
NETWORK
TITLE =Pickup stop in  home position

      A     "Pickup STEP".Pickup_Step[301]; 
      A     "M62.1"; 
      S     "Pickup STEP".Pickup_Step[310]; 
      R     "Pickup STEP".Pickup_Step[301]; 
NETWORK
TITLE =Restart the cycle

      A     "Pickup STEP".Pickup_Step[310]; 
      JC    M006; 
NETWORK
TITLE =Pickup slow traslation to centering position

M004: A     "Pickup STEP".Pickup_Step[290]; 
      A     "M64.0"; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     5000; 
      <I    ; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     0; 
      >=I   ; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[291]; 
      R     "Pickup STEP".Pickup_Step[290]; 
NETWORK
TITLE =Pickup stop on centering

      A(    ; 
      A     "Pickup STEP".Pickup_Step[291]; 
      JNB   _008; 
      L     "Pickup DATA".DIM_HORIZON_ON_CENTERING; 
      L     7; 
      -I    ; 
      T     #AAAAAAAA; 
      AN    OV; 
      SAVE  ; 
      CLR   ; 
_008: A     BR; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     #AAAAAAAA; 
      <=I   ; 
      )     ; 
      A(    ; 
      L     #PICKUP_HORIZ_ACTUAL_POS; 
      L     0; 
      >I    ; 
      )     ; 
      S     "Pickup STEP".Pickup_Step[292]; 
      R     "Pickup STEP".Pickup_Step[291]; 
NETWORK
TITLE =Salta when is arrived to centering

      A     "Pickup STEP".Pickup_Step[292]; 
      JC    M005; 
END_FUNCTION

JoopB
Berichten: 958
Lid geworden op: 30-11-2006 20:42:15
Locatie: Weert

Re: PLC (315-2DP) gaat in stop in FC62

Bericht door JoopB » 07-01-2018 16:15:01

De code is zonder symbooltabel niet om te zetten in een FC , je moet een source genereren met absolute adressen dan is het mogelijk deze FC in Step 7 te openen, ik heb de code in Notepad++ geplakt en daar even de zoekfunctie op losgelaten en als de fout zich voordoet bij de sprong in het laatste netwerk dan moet je eens kijken in het netwerk waar "Pickup STEP".Pickup_Step[292] gereset wordt. Als deze variable hoog is en "M65.4" of "M65,5" is niet hoog zal "Pickup STEP".Pickup_Step[292] niet gereset worden en kom je in een loop terecht ( Zolang "Pickup STEP".Pickup_Step[292] hoog is wordt er aan het einde v/d FC weer naar M005 gesprongen.

Ik ken de toepassing van de FC niet maar de simpelste oplossing van het probleem is volgens mij om het laatste netwerk met de sprong te verplaatsen naar het eerste netwerk van de FC je spring dan de volgende cyclus naar M005 maar doordat je dan een sprong vooruit maakt kom je nooit in een oneindige lus terecht, het enige nadeel hiervan is dat een eventuele reactie op deze stap een cyclus langer duurt doordat deze stap dan pas in de volgende cyclus wordt afgevraagd.

MVG, Joop

Niels_1980
Berichten: 77
Lid geworden op: 11-10-2009 16:16:35

Re: PLC (315-2DP) gaat in stop in FC62

Bericht door Niels_1980 » 08-01-2018 17:29:44

Dag Joop,

Bedankt voor de snelle reactive, intussen was ik ook al uitgekomen bij M65.4 / 65.5 , het idee om de instructie naar voren te plaatsen is idd een simpele oplossing. Ik heb het nu aangepast als nu de step 292 niet wordt gereset dan zal de plc allezins niet meer in stop gaan, maar zal de picking niet meer verder gaan, vervolgens kan ik dan kijken welke van de 2 merkers 0 blijven.

mvg.

Plaats reactie

Terug naar “S7-300”