   0:# INIT_VARS
   1:if not '$oneShot_0000_INIT_VARS' {
   2:    set bit '$oneShot_0000_INIT_VARS'
   3:}
   4:# 
   5:# ======= START RUNG 1 =======
   6:set bit '$rung_top'
   8:# start series [
   9:# ELEM_CONTACTS
  10:if 'Yosc1' {
  11:    clear bit '$rung_top'
  12:}
  14:# ELEM_COIL
  15:let bit 'Yosc1' := '$rung_top'
  17:# ] finish series
  18:# 
  19:# ======= START RUNG 2 =======
  20:set bit '$rung_top'
  22:# start series [
  23:# ELEM_CONTACTS
  24:if 'Yosc2' {
  25:    clear bit '$rung_top'
  26:}
  28:# ELEM_TON
  29:if '$rung_top' {
  30:    if 'Tt3' < 2 {
  31:        increment 'Tt3'
  32:        clear bit '$rung_top'
  33:    }
  34:} else {
  35:    let var 'Tt3' := 0
  36:}
  38:# ELEM_TOF
  39:if not '$Tt4_antiglitch' {
  40:    let var 'Tt4' := 2
  41:}
  42:set bit '$Tt4_antiglitch'
  43:if not '$rung_top' {
  44:    if 'Tt4' < 2 {
  45:        increment 'Tt4'
  46:        set bit '$rung_top'
  47:    }
  48:} else {
  49:    let var 'Tt4' := 0
  50:}
  52:# ELEM_COIL
  53:let bit 'Yosc2' := '$rung_top'
  55:# ] finish series
  56:# 
  57:# ======= START RUNG 3 =======
  58:set bit '$rung_top'
  60:# start series [
  61:# ELEM_CONTACTS
  62:if 'Yosc3' {
  63:    clear bit '$rung_top'
  64:}
  66:# ELEM_TON
  67:if '$rung_top' {
  68:    if 'Tt1' < 1 {
  69:        increment 'Tt1'
  70:        clear bit '$rung_top'
  71:    }
  72:} else {
  73:    let var 'Tt1' := 0
  74:}
  76:# ELEM_TOF
  77:if not '$Tt2_antiglitch' {
  78:    let var 'Tt2' := 1
  79:}
  80:set bit '$Tt2_antiglitch'
  81:if not '$rung_top' {
  82:    if 'Tt2' < 1 {
  83:        increment 'Tt2'
  84:        set bit '$rung_top'
  85:    }
  86:} else {
  87:    let var 'Tt2' := 0
  88:}
  90:# ELEM_COIL
  91:let bit 'Yosc3' := '$rung_top'
  93:# ] finish series
