@ -31,6 +31,8 @@ class CMotionController;
class CInputController ;
class COutputController ;
typedef std : : map < CString , bool > CSTRING_BOOL_MAP ;
// MaintenancePage.h : header file
//
/////////////////////////////////////////////////////////////////////////////
@ -122,17 +124,17 @@ protected:
private :
// bool IsCurrentFieldValid(CString csPath, CString csTableName, CString csFieldName);
bool IsOutputDisplayEnable ( C String csOutputName ) ;
bool IsInputDisplayEnable ( C String csInputName ) ;
void GetIODisplayData ( ) ;
bool GetMotorPosSaveTolerence ( C String csCurrPosName , double & dMaxOffset , double & dMinOffset , CString csCurrMotorName ) ;
bool IsCheckTolerenceEnable ( C String csCurrPosName , CString csCurrMotorName ) ;
bool CheckIfDisplayEnable ( C String csCurrPosName ) ;
bool CheckIfTeachEnable ( C String csCurrPosName , CString csCurrMotorName ) ;
bool IsOutputDisplayEnable ( C DaoDatabase & db , C String csOutputName ) ;
bool IsInputDisplayEnable ( C DaoDatabase & db , C String csInputName ) ;
void GetIODisplayData ( CDaoDatabase & db ) ;
bool GetMotorPosSaveTolerence ( C DaoDatabase & db , C String csCurrPosName , double & dMaxOffset , double & dMinOffset , CString csCurrMotorName ) ;
bool IsCheckTolerenceEnable ( C DaoDatabase & db , C String csCurrPosName , CString csCurrMotorName ) ;
bool CheckIfDisplayEnable ( C DaoDatabase & db , C String csCurrPosName ) ;
bool CheckIfTeachEnable ( C DaoDatabase * pdb , C String csCurrPosName , CString csCurrMotorName ) ;
void LockButtonsDuringMachineIsRunning ( ) ;
bool UpdateCurrentModule ( bool SavingSetting = true ) ;
// void CheckSecurityLevel();
void DisplaySwitchToCurrentMotorItems ( ) ;
void DisplaySwitchToCurrentMotorItems ( CDaoDatabase * pdb = NULL , CDaoDatabase * dbpkg = NULL ) ;
void RefreshCurrentModuleMotorInputSignals ( ) ;
void RefreshCurrentModuleDigitalOutputSignals ( ) ;
void RefreshCurrentModuleDigitalInputSignals ( ) ;
@ -140,31 +142,31 @@ private:
void GetCurrentMotorPosId ( ) ;
void GetCurrentMotorId ( ) ;
void SetCurrentMotorSpeedParameter ( ) ;
void SetCurrentModuleMotorItems ( ) ;
void SetCurrentModuleMotorItems ( CDaoDatabase & db ) ;
void SetCurrentModuleDigitalOutputTexts ( ) ;
void SetCurrentModuleDigitalInputTexts ( ) ;
void InitMotorTree ( ) ;
void InitMotorTree ( CDaoDatabase & db ) ;
void InitIconButtons ( ) ;
void LoadLedBitmap ( ) ;
void CreateTemporaryMotorBuffer ( ) ;
void CreateMotorTreeImageList ( ) ;
void CheckRecipeSelected ( ) ; // Enable or disable controls base on Recipe Selected
void EnableDisableSaveButton ( ) ; // enable save button if recipe is selected and teach current motor is enable
void CheckUserLevel ( ) ; // Enable or disable controls base on User level
void initMaintenanceIOModules ( ) ; // Init Maintenance Input/Output Modules attribtes
void HideExtraInputItems ( ) ; // Hide extra Input Items
void HideExtraOutputItems ( ) ; // Hide extra Output Items
void InitPage1MaintIpAttributes ( ) ; // init page 1 maintenance input attributes
void CalNoOfInputModule ( ) ; // calculate number of input modules
void InitPage1MaintOpAttributes ( ) ; // init page 1 maintenance output attributes
void CalNoOfOutputModule ( ) ; // calculate number of output modules
void SaveMotorPos ( C String csPackageName , bool bGoldenData = false ) ; // save motor pos
void SaveMotorSpeedParameter ( C String csPackageName , bool bGoldenData = false ) ; // save motor speed setting
void GetMotorPos ( CString csPackageName ); // get motor pos and update to text box
void GetMotorSpeedParameter ( CString csPackageName ); // get motor speed setting and update to text box
bool IsMachineRunning ( ) ; // check if machine is running
void ProcessMaintMsg ( ) ; // process Maintenance Message and print to text box
void CheckRecipeSelected ( ) ; // Enable or disable controls base on Recipe Selected
void EnableDisableSaveButton ( ) ; // enable save button if recipe is selected and teach current motor is enable
void CheckUserLevel ( ) ; // Enable or disable controls base on User level
void initMaintenanceIOModules ( ) ; // Init Maintenance Input/Output Modules attribtes
void HideExtraInputItems ( ) ; // Hide extra Input Items
void HideExtraOutputItems ( ) ; // Hide extra Output Items
void InitPage1MaintIpAttributes ( ) ; // init page 1 maintenance input attributes
void CalNoOfInputModule ( ) ; // calculate number of input modules
void InitPage1MaintOpAttributes ( ) ; // init page 1 maintenance output attributes
void CalNoOfOutputModule ( ) ; // calculate number of output modules
void SaveMotorPos ( C DaoDatabase & db , C String csPackageName , bool bGoldenData = false ) ; // save motor pos
void SaveMotorSpeedParameter ( C DaoDatabase & dbMtrSpeed , C String csPackageName , bool bGoldenData = false ) ; // save motor speed setting
void GetMotorPos ( CString csPackageName , CDaoDatabase * pdb ); // get motor pos and update to text box
void GetMotorSpeedParameter ( CString csPackageName , CDaoDatabase * pdb = NULL ); // get motor speed setting and update to text box
bool IsMachineRunning ( ) ; // check if machine is running
void ProcessMaintMsg ( ) ; // process Maintenance Message and print to text box
// Indicate that output has been moved before
void SetMvOpFlag ( ) ;
@ -181,9 +183,9 @@ private:
// clear all motor text when module has no motor
void ClearAllMtrText ( ) ;
int GetSubField ( C String csPosName , std : : map < int , CString > & strItem ) ;
int GetSubField ( C DaoDatabase & db , C String csPosName , std : : map < int , CString > & strItem ) ;
// Get sub Motor Position and update to control
void GetSubFieldPosValue ( ) ;
void GetSubFieldPosValue ( CDaoDatabase & db ) ;
// enable motor button
void EnableMotorButton ( ) ;
@ -192,7 +194,7 @@ private:
void DisableMotorButton ( ) ;
// initialised speed radio button
void InitSpdRadioBtn ( ) ;
void InitSpdRadioBtn ( CDaoDatabase & dbMtrSpeed ) ;
CImageList * m_pImageList ;
CString m_csCurrMotorName ;
@ -325,6 +327,8 @@ private:
// true = Off Motor Disable Home and Move Button
bool m_bOffMtrDisableHmMvBtn ;
std : : map < CString , CSTRING_BOOL_MAP > m_mapMtrNamPosName ;
} ;
// {{AFX_INSERT_LOCATION}}