/******************************************************************************

             File generated by Beologic visualSTATE Classic Matrix Designer
                               Version 3.01
                           Fri Jul 04 14:49:35 1997

******************************************************************************/

#STATEEVENT

/*$@
#FONT          0, 0, 10
#SIZE          0, 0, 1028, 744
#COLORS        0X00FF00, 0XC0C0C0, 0X00FFFF, 0XFF00FF
#LEFTTEXT      0
#PRINTER       0
#PRINT         0, 79, 65, 0
#POST          0, 11.67, 8.25, 0, 1.00, 0, 1, 1, 0.60, 0.60, 0.75, 0.75
#PRINTPROCESS  "net print $1 lpt1:"
#COMPRESS      1
$*/

SE_INPUT
  Check,
    "Button";
  ClockSet,
    "Button";
  Down,
    "Button";
  Eject,
    "Top Button";
  FF,
    "Top Button";
  Next,
    "Button";
  Play,
    "Top Button";
  Power,
    "Top Button";
  Rec,
    "Button";
  Rew,
    "Top Button";
  Stop,
    "Top Button";
  TAPEINSERT,
    "A tape is being inserted into the mashine";
  Timer,
    "Button";
  Tuner,
    "Button";
  Up,
    "Button";
  SE_RESET;
  UpdateDisp;
  TimeOut;

SE_INPUTGROUP

SE_STATE
  ChooseSet;
  Dato;
  Etpm;
  Etpt;
  FastForward;
  Nop;
  Off;
  On;
  P1;
  P2;
  P3;
  P4;
  P5;
  P6;
  P7;
  P8;
  PlayBack;
  PlayFF;
  Playing;
  ProgPos;
  Record;
  Rewind;
  SetChan;
  SetDate;
  SetHour;
  SetMin;
  SetMonth;
  SetProg;
  SetYear;
  Stopped;
  Stpm;
  Stpt;
  TimerStat;
  TapeIn;
  TapeOut;
  TimerEnable;
  TimerDisable;
  DispON;
  DispOFF;
  DispTUNER;
  DispSETCL;
  DispP_1;
  DispP_2;
  DispP_3;
  DispPLAY;
  DispOFFview;

SE_STATEGROUP
  ProgNr (P1, P2, P3, P5, P6, P7, P8, P4)
    /*$$MSGPOS0 100 0 0 -1 -1 0 0 1024 35 353 1$*/;
  TimerFunc (TimerEnable, TimerDisable)
    /*$$MSGPOS0 100 0 0 -1 -1 0 0 1024 35 672 1$*/;
  PowerStatus (Off, On)
    /*$$MSGPOS0 100 0 0 -1 -1 0 0 1024 35 353 1$*/;
  DisplayStatus (DispON, DispOFF, DispTUNER, DispSETCL, DispP_1, DispP_2,
    DispP_3, DispPLAY, DispOFFview)
    /*$$MSGPOS0 100 0 0 -1 -1 0 0 1024 35 672 1$*/;
  Setting (ChooseSet, SetYear, SetMonth, SetDate, SetHour, SetMin, SetProg,
    SetChan, Nop, TimerStat, ProgPos, Dato, Stpt, Stpm, Etpt, Etpm)
    /*$$MSGPOS0 100 0 8 -1 -1 0 0 1024 35 672 1$*/;
  Player (Stopped, Playing, FastForward, Rewind, PlayBack, PlayFF, Record)
    /*$$MSGPOS0 100 0 0 -1 -1 2 0 1024 35 672 1$*/;
  TapeStatus (TapeIn, TapeOut)
    /*$$MSGPOS0 100 0 0 -1 -1 0 0 1024 352 672 1$*/;

SE_OUTPUT
  EatTape,
    "Grab tape from user";
  EjectTape,
    "Spit out tape";
  MotorFF;
  MotorPlay;
  MotorRew;
  MotorStop;
  OutTuner,
    "Switch to output from tuner";
  OutVideo,
    "Switch to output from tape";
  TapeOffHead,
    "Tape is around videohead";
  TapeOnHead,
    "Tape is NOT around videohead";
  Inc,
    "Increases the number belonging to  the current State";
  Dec,
    "Decreases the number belonging to  the current State";
  D1_ON;
  D2_ON;
  D3_ON;
  D4_ON;
  D5_ON;
  D7_ON;
  D9_ON;
  D1_OFF;
  D2_OFF;
  D3_OFF;
  D4_OFF;
  D5_OFF;
  D7_OFF;
  D9_OFF;
  D6_OFF;
  D6_CHNL;
  D6_YEAR;
  D6_PGM;
  D6_PLAY;
  D6_FF;
  D6_REW;
  D8_ON;
  D8_OFF;
  D8_PIL;
  D10_OFF;
  D10_MON;
  D11_OFF;
  D11_CNT;
  D11_DATE;
  D12_OFF;
  D12_CNT;
  D12_HOUR;
  D12_SHOW_CH;
  D13_OFF;
  D13_CNT;
  D13_MIN;
  D13_NR;
  BLINK_D6;
  BLINK_D10;
  BLINK_D11;
  BLINK_D12;
  BLINK_D13;
  BLINK_NONE;
  D11_CLK;
  D12_CLK;
  D10_BH,
    "Display: BH=begin hour";
  D11_BM,
    "Display: BM=begin minute";
  D12_EH,
    "Display: BM=begin minute";
  D13_EM,
    "Display: EM=end minute";
  InitWatch;

  /*$$MNCSPOS0 100 0 -1 -1 0 0 219 35 672$*/

SE_RULE        /* Rules from ProgNr */

  SE_RESET : P1
    /*$$MCOND0 ProgNr @ 0 100 **$*/;
  Check TimerStat P1 : P2
    /*$$MCOND0 ProgNr P1 1 100 **$*/;
  Check TimerStat P2 : P3
    /*$$MCOND0 ProgNr P2 1 100 **$*/;
  Check TimerStat P3 : P4
    /*$$MCOND0 ProgNr P3 1 100 **$*/;
  Check TimerStat P5 : P6
    /*$$MCOND0 ProgNr P5 1 100 **$*/;
  Check TimerStat P6 : P7
    /*$$MCOND0 ProgNr P6 1 100 **$*/;
  Check TimerStat P7 : P8
    /*$$MCOND0 ProgNr P7 1 100 **$*/;
  Check TimerStat P8 : P1 ChooseSet
    /*$$MCOND0 ProgNr P8 1 100 **$*/;
  Check TimerStat P4 : P5
    /*$$MCOND0 ProgNr P4 1 100 **$*/;

SE_RULE        /* Rules from TimerFunc */

  SE_RESET : TimerDisable D2_OFF
    /*$$MCOND0 TimerFunc @ 0 100 **$*/;
  Timer TapeIn TimerEnable : TimerDisable On DispON D2_OFF
    /*$$MCOND0 TimerFunc TimerEnable 1 100 **$*/;
  Timer TapeIn TimerDisable : TimerEnable Off DispOFF D2_ON
    /*$$MCOND0 TimerFunc TimerDisable 1 100 **$*/;

SE_RULE        /* Rules from PowerStatus */

  SE_RESET : Off
    /*$$MCOND0 PowerStatus @ 0 100 **$*/;
  Power TimerDisable Off : On DispON
    /*$$MCOND0 PowerStatus Off 1 100 **$*/;
  Power TimerDisable On : Off DispOFF
    /*$$MCOND0 PowerStatus On 1 100 **$*/;
  Play TapeIn TimerDisable Off : On
    /*$$MCOND0 PowerStatus Off 2 100 **$*/;
  FF TapeIn TimerDisable Off : On
    /*$$MCOND0 PowerStatus Off 3 100 **$*/;
  Rew TapeIn TimerDisable Off : On
    /*$$MCOND0 PowerStatus Off 4 100 **$*/;
  TAPEINSERT TapeOut Off : On DispON
    /*$$MCOND0 PowerStatus Off 5 100 **$*/;

SE_RULE        /* Rules from DisplayStatus */

  SE_RESET : DispOFF
    /*$$MCOND0 DisplayStatus @ 0 100 **$*/;
  UpdateDisp DispON : D4_OFF D5_OFF D6_CHNL D7_OFF D8_ON D9_ON D10_OFF
    D11_CNT D12_CNT D13_CNT BLINK_NONE
    /*$$MCOND0 DisplayStatus DispON 1 100 **$*/;
  UpdateDisp DispOFF : D4_OFF D3_OFF D5_OFF D6_OFF D7_OFF D8_ON D9_OFF
    D10_OFF D11_CLK D12_CLK D13_OFF BLINK_NONE
    /*$$MCOND0 DisplayStatus DispOFF 1 100 **$*/;
  UpdateDisp DispTUNER : D4_OFF D5_OFF D6_CHNL D7_OFF D8_OFF D9_ON D10_OFF
    D11_OFF D12_SHOW_CH D13_NR
    /*$$MCOND0 DisplayStatus DispTUNER 1 100 **$*/;
  UpdateDisp DispSETCL : D4_ON D5_OFF D6_YEAR D7_OFF D8_OFF D9_ON D10_MON
    D11_DATE D12_HOUR D13_MIN
    /*$$MCOND0 DisplayStatus DispSETCL 1 100 **$*/;
  UpdateDisp DispP_1 : D4_OFF D5_OFF D6_PGM D7_OFF D8_OFF D9_OFF D10_OFF
    D11_OFF D12_OFF D13_OFF
    /*$$MCOND0 DisplayStatus DispP_1 1 100 **$*/;
  UpdateDisp DispP_2 : D4_ON D5_OFF D6_CHNL D7_OFF D8_OFF D9_OFF D10_MON
    D11_DATE D12_OFF D13_OFF
    /*$$MCOND0 DisplayStatus DispP_2 1 100 **$*/;
  UpdateDisp DispP_3 : D4_OFF D5_ON D6_CHNL D7_ON D8_PIL D9_ON D10_BH
    D11_BM D12_EH D13_EM
    /*$$MCOND0 DisplayStatus DispP_3 1 100 **$*/;
  UpdateDisp DispPLAY : D4_OFF D5_OFF D7_OFF D8_ON D9_ON D10_OFF D11_CNT
    D12_CNT D13_CNT BLINK_NONE
    /*$$MCOND0 DisplayStatus DispPLAY 1 100 **$*/;
  UpdateDisp DispOFFview : D4_ON D5_OFF D6_PGM D7_OFF D8_OFF D9_OFF
    D10_MON D11_DATE D12_OFF D13_OFF
    /*$$MCOND0 DisplayStatus DispOFFview 1 100 **$*/;

SE_RULE        /* Rules from Setting */

  SE_RESET : ChooseSet DispOFF
    /*$$MCOND0 Setting @ 0 100 **$*/;
  Next On Stopped SetYear : SetMonth BLINK_D10
    /*$$MCOND0 Setting SetYear 1 100 **$*/;
  Next On Stopped SetMonth : SetDate BLINK_D11
    /*$$MCOND0 Setting SetMonth 1 100 **$*/;
  Next On Stopped SetDate : SetHour BLINK_D12
    /*$$MCOND0 Setting SetDate 1 100 **$*/;
  Next On Stopped SetHour : SetMin BLINK_D13
    /*$$MCOND0 Setting SetHour 1 100 **$*/;
  Next On Stopped SetMin : SetYear BLINK_D6
    /*$$MCOND0 Setting SetMin 1 100 **$*/;
  Next On Stopped SetProg : SetChan BLINK_D13
    /*$$MCOND0 Setting SetProg 1 100 **$*/;
  Next On Stopped SetChan : SetProg BLINK_D6
    /*$$MCOND0 Setting SetChan 1 100 **$*/;
  Next On Stopped TimerStat : ProgPos DispP_2 BLINK_D6
    /*$$MCOND0 Setting TimerStat 1 100 **$*/;
  Next On Stopped ProgPos : Dato BLINK_D11
    /*$$MCOND0 Setting ProgPos 1 100 **$*/;
  Next On Stopped Dato : Stpt DispP_3 BLINK_D10
    /*$$MCOND0 Setting Dato 1 100 **$*/;
  Next On Stopped Stpt : Stpm BLINK_D11
    /*$$MCOND0 Setting Stpt 1 100 **$*/;
  Next On Stopped Stpm : Etpt BLINK_D12
    /*$$MCOND0 Setting Stpm 1 100 **$*/;
  Next On Stopped Etpt : Etpm BLINK_D13
    /*$$MCOND0 Setting Etpt 1 100 **$*/;
  Next On Stopped Etpm : TimerStat DispP_1 BLINK_D6
    /*$$MCOND0 Setting Etpm 1 100 **$*/;
  ClockSet On !ChooseSet !SetProg !SetChan !Nop !TimerStat !ProgPos !Dato
    !Stpt !Stpm !Etpt !Etpm : ChooseSet DispON BLINK_NONE
    /*$$PSEUDO M Setting 2 2 $*/;
  ClockSet On ChooseSet : SetYear DispSETCL BLINK_D6
    /*$$MCOND0 Setting ChooseSet 2 100 **$*/;
/*$@ ClockSet On SetYear : ChooseSet DispON BLINK_NONE $*/
    /*$$MCOND0 Setting SetYear 2 100 **$*/ /*$@;$*/
/*$@ ClockSet On SetMonth : ChooseSet DispON BLINK_NONE $*/
    /*$$MCOND0 Setting SetMonth 2 100 **$*/ /*$@;$*/
/*$@ ClockSet On SetDate : ChooseSet DispON BLINK_NONE $*/
    /*$$MCOND0 Setting SetDate 2 100 **$*/ /*$@;$*/
/*$@ ClockSet On SetHour : ChooseSet DispON BLINK_NONE $*/
    /*$$MCOND0 Setting SetHour 2 100 **$*/ /*$@;$*/
/*$@ ClockSet On SetMin : ChooseSet DispON BLINK_NONE $*/
    /*$$MCOND0 Setting SetMin 2 100 **$*/ /*$@;$*/
  Up On Stopped : Inc
    /*$$MCOND0 Setting @ 3 100 **$*/;
  Down On Stopped : Dec
    /*$$MCOND0 Setting @ 4 100 **$*/;
  Tuner On Stopped ChooseSet : SetProg DispTUNER BLINK_D6
    /*$$MCOND0 Setting ChooseSet 5 109 **$*/;
  Tuner On Stopped SetChan : Nop BLINK_NONE
    /*$$MCOND0 Setting SetChan 5 109 **$*/;
  Tuner On Stopped Nop : ChooseSet DispON
    /*$$MCOND0 Setting Nop 5 109 **$*/;
  Check On Stopped !ChooseSet !SetYear !SetMonth !SetDate !SetHour !SetMin
    !SetProg !SetChan !Nop !TimerStat : TimerStat DispP_1 BLINK_D6
    /*$$PSEUDO M Setting 6 11 $*/;
  Check On Stopped ChooseSet : TimerStat P1 DispP_1 BLINK_D6
    /*$$MCOND0 Setting ChooseSet 6 100 **$*/;
  Check On Stopped SetYear : ChooseSet DispON BLINK_NONE
    /*$$MCOND0 Setting SetYear 6 100 **$*/;
  Check On Stopped SetMonth : ChooseSet DispON BLINK_NONE
    /*$$MCOND0 Setting SetMonth 6 100 **$*/;
  Check On Stopped SetDate : ChooseSet DispON BLINK_NONE
    /*$$MCOND0 Setting SetDate 6 100 **$*/;
  Check On Stopped SetHour : ChooseSet DispON BLINK_NONE
    /*$$MCOND0 Setting SetHour 6 100 **$*/;
  Check On Stopped SetMin : ChooseSet DispON BLINK_NONE
    /*$$MCOND0 Setting SetMin 6 100 **$*/;
/*$@ Check On Stopped ProgPos : TimerStat DispP_1 BLINK_D6 $*/
    /*$$MCOND0 Setting ProgPos 6 100 **$*/ /*$@;$*/
/*$@ Check On Stopped Dato : TimerStat DispP_1 BLINK_D6 $*/
    /*$$MCOND0 Setting Dato 6 100 **$*/ /*$@;$*/
/*$@ Check On Stopped Stpt : TimerStat DispP_1 BLINK_D6 $*/
    /*$$MCOND0 Setting Stpt 6 100 **$*/ /*$@;$*/
/*$@ Check On Stopped Stpm : TimerStat DispP_1 BLINK_D6 $*/
    /*$$MCOND0 Setting Stpm 6 100 **$*/ /*$@;$*/
/*$@ Check On Stopped Etpt : TimerStat DispP_1 BLINK_D6 $*/
    /*$$MCOND0 Setting Etpt 6 100 **$*/ /*$@;$*/
/*$@ Check On Stopped Etpm : TimerStat DispP_1 BLINK_D6 $*/
    /*$$MCOND0 Setting Etpm 6 100 **$*/ /*$@;$*/
  Check Off TimerEnable ChooseSet : TimerStat P1 DispOFFview InitWatch
    /*$$MCOND0 Setting ChooseSet 7 100 **$*/;
  Check Off TimerEnable Nop : TimerStat DispOFFview InitWatch
    /*$$MCOND0 Setting Nop 7 100 **$*/;
  Check Off TimerEnable TimerStat : InitWatch
    /*$$MCOND0 Setting TimerStat 7 100 **$*/;
  TimeOut Off TimerEnable Nop : ChooseSet DispOFF
    /*$$MCOND0 Setting Nop 8 100 **$*/;
  TimeOut Off TimerEnable TimerStat : Nop DispP_3 InitWatch
    /*$$MCOND0 Setting TimerStat 8 100 **$*/;
  Check P8 On TimerStat : ChooseSet DispON BLINK_NONE
    /*$$MCOND0 Setting TimerStat 9 100 **$*/;
  Power TimerDisable : ChooseSet
    /*$$MCOND0 Setting @ 10 100 **$*/;
  Play TapeIn TimerDisable : ChooseSet DispPLAY
    /*$$MCOND0 Setting @ 11 100 **$*/;
  Stop TapeIn TimerDisable : ChooseSet DispPLAY
    /*$$MCOND0 Setting @ 12 100 **$*/;
  FF TapeIn TimerDisable : ChooseSet DispPLAY
    /*$$MCOND0 Setting @ 13 100 **$*/;
  Rew TapeIn TimerDisable : ChooseSet DispPLAY
    /*$$MCOND0 Setting @ 14 100 **$*/;
  Rec TapeIn TimerDisable : ChooseSet DispPLAY
    /*$$MCOND0 Setting @ 15 100 **$*/;

SE_RULE        /* Rules from Player */

  SE_RESET : Stopped
    /*$$MCOND0 Player @ 0 100 **$*/;
  Play TapeIn TimerDisable !Playing !Record : Playing MotorPlay D6_PLAY
    TapeOnHead OutVideo
    /*$$PSEUDO M Player 1 1 $*/;
/*$@ Play TapeIn TimerDisable Stopped : Playing MotorPlay D6_PLAY
    TapeOnHead OutVideo $*/
    /*$$MCOND0 Player Stopped 1 100 **$*/ /*$@;$*/
/*$@ Play TapeIn TimerDisable FastForward : Playing MotorPlay D6_PLAY
    TapeOnHead OutVideo $*/
    /*$$MCOND0 Player FastForward 1 100 **$*/ /*$@;$*/
/*$@ Play TapeIn TimerDisable Rewind : Playing MotorPlay D6_PLAY
    TapeOnHead OutVideo $*/
    /*$$MCOND0 Player Rewind 1 100 **$*/ /*$@;$*/
/*$@ Play TapeIn TimerDisable PlayBack : Playing MotorPlay D6_PLAY
    TapeOnHead OutVideo $*/
    /*$$MCOND0 Player PlayBack 1 100 **$*/ /*$@;$*/
/*$@ Play TapeIn TimerDisable PlayFF : Playing MotorPlay D6_PLAY
    TapeOnHead OutVideo $*/
    /*$$MCOND0 Player PlayFF 1 100 **$*/ /*$@;$*/
  Stop TapeIn TimerDisable : Stopped TapeOffHead D3_OFF D6_CHNL OutTuner
    MotorStop
    /*$$MCOND0 Player @ 2 100 **$*/;
  FF TapeIn TimerDisable !Playing !FastForward !PlayBack !PlayFF !Record :
    FastForward MotorFF D6_FF
    /*$$PSEUDO M Player 3 1 $*/;
/*$@ FF TapeIn TimerDisable Stopped : FastForward MotorFF D6_FF $*/
    /*$$MCOND0 Player Stopped 3 100 **$*/ /*$@;$*/
  FF TapeIn TimerDisable Playing : PlayFF MotorFF D6_FF
    /*$$MCOND0 Player Playing 3 100 **$*/;
/*$@ FF TapeIn TimerDisable Rewind : FastForward MotorFF D6_FF $*/
    /*$$MCOND0 Player Rewind 3 100 **$*/ /*$@;$*/
  FF TapeIn TimerDisable PlayBack : PlayFF MotorFF D6_FF
    /*$$MCOND0 Player PlayBack 3 100 **$*/;
  Rew TapeIn TimerDisable !Playing !Rewind !PlayBack !PlayFF !Record :
    Rewind MotorRew D6_REW
    /*$$PSEUDO M Player 4 1 $*/;
/*$@ Rew TapeIn TimerDisable Stopped : Rewind MotorRew D6_REW $*/
    /*$$MCOND0 Player Stopped 4 100 **$*/ /*$@;$*/
  Rew TapeIn TimerDisable Playing : PlayBack MotorRew D6_REW
    /*$$MCOND0 Player Playing 4 100 **$*/;
/*$@ Rew TapeIn TimerDisable FastForward : Rewind MotorRew D6_REW $*/
    /*$$MCOND0 Player FastForward 4 100 **$*/ /*$@;$*/
  Rew TapeIn TimerDisable PlayFF : PlayBack MotorRew D6_REW
    /*$$MCOND0 Player PlayFF 4 100 **$*/;
  Rec TapeIn TimerDisable Stopped : Record MotorPlay D6_PLAY D3_ON
    TapeOnHead OutVideo
    /*$$MCOND0 Player Stopped 5 100 **$*/;
  Eject TapeIn TimerDisable : Stopped TapeOffHead EjectTape MotorStop
    /*$$MCOND0 Player @ 6 100 **$*/;
  Power TimerDisable : Stopped TapeOffHead MotorStop
    /*$$MCOND0 Player @ 7 100 **$*/;

SE_RULE        /* Rules from TapeStatus */

  SE_RESET : TapeOut
    /*$$MCOND0 TapeStatus @ 0 100 **$*/;
  Eject TimerDisable TapeIn : TapeOut EjectTape D1_OFF
    /*$$MCOND0 TapeStatus TapeIn 1 100 **$*/;
  TAPEINSERT TapeOut : TapeIn EatTape D1_ON
    /*$$MCOND0 TapeStatus TapeOut 2 100 **$*/;
