Exemple #1
0
        //-------------------------------------------------------------------------------------------------
        public void fn_GetAlarm()
        {
            m_bIsAlarmUnitLeakDown         = _ReadData[(int)EN_ATSUPPLY_READ_AREA._049_UNIT_LEAK_DOWN] == 1 ? true : false;
            m_bIsAlarmUnitLeakRoomBottom   = _ReadData[(int)EN_ATSUPPLY_READ_AREA._056_UNIT_LEAK__ROOM_BOTTOM] == 1 ? true : false;
            m_bIsAlarmUnitLeakTankRoom     = _ReadData[(int)EN_ATSUPPLY_READ_AREA._057_UNIT_LEAK__TANK_ROOM] == 1 ? true : false;
            m_bIsAlarmUnitLeakLeakBox      = _ReadData[(int)EN_ATSUPPLY_READ_AREA._058_UNIT_LEAK__VALVE_BOX] == 1 ? true : false;
            m_bIsAlarmUnitLeakValveBox     = _ReadData[(int)EN_ATSUPPLY_READ_AREA._059_UNIT_LEAK__LEAK_BOX_] == 1 ? true : false;
            m_bIsAlarmPropellerRotation    = _ReadData[(int)EN_ATSUPPLY_READ_AREA._066_SUP_TK_A_ERROR] == 1 ? true : false;
            m_bIsAlarmSlurryTankLevelHigh  = _ReadData[(int)EN_ATSUPPLY_READ_AREA._068_SUP_TK_A_LEVEL_HH] == 1 ? true : false;
            m_bIsAlarmSlurryTankLevelLow   = _ReadData[(int)EN_ATSUPPLY_READ_AREA._069_SUP_TK_A_LEVEL_L_OFF] == 1 ? true : false;
            m_bIsAlarmSlurryTankLevelEmpty = _ReadData[(int)EN_ATSUPPLY_READ_AREA._070_SUP_TK_A_LEVEL_EMPTY] == 1 ? true : false;
            m_bIsAlarmSupplyFluxHigh       = _ReadData[(int)EN_ATSUPPLY_READ_AREA._071_SUPPLY__FLUX_HIGH] == 1 ? true : false;
            m_bIsAlarmSupplyFluxLow        = _ReadData[(int)EN_ATSUPPLY_READ_AREA._072_SUPPLY__FLUX_LOW] == 1 ? true : false;
            m_bIsAlarmReturnFluxHigh       = _ReadData[(int)EN_ATSUPPLY_READ_AREA._073_RETURN__FLUX_HIGH] == 1 ? true : false;
            m_bIsAlarmReturnFluxLow        = _ReadData[(int)EN_ATSUPPLY_READ_AREA._074_RETURN__FLUX_LOW] == 1 ? true : false;
            m_bIsAlarmReturnPressureHigh   = _ReadData[(int)EN_ATSUPPLY_READ_AREA._075_RETURN__PRESSURE_HIGH] == 1 ? true : false;
            m_bIsAlarmReturnPressureLow    = _ReadData[(int)EN_ATSUPPLY_READ_AREA._076_RETURN__PRESSURE_LOW] == 1 ? true : false;
            m_bIsAlarmSupplyRequest        = _ReadData[(int)EN_ATSUPPLY_READ_AREA._112_SUP_TK_A_CHARGE_REQUEST] == 1 ? true : false;

            //Alarm Set
            if (m_nType == SPLY_SLURRY)
            {
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0400, m_bIsAlarmUnitLeakDown);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0401, m_bIsAlarmUnitLeakRoomBottom);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0402, m_bIsAlarmUnitLeakTankRoom);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0403, m_bIsAlarmUnitLeakLeakBox);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0404, m_bIsAlarmUnitLeakValveBox);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0405, m_bIsAlarmPropellerRotation);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0406, m_bIsAlarmSlurryTankLevelHigh);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0407, m_bIsAlarmSlurryTankLevelLow);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0408, m_bIsAlarmSlurryTankLevelEmpty);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0409, m_bIsAlarmSupplyFluxHigh);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0410, m_bIsAlarmSupplyFluxLow);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0411, m_bIsAlarmReturnFluxHigh);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0412, m_bIsAlarmReturnFluxLow);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0413, m_bIsAlarmReturnPressureHigh);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0414, m_bIsAlarmReturnPressureLow);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0415, m_bIsAlarmSupplyRequest);
            }
            else
            {
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0420, m_bIsAlarmUnitLeakDown);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0421, m_bIsAlarmUnitLeakRoomBottom);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0422, m_bIsAlarmUnitLeakTankRoom);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0423, m_bIsAlarmUnitLeakLeakBox);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0424, m_bIsAlarmUnitLeakValveBox);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0425, m_bIsAlarmPropellerRotation);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0426, m_bIsAlarmSlurryTankLevelHigh);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0427, m_bIsAlarmSlurryTankLevelLow);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0428, m_bIsAlarmSlurryTankLevelEmpty);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0429, m_bIsAlarmSupplyFluxHigh);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0430, m_bIsAlarmSupplyFluxLow);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0431, m_bIsAlarmReturnFluxHigh);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0432, m_bIsAlarmReturnFluxLow);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0433, m_bIsAlarmReturnPressureHigh);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0434, m_bIsAlarmReturnPressureLow);
                EPU.fn_SetErr(EN_ERR_LIST.ERR_0435, m_bIsAlarmSupplyRequest);
            }
        }
Exemple #2
0
        //-------------------------------------------------------------------------------------------------
        private void fn_Update()
        {
            switch (m_nStep)
            {
            case 0:

                if (m_bSend)
                {
                    m_bSend = false;
                    m_nStep = 5;
                    return;
                }

                m_nStep++;
                return;

            //-------------------------------------------------------------------------------------------------
            // Read Seq
            case 1:
                //if (!m_tSendDelayTimer.fnTimeOut(200)) return;

                //Read
                plc.fn_ReadArea(MemoryArea.EM, (ushort)SUPPLY_START_ADD, 0, 512);

                // Request State Check
                fn_IsRequest();

                // Get Status Data
                fn_GetStatusData();

                // Alarm Check
                //fn_GetAlarm(); //-->> 차후 적용 필요

                m_bSend = true;
                m_nStep = 0;
                return;

            //-------------------------------------------------------------------------------------------------
            // Send Seq
            case 5:

                if (!fn_CheckEquipID())
                {
                    //Alarm
                    EPU.fn_SetErr(EN_ERR_LIST.ERR_0452 + m_nType);     //JUNG/200811

                    m_nStep = 0;
                    return;
                }

                //Write
                fn_ConvertBooltoByte();
                plc.fn_SendArea((ushort)SUPPLY_START_ADD, m_temp);     //All Write

                m_nStep = 0;
                return;

            default:
                m_nStep = 0;
                return;
            }
        }