TRN2

Connection Logic
{
    UpdateInterval   20
    
    JavaScript
    {
        Lift_Stoped       = 1;
        Lift_Moving       = 2;
        Lift_Waiting      = 3;
        Lift_Opening      = 4;
        Lift_Closing      = 5;
                          
        Moving_None       = 0;
        Moving_Up         = 1;
        Moving_Down       = 2;
  
        liftStateNext = Lift_Stoped;  // состяние лифта
        liftState     = liftStateNext;
        L_Arrow       = Moving_None;  // направление движения
        LiftPos       = 1;            // положение лифта.
        flagsUp       = 0;            // флаги вызова в лифтовой наверх
        flagsDown     = 0;            // флаги вызова в лифтовой вниз
        flagsInner    = 0;            // флаги вызова внутри лифта
    
        L_Inner = 0;
        L_Down  = 0;
        L_Up    = 0;
    
        L_Level = 1;
    
        Door1 = 0;
        Door2 = 0;
        Door3 = 0;
        Door4 = 0;
        Door5 = 0;
        Door6 = 0;

        B_Inner      = 0;
        B_Inner_Prev = 0;
    
        Waiting_Timer = 0;
 
        function onTime() {
        
            B_Inner = cont(101);
            B_Down  = cont(102);
            B_Up    = cont(103);         

            B_Stop = cont(107);
            B_Call = cont(108);
            B_Open = cont(109);
            B_Close = cont(110);
        
            if( B_Inner == 1 ) L_Inner |= 1;
            if( B_Inner == 2 ) L_Inner |= 2;
            if( B_Inner == 3 ) L_Inner |= 4;
            if( B_Inner == 4 ) L_Inner |= 8;
            if( B_Inner == 5 ) L_Inner |= 16;
    
            if( B_Up   == 1 ) L_Down |= 1;
            if( B_Down == 2 ) L_Down |= 2;
            if( B_Down == 3 ) L_Down |= 4;
            if( B_Down == 4 ) L_Down |= 8;
            if( B_Down == 5 ) L_Down |= 16; 
    
            if( B_Up   == 1 ) L_Up |= 1;
            if( B_Up   == 2 ) L_Up |= 2;
            if( B_Up   == 3 ) L_Up |= 4;
            if( B_Up   == 4 ) L_Up |= 8;
            if( B_Down == 5 ) L_Up |= 16;
    
            if( L_Level == 1 ) Level_Mask = 1;
            if( L_Level == 2 ) Level_Mask = 2;
            if( L_Level == 3 ) Level_Mask = 4;
            if( L_Level == 4 ) Level_Mask = 8;
            if( L_Level == 5 ) Level_Mask = 16;
                        
            if( L_Level == 1 ) Level_Mask_Inv = -2;
            if( L_Level == 2 ) Level_Mask_Inv = -3;
            if( L_Level == 3 ) Level_Mask_Inv = -5;
            if( L_Level == 4 ) Level_Mask_Inv = -9;
            if( L_Level == 5 ) Level_Mask_Inv = -17;

            // лифт стоит на месте
            if ( liftState == Lift_Stoped )
            {
                btn  = L_Up;
                btn |= L_Down;
                btn |= L_Inner;
                
                if ( btn == 0 ) // если ничего не нажато
                    L_Arrow = Moving_None;
                
                if( btn != 0 ) 
                {
                    tmp = btn;
                    tmp &= Level_Mask;
                    if ( tmp != 0 ) // Если лифт на том же этаже, что и кнопка
                        liftStateNext = Lift_Opening;
                
                    if ( tmp == 0 )
                    {            
                        if ( L_Arrow == Moving_Up )
                        {
                            L_All  = L_Up;
                            L_All |= L_Inner;
                            if( L_Level == 2 ) L_All &= -4;
                            if( L_Level == 3 ) L_All &= -8;
                            if( L_Level == 4 ) L_All &= -16;
                            
                            L_ArrowNext = Moving_Up;
                            if( L_All < Level_Mask || L_Level == 5 )
                                L_ArrowNext = Moving_Down;
                        }
                        
                        if ( L_Arrow == Moving_Down )
                        {
                            L_All  = L_Down;
                            L_All |= L_Inner;
                    
                            if( L_Level == 2 ) L_All &= -4;
                            if( L_Level == 3 ) L_All &= -8;
                            if( L_Level == 4 ) L_All &= -16;
                            
                            L_ArrowNext = Moving_Down;
                            if( L_All > Level_Mask || L_Level == 1 )
                                L_ArrowNext = Moving_Up;
                        }
                    
                        if ( L_Arrow == Moving_None )
                        {
                            L_All  = btn;
                            if( L_Level == 2 ) L_All &= -4;
                            if( L_Level == 3 ) L_All &= -8;
                            if( L_Level == 4 ) L_All &= -16;
                            
                            L_ArrowNext = Moving_Down;
                            if( L_All > Level_Mask - L_Level == 1 )
                                L_ArrowNext = Moving_Up;
                        }
                        
                        L_Arrow = L_ArrowNext;
                        liftStateNext = Lift_Moving;
                    }
                
                }
                
            }

            // Открытие дверей
            if ( liftState == Lift_Opening )
            {
                if( L_Level == 1 ) tmp = Door1; 
                if( L_Level == 2 ) tmp = Door2; 
                if( L_Level == 3 ) tmp = Door3; 
                if( L_Level == 4 ) tmp = Door4; 
                if( L_Level == 5 ) tmp = Door5; 
                
                tmp += 0.02;
                if( tmp >= 1 ) tmp = 1;
                
                if( L_Level == 1 ) Door1 = tmp; 
                if( L_Level == 2 ) Door2 = tmp; 
                if( L_Level == 3 ) Door3 = tmp; 
                if( L_Level == 4 ) Door4 = tmp; 
                if( L_Level == 5 ) Door5 = tmp; 
                
                if ( tmp >= 1 )
                {
                    liftStateNext = Lift_Waiting;
            
                // Сбрасываем свечение кнопок
                    L_Down  &= Level_Mask_Inv;
                    L_Up    &= Level_Mask_Inv;
                    L_Inner &= Level_Mask_Inv;
            
                }
            
            }

            // Ожидание с открытыми дверьми
            if ( liftState == Lift_Waiting )
            {
                Waiting_Timer += STEP_TIME;
                if ( Waiting_Timer > 5 || B_Close == 1 )
                {
                    liftStateNext = Lift_Closing;
                    Waiting_Timer = 0;
                }
            }

            // Закрытие дверей
            if ( liftState == Lift_Closing )
            {
                if( L_Level == 1 ) tmp = Door1; 
                if( L_Level == 2 ) tmp = Door2; 
                if( L_Level == 3 ) tmp = Door3; 
                if( L_Level == 4 ) tmp = Door4; 
                if( L_Level == 5 ) tmp = Door5; 
                
                tmp -= 0.02;
                if( tmp <= 0. ) tmp = 0;
                
                if( L_Level == 1 ) Door1 = tmp; 
                if( L_Level == 2 ) Door2 = tmp; 
                if( L_Level == 3 ) Door3 = tmp; 
                if( L_Level == 4 ) Door4 = tmp; 
                if( L_Level == 5 ) Door5 = tmp; 
                
                // Выбран ли наш этаж
                tmp2  = L_Up;
                tmp2 |= L_Down;
                tmp2 |= L_Inner;
                tmp2 &= Level_Mask;
                if(B_Open == 1) tmp2 = 1;
                
                if ( tmp2 == 1 )
                    liftStateNext = Lift_Opening;
                else if ( tmp == 0 ) // Если дверь закрыта и не сработало пред. условие, то переходим в стоп
                    liftStateNext = Lift_Stoped;
            }

            if ( liftState == Lift_Moving )
            {
                btn  = L_Inner;
                if( L_Arrow == Moving_Down ) btn |= L_Down;
                if( L_Arrow == Moving_Up )   btn |= L_Up;
                btn &= Level_Mask;
                
                if ( btn == 0 )
                {
                    tmp  = 0.5;     // 1/2 этажа в секунду
                    tmp *= STEP_TIME;
                    if(L_Arrow == Moving_Up)   LiftPos += tmp;
                    if(L_Arrow == Moving_Down) LiftPos -= tmp;
                
                    // определние номера этажа
                    if ( L_Arrow == Moving_Up )
                    {
                        L_Level  = 1;
                        if( LiftPos > 1.98 ) L_Level  = 2;
                        if( LiftPos > 2.98 ) L_Level  = 3;
                        if( LiftPos > 3.98 ) L_Level  = 4;
                        if( LiftPos > 4.98 ) L_Level  = 5;
                    }
                    
                    if ( L_Arrow == Moving_Down )
                    {
                        L_Level  = 5
                        if( LiftPos < 3.98 ) L_Level  = 4;
                        if( LiftPos < 2.98 ) L_Level  = 3;
                        if( LiftPos < 1.98 ) L_Level  = 2;
                        if( LiftPos < 0.98 ) L_Level  = 1;
                    }
                    
                }
                
                if( btn != 0 )      liftStateNext = Lift_Opening;
                if( B_Stop == 1 )   liftStateNext = Lift_Stoped;
                
            }
            
            if ( B_Stop == 1 )
            {
                L_Down  = 0;
                L_Up    = 0;
                L_Inner = 0;
            }
            
            liftState = liftStateNext;

            setCont(121, L_Inner);
            setCont(122, L_Down);
            setCont(123, L_Up);
            
            setCont(141, L_Level);
            setCont(142, L_Arrow);
            
            setView(101, Door1);
            setView(102, Door2);
            setView(103, Door3);
            setView(104, Door4);
            setView(105, Door5);
            setView(106, Door6);
            setView(107, LiftPos);
            
        } // end of onTime function
    } // end of JavaScript object
}

MainWin MainPanel
{
 Title         "Лифт"
 Position      0 0
 Size          1022 1058
 UseConnection 	Logic
 NoMenu
 //NoStatusbar
 
 //OnExit    "stop.cmd"
 
// DebugMenu 
// NoFrame

    Panel  MainFon
    0 0 1022 1036
    FileName     "Fon"
    Content
    
        // ========== Лампы ==========

        Control L_L1
        32 403 50 50
        Comment "СТ: Этаж 1"
        Ident    121      // Лампа
        State   [121] 0x0001
        	Pict    LF_Off 0      Blend Comment "Выкл." 0
        	Pict    LF_On  0x0001 Blend Comment "Вкл."  0
        	0
        0

        Control L_L2
        32 343 50 50 
        Comment "СТ: Этаж 2"
        Ident    121      // Лампа
        State   [121] 0x0002
        	Pict    LF_Off 0      Blend Comment "Выкл." 0
        	Pict    LF_On  0x0002 Blend Comment "Вкл."  0
        	0
        0

        Control L_L3
        32 283 50 50
        Comment "СТ: Этаж 3"  
        Ident    121      // Лампа
        State   [121] 0x0004
        	Pict    LF_Off 0      Blend Comment "Выкл." 0
        	Pict    LF_On  0x0004 Blend Comment "Вкл."  0
        	0
        0

        Control L_L4
        120 403 50 50 
        Comment "СТ: Этаж 4"
        Ident    121      // Лампа
        State   [121] 0x0008
        	Pict    LF_Off 0     Blend Comment "Выкл." 0
        	Pict    LF_On 0x0008 Blend Comment "Вкл."  0
        	0
        0

        Control L_L5
        120 343 50 50
        Comment "СТ: Этаж 5"
        Ident    121      // Лампа
        State   [121] 0x0010
        	Pict    LF_Off 0      Blend Comment "Выкл." 0
        	Pict    LF_On  0x0010 Blend Comment "Вкл."  0
        	0
        0
                          
        Control L_5dn
        610 107 20 20
        Comment "СТ: Этаж 5-Вниз"
        Ident    122      // Лампа
        State   [122] 0x0010
        	Pict    LF_OffSm 0      Blend Comment "Выкл." 0
        	Pict    LF_OnSm  0x0010 Blend Comment "Вкл."  0
        	0
        0

        Control L_4up
        610 292 20 20 
        Comment "СТ: Этаж 4-Вверх"
        Ident    123      // Лампа
        State   [123] 0x0008
        	Pict    LF_OffSm 0      Blend Comment "Выкл." 0
        	Pict    LF_OnSm  0x0008 Blend Comment "Вкл."  0
        	0
        0

        Control L_4dn
        610 323 20 20
        Comment "СТ: Этаж 4-Вниз"
        Ident    122     // Лампа
        State   [122] 0x0008
        	Pict    LF_OffSm 0      Blend Comment "Выкл." 0
        	Pict    LF_OnSm  0x0008 Blend Comment "Вкл."  0
        	0
        0

        Control L_3up
        610 511 20 20 
        Comment "СТ: Этаж 3-Вверх"
        Ident    123      // Лампа
        State   [123] 0x0004
        	Pict    LF_OffSm 0      Blend Comment "Выкл." 0
        	Pict    LF_OnSm  0x0004 Blend Comment "Вкл."  0
        	0
        0

        Control L_3dn
        610 542 20 20
        Comment "СТ: Этаж 3-Вниз"
        Ident    122      // Лампа
        State   [122] 0x0004
        	Pict    LF_OffSm 0      Blend Comment "Выкл." 0
        	Pict    LF_OnSm  0x0004 Blend Comment "Вкл."  0
        	0
        0

        Control L_2up
        610 730 20 20 
        Comment "СТ: Этаж 2-Вверх"
        Ident    123      // Лампа
        State   [123] 0x0002
        	Pict    LF_OffSm 0      Blend Comment "Выкл." 0
        	Pict    LF_OnSm  0x0002 Blend Comment "Вкл."  0
        	0
        0

        Control L_2dn
        610 761 20 20
        Comment "СТ: Этаж 2-Вниз"
        Ident    122      // Лампа
        State   [122] 0x0002
        	Pict    LF_OffSm 0      Blend Comment "Выкл." 0
        	Pict    LF_OnSm  0x0002 Blend Comment "Вкл."  0
        	0
        0

        Control L_1up 
        610 938 20 20 
        Comment "СТ: Этаж 1-Вверх"
        Ident    123      // Лампа
        State   [123] 0x0001
        	Pict    LF_OffSm 0      Blend Comment "Выкл." 0
        	Pict    LF_OnSm  0x0001 Blend Comment "Вкл."  0
        	0
        0

       Control L_NET
       111 166 31 58
       Comment "СТ: Номер этажа"
       Ident    141   // ИТ.
       State   [141] -1
          Pict    L_ITU_OFF 0 Copy Comment "Выкл." 0
          Pict    L_ITU_1   1 Copy Comment "1"     0
          Pict    L_ITU_2   2 Copy Comment "2"     0
          Pict    L_ITU_3   3 Copy Comment "3"     0
          Pict    L_ITU_4   4 Copy Comment "4"     0
          Pict    L_ITU_5   5 Copy Comment "5"     0
          Pict    L_ITU_6   6 Copy Comment "6"     0
          0
       0

       Control L_Arrow
       61 166 50 58
       Comment "СТ: Направление стрелки движеня лифта"
       Ident    142   // ИТ.
       State   [142] -1
          Pict    L_ITU_OFF1 0 Copy Comment "Выкл." 0
          Pict    L_ITU_Up   1 Copy Comment "Up"     0
          Pict    L_ITU_Dn   2 Copy Comment "Dn"     0
          0
       0

       Control L_NET1
       624 881 12 20
       Comment "СТ: Номер этажа 1"
       Ident    141   // ИТ.
       State   [141] -1
          Pict    L_ITU_OFFsm 0 Copy Comment "Выкл." 0
          Pict    L_ITU_1sm   1 Copy Comment "1"     0
          Pict    L_ITU_2sm   2 Copy Comment "2"     0
          Pict    L_ITU_3sm   3 Copy Comment "3"     0
          Pict    L_ITU_4sm   4 Copy Comment "4"     0
          Pict    L_ITU_5sm   5 Copy Comment "5"     0
          Pict    L_ITU_6sm   6 Copy Comment "6"     0
          0
       0

       Control L_Arrow1
       604 881 20 23
       Comment "СТ: Направление стрелки движеня лифта 1"
       Ident    142   // ИТ.
       State   [142] -1
          Pict    L_ITU_OFF1sm 0 Copy Comment "Выкл." 0
          Pict    L_ITU_Upsm   1 Copy Comment "Up"     0
          Pict    L_ITU_Dnsm   2 Copy Comment "Dn"     0
          0
       0

       Control L_NET2
       624 689 31 58
       Comment "СТ: Номер этажа 2"
       Ident    141   // ИТ.
       State   [141] -1
          Pict    L_ITU_OFFsm 0 Copy Comment "Выкл." 0
          Pict    L_ITU_1sm   1 Copy Comment "1"     0
          Pict    L_ITU_2sm   2 Copy Comment "2"     0
          Pict    L_ITU_3sm   3 Copy Comment "3"     0
          Pict    L_ITU_4sm   4 Copy Comment "4"     0
          Pict    L_ITU_5sm   5 Copy Comment "5"     0
          Pict    L_ITU_6sm   6 Copy Comment "6"     0
          0
       0

       Control L_Arrow2
       604 689 50 58
       Comment "СТ: Направление стрелки движеня лифта 2"
       Ident    142   // ИТ.
       State   [142] -1
          Pict    L_ITU_OFF1sm 0 Copy Comment "Выкл." 0
          Pict    L_ITU_Upsm   1 Copy Comment "Up"     0
          Pict    L_ITU_Dnsm   2 Copy Comment "Dn"     0
          0
       0

       Control L_NET3
       624 470 31 58
       Comment "СТ: Номер этажа 3"
       Ident    141   // ИТ.
       State   [141] -1
          Pict    L_ITU_OFFsm 0 Copy Comment "Выкл." 0
          Pict    L_ITU_1sm   1 Copy Comment "1"     0
          Pict    L_ITU_2sm   2 Copy Comment "2"     0
          Pict    L_ITU_3sm   3 Copy Comment "3"     0
          Pict    L_ITU_4sm   4 Copy Comment "4"     0
          Pict    L_ITU_5sm   5 Copy Comment "5"     0
          Pict    L_ITU_6sm   6 Copy Comment "6"     0
          0
       0

       Control L_Arrow3
       604 470 50 58
       Comment "СТ: Направление стрелки движеня лифта 3"
       Ident    142   // ИТ.
       State   [142] -1
          Pict    L_ITU_OFF1sm 0 Copy Comment "Выкл." 0
          Pict    L_ITU_Upsm   1 Copy Comment "Up"     0
          Pict    L_ITU_Dnsm   2 Copy Comment "Dn"     0
          0
       0

       Control L_NET4
       624 251 31 58
       Comment "СТ: Номер этажа 4"
       Ident    141   // ИТ.
       State   [141] -1
          Pict    L_ITU_OFFsm 0 Copy Comment "Выкл." 0
          Pict    L_ITU_1sm   1 Copy Comment "1"     0
          Pict    L_ITU_2sm   2 Copy Comment "2"     0
          Pict    L_ITU_3sm   3 Copy Comment "3"     0
          Pict    L_ITU_4sm   4 Copy Comment "4"     0
          Pict    L_ITU_5sm   5 Copy Comment "5"     0
          Pict    L_ITU_6sm   6 Copy Comment "6"     0
          0
       0

       Control L_Arrow4
       604 251 50 58
       Comment "СТ: Направление стрелки движеня лифта4"
       Ident    142   // ИТ.
       State   [142] -1
          Pict    L_ITU_OFF1sm 0 Copy Comment "Выкл." 0
          Pict    L_ITU_Upsm   1 Copy Comment "Up"     0
          Pict    L_ITU_Dnsm   2 Copy Comment "Dn"     0
          0
       0

       Control L_NET5
       624 50 31 58
       Comment "СТ: Номер этажа 5"
       Ident    141   // ИТ.
       State   [141] -1
          Pict    L_ITU_OFFsm 0 Copy Comment "Выкл." 0
          Pict    L_ITU_1sm   1 Copy Comment "1"     0
          Pict    L_ITU_2sm   2 Copy Comment "2"     0
          Pict    L_ITU_3sm   3 Copy Comment "3"     0
          Pict    L_ITU_4sm   4 Copy Comment "4"     0
          Pict    L_ITU_5sm   5 Copy Comment "5"     0
          Pict    L_ITU_6sm   6 Copy Comment "6"     0
          0
       0

       Control L_Arrow5
       604 50 50 58
       Comment "СТ: Направление стрелки движеня лифта 5"
       Ident    142   // ИТ.
       State   [142] -1
          Pict    L_ITU_OFF1sm 0 Copy Comment "Выкл." 0
          Pict    L_ITU_Upsm   1 Copy Comment "Up"     0
          Pict    L_ITU_Dnsm   2 Copy Comment "Dn"     0
          0
       0

        // ========== Кнопки ==========
               
        Control B_K1
        32 403 50 50
        Comment "Кнопка: Этаж 1"
        Ident   101   // Кнопка.
        Mouse  [101] SpringBack
        State  [101] -1
            Pict   1_Dn 1 Blend Comment "Выкл." 0
            Pict   1_Up 0 Blend Comment "Вкл."  0
            0
        0
        
        Control B_K2
        32 343 50 50
        Comment "Кнопка: Этаж 2"
        Ident   101   // Кнопка.
        Mouse  [101] SpringBack
        State  [101] -1
            Pict   2_Dn 2 Blend Comment "Выкл." 0
            Pict   2_Up 0 Blend Comment "Вкл."  0
            0
        0
        
        Control B_K3
        32 283 50 50
        Comment "Кнопка: Этаж 3"
        Ident   101   // Кнопка.
        Mouse  [101] SpringBack
        State  [101] -1
            Pict   3_Dn 3 Blend Comment "Выкл." 0
            Pict   3_Up 0 Blend Comment "Вкл."  0
            0
        0
        
        Control B_K4
        120 403 50 50
        Comment "Кнопка: Этаж 4"
        Ident   101   // Кнопка.
        Mouse  [101] SpringBack
        State  [101] -1
            Pict   4_Dn 4 Blend Comment "Выкл." 0
            Pict   4_Up 0 Blend Comment "Вкл."  0
            0
        0
        
        Control B_K5
        120 343 50 50
        Comment "Кнопка: Этаж 5"
        Ident   101   // Кнопка.
        Mouse  [101] SpringBack
        State  [101] -1
            Pict   5_Dn 5 Blend Comment "Выкл." 0
            Pict   5_Up 0 Blend Comment "Вкл."  0
            0
        0

        Control B_KS
        32 558 50 50
        Comment "Кнопка: Стоп"
        Ident   107   // Кнопка.
        Mouse  [107] Direct
        State  [107] -1
          Pict   Stop_Up 0 Blend Comment "Вкл."  0
          Pict   Stop_Dn 1 Blend Comment "Выкл." 0
          0
        0
        
        Control B_KV
        120 557 50 50
        Comment "Кнопка: Вызов"
        Ident   108   // Кнопка.
        Mouse  [108] Direct
        State  [108] -1
          Pict   Call_Up 0 Blend Comment "Вкл."  0
          Pict   Call_Dn 1 Blend Comment "Выкл." 0
          0
        0
        
        Control B_KO
        32 497 50 50
        Comment "Кнопка: Открытие дверей"
        Ident   109   // Кнопка.
        Mouse  [109] Direct
        State  [109] -1
          Pict   Open_Up 0 Blend Comment "Вкл."  0
          Pict   Open_Dn 1 Blend Comment "Выкл." 0
          0
        0
        
        Control B_KZ
        120 497 50 50
        Comment "Кнопка: Закрытие дверей"
        Ident   110   // Кнопка.
        Mouse  [110] Direct
        State  [110] -1
          Pict   Close_Up 0 Blend Comment "Вкл."  0
          Pict   Close_Dn 1 Blend Comment "Выкл." 0
          0
        0
 
        Control B_5dn
        608 105 20 20
        Comment "Кнопка: Этаж 5-Вниз"
        Ident   102   // Кнопка.
        Mouse  [102] SpringBack
        State  [102] -1
          Pict   Dn_D 5 Blend Comment "Выкл." 0
          Pict   Dn_U 0 Blend Comment "Вкл."  0
          0
        0
        
        Control B_4up
        608 290 20 20
        Comment "Кнопка: Этаж 4-Вверх"
        Ident   103   // Кнопка.
        Mouse  [103] SpringBack
        State  [103] -1
          Pict   Up_D 4 Blend Comment "Выкл." 0
          Pict   Up_U 0 Blend Comment "Вкл."  0
          0
        0
        
        Control B_4dn
        608 321 20 20
        Comment "Кнопка: Этаж 4-Вниз"
        Ident   102   // Кнопка.
        Mouse  [102] SpringBack
        State  [102] -1
          Pict   Dn_D 4 Blend Comment "Выкл." 0
          Pict   Dn_U 0 Blend Comment "Вкл."  0
          0
        0
        
        Control B_3up
        608 509 20 20
        Comment "Кнопка: Этаж 3-Вверх"
        Ident   103   // Кнопка.
        Mouse  [103] SpringBack
        State  [103] -1
          Pict   Up_D 3 Blend Comment "Выкл." 0
          Pict   Up_U 0 Blend Comment "Вкл."  0
          0
        0
        
        Control B_3dn
        608 540 20 20
        Comment "Кнопка: Этаж 3-Вниз"
        Ident   102   // Кнопка.
        Mouse  [102] SpringBack
        State  [102] -1
          Pict   Dn_D 3 Blend Comment "Выкл." 0
          Pict   Dn_U 0 Blend Comment "Вкл."  0
          0
        0
        
        Control B_2up
        608 728 20 20
        Comment "Кнопка: Этаж 2-Вверх"
        Ident   103   // Кнопка.
        Mouse  [103] SpringBack
        State  [103] -1
          Pict   Up_D 2 Blend Comment "Выкл." 0
          Pict   Up_U 0 Blend Comment "Вкл."  0
          0
        0
        
        Control B_2dn
        608 759 20 20
        Comment "Кнопка: Этаж 2-Вниз"
        Ident   102   // Кнопка.
        Mouse  [102] SpringBack
        State  [102] -1
          Pict   Dn_D 2 Blend Comment "Выкл." 0
          Pict   Dn_U 0 Blend Comment "Вкл."  0
          0
        0
        
        Control B_1up
        608 936 20 20
        Comment "Кнопка: Этаж 1-Вверх"
        Ident   103   // Кнопка.
        Mouse  [103] SpringBack
        State  [103] -1
          Pict   Up_D 1 Blend Comment "Выкл." 0
          Pict   Up_U 0 Blend Comment "Вкл."  0
          0
        0

        // ========== Гистограммы ==========

        Control Do_Gist5L
        663 53 52 133
        Comment "Гистограмма: Левая дверь-5"
        Crop     ToObject
        OffsetX v[105] -133 0   // Гистограмма. 
        State    [0]  0 
          Pict   L_Door 0 Copy 0
          0
        0

        Control Do_Gist5R
        715 53 52 133
        Comment "Гистограмма: Правая дверь-5"
        Crop     ToObject
        OffsetX v[105] 133 0   // Гистограмма. 
        State    [0]  0 
          Pict   R_Door 0 Copy 0
          0
        0

        Control Do_Gist4L
        663 254 52 133
        Comment "Гистограмма: Левая дверь-4"
        Crop     ToObject
        OffsetX v[104] -133 0   // Гистограмма. 
        State    [0]  0 
          Pict   L_Door 0 Copy 0
          0
        0

        Control Do_Gist4R
        715 254 52 133
        Comment "Гистограмма: Правая дверь-4"
        Crop     ToObject
        OffsetX v[104] 133 0   // Гистограмма. 
        State    [0]  0 
          Pict   R_Door 0 Copy 0
          0
        0

        Control Do_Gist3L
        663 473 52 133
        Comment "Гистограмма: Левая дверь-3"
        Crop     ToObject
        OffsetX v[103] -133 0   // Гистограмма. 
        State    [0]  0 
          Pict   L_Door 0 Copy 0
          0
        0

        Control Do_Gist3R
        715 473 52 133
        Comment "Гистограмма: Правая дверь-3"
        Crop     ToObject
        OffsetX v[103] 133 0   // Гистограмма. 
        State    [0]  0 
          Pict   R_Door 0 Copy 0
          0
        0

        Control Do_Gist2L
        663 692 52 133
        Comment "Гистограмма: Левая дверь-2"
        Crop     ToObject
        OffsetX v[102] -133 0   // Гистограмма. 
        State    [0]  0 
          Pict   L_Door 0 Copy 0
          0
        0

        Control Do_Gist2R
        715 692 52 133
        Comment "Гистограмма: Правая дверь-2"
        Crop     ToObject
        OffsetX v[102] 133 0   // Гистограмма. 
        State    [0]  0 
          Pict   R_Door 0 Copy 0
          0
        0

        Control Do_Gist1L
        663 884 52 133
        Comment "Гистограмма: Левая дверь-1"
        Crop     ToObject
        OffsetX v[101] -133 0   // Гистограмма. 
        State    [0]  0 
          Pict   L_Door 0 Copy 0
          0
        0

        Control Do_Gist1R
        715 884 52 133
        Comment "Гистограмма: Правая дверь-1"
        Crop     ToObject
        OffsetX v[101] 133 0   // Гистограмма. 
        State    [0]  0 
          Pict   R_Door 0 Copy 0
          0
        0

        Control Do_GistLift
        870 3 120 1033
        Comment "Гистограмма: Кабина лифта в шахте"
        Crop     ToObject
        OffsetY v[107] -211 207   // Гистограмма. 
        State    [0]  0 
          Pict   Lift  0 blend 0
          0
        0

    EndContent
    0
  
}
