//---------------------------------------------------------------------------

#ifndef MachineSetting_FormH
#define MachineSetting_FormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <Grids.hpp>
#include <ExtCtrls.hpp>
#include "TntButtons.hpp"
#include "TntExtCtrls.hpp"
#include "TntStdCtrls.hpp"
#include "TntForms.hpp"
//---------------------------------------------------------------------------
class TMachineSettingForm : public TTntForm
{
__published:	// IDE-managed Components
	TTntButton *IOSettingButton;
	TTntButton *MotorSettingButton;
	TTntGroupBox *GroupBox1;
	TTntButton *BlowerAllOnButton;
	TTntButton *BlowerAllOffButton;
	TTntGroupBox *GroupBox2;
	TTntButton *ServoMotorStartButton1;
	TTntButton *ServoMotorStopButton1;
	TTntButton *ServoMotorStartButton2;
	TTntButton *ServoMotorStopButton2;
	TTntButton *ServoMotorStartButton3;
	TTntButton *ServoMotorStopButton3;
	TTntButton *StepMotorAllStartButton;
	TTntButton *StepMotorAllStopButton;
	TTntButton *ServoMotorStartButton4;
	TTntButton *ServoMotorStopButton4;
	TTntSpeedButton *RBOnSpeedButton1;
	TTntSpeedButton *RBOffSpeedButton1;
	TTntEdit *MotorSpeedModEdit1;
	TTntEdit *MotorSpeedModEdit2;
	TTntEdit *MotorSpeedModEdit3;
	TTntEdit *MotorSpeedModEdit4;
    TTimer *Timer1;
	TTntSpeedButton *RBOnSpeedButton3;
	TTntSpeedButton *RBOffSpeedButton3;
    TTntLabel *Label18;
    TTntLabel *MotorSpeedLabel1;
    TTntLabel *MotorSpeedLabel2;
	TTntLabel *MotorSpeedLabel3;
	TTntLabel *MotorSpeedLabel4;
	TTntBitBtn *CloseBitBtn;
    TTntSpeedButton *RBSpeedSpeedButton1;
    TTntSpeedButton *RBSpeedSpeedButton2;
    TTntSpeedButton *RBSpeedSpeedButton3;
	TTntSpeedButton *RBOnSpeedButton4;
	TTntSpeedButton *RBOffSpeedButton4;
	TTntLabel *Label25;
	TTntLabel *Motor1MidTermRPMLabel;
	TTntLabel *Motor2MidTermRPMLabel;
	TTntGroupBox *GroupBox7;
	TTntGroupBox *GroupBox3;
	TTntSpeedButton *ABRInSpeedButton1;
	TTntSpeedButton *ABROutSpeedButton1;
	TTntSpeedButton *ABRInSpeedButton2;
	TTntSpeedButton *ABROutSpeedButton2;
	TTntLabel *Label2;
	TTntLabel *Label4;
	TTntSpeedButton *CylinderStopSpeedButton1;
	TTntSpeedButton *CylinderStopSpeedButton2;
	TTntGroupBox *GroupBox5;
	TTntSpeedButton *AirKnifeOnSpeedButton;
	TTntSpeedButton *AirKnifeOffSpeedButton;
	TTntLabel *Label6;
	TTntGroupBox *GroupBox6;
	TTntSpeedButton *SDBlowerOnSpeedButton1;
	TTntSpeedButton *SDBlowerOffSpeedButton1;
	TTntLabel *Label10;
	TTntGroupBox *GroupBox8;
	TTntLabel *Label20;
	TTntSpeedButton *DustBlowerOnSpeedButton1;
	TTntSpeedButton *DustBlowerOffSpeedButton1;
	TTntLabel *Label12;
	TTntSpeedButton *DustBlowerOnSpeedButton2;
	TTntSpeedButton *DustBlowerOffSpeedButton2;
	TTntLabel *Label17;
	TTntSpeedButton *DustBlowerOnSpeedButton3;
	TTntSpeedButton *DustBlowerOffSpeedButton3;
	TTntLabel *Label21;
	TTntSpeedButton *DustBlowerOnSpeedButton4;
	TTntSpeedButton *DustBlowerOffSpeedButton4;
	TTntLabel *Label24;
	TTntSpeedButton *DustBlowerOnSpeedButton5;
	TTntSpeedButton *DustBlowerOffSpeedButton5;
	TTntLabel *Label28;
	TTntSpeedButton *AirBrushOnSpeedButton;
	TTntSpeedButton *AirBrushOffSpeedButton;
	TTntGroupBox *GroupBox10;
	TTntLabel *Label19;
	TTntSpeedButton *DefectEjectorOnSpeedButton;
	TTntSpeedButton *DefectEjectorOffSpeedButton;
	TTntLabel *Label23;
	TTntSpeedButton *UnInsEjectorOnSpeedButton;
	TTntSpeedButton *UnInsEjectorOffSpeedButton;
	TTntEdit *RB1SpeedEdit;
	TTntEdit *RB2SpeedEdit;
	TTntSpeedButton *SDBlowerOnSpeedButton2;
	TTntSpeedButton *SDBlowerOffSpeedButton2;
	TTntLabel *Label8;
	TTntSpeedButton *MEOpenSpeedButton;
	TTntSpeedButton *MECloseSpeedButton;
	TTntLabel *Label30;
	TTntSpeedButton *MEStopSpeedButton;
	TTntGroupBox *GroupBox9;
	TTntLabel *Label26;
	TTntSpeedButton *LampOnSpeedButton1;
	TTntSpeedButton *LampOffSpeedButton1;
	TTntLabel *Label27;
	TTntSpeedButton *LampOnSpeedButton2;
	TTntSpeedButton *LampOffSpeedButton2;
	TTntLabel *Label33;
	TTntSpeedButton *LampOnSpeedButton3;
	TTntSpeedButton *LampOffSpeedButton3;
	TTntLabel *Label31;
	TTntSpeedButton *BuzzerOnSpeedButton;
	TTntSpeedButton *BuzzerOffSpeedButton;
	TTntGroupBox *GroupBox11;
	TTntSpeedButton *SetFreeModeSpeedButton;
	TTntSpeedButton *SetInterlockModeSpeedButton;
	TTntGroupBox *GroupBox12;
	TTntLabel *Label35;
	TTntSpeedButton *RoomLampOnSpeedButton;
	TTntSpeedButton *RoomLampOffSpeedButton;
	TTntGroupBox *GroupBox13;
	TTntSpeedButton *VFOnSpeedButton;
	TTntSpeedButton *VFOffSpeedButton;
	TTntEdit *VFSpeedEdit;
	TTntLabel *Label38;
	TTntLabel *Label37;
	TTntSpeedButton *MELampOnSpeedButton;
	TTntSpeedButton *MELampOffSpeedButton;
	TTntGroupBox *GroupBox14;
	TTntLabel *Label40;
	TTntSpeedButton *StepMotorSpeedButton1;
	TTntSpeedButton *StepMotorSpeedButton2;
	TTntSpeedButton *StepMotorSpeedButton3;
	TTntSpeedButton *StepMotorSpeedButton4;
	TTntSpeedButton *StepMotorSpeedButton5;
	TTntButton *StepMotorUpButton1;
	TTntButton *StepMotorDownButton1;
	TTntLabel *Label41;
	TTntButton *StepMotorUpButton2;
	TTntButton *StepMotorDownButton2;
	TTntLabel *Label42;
	TTntButton *StepMotorUpButton3;
	TTntButton *StepMotorDownButton3;
	TTntLabel *Label43;
	TTntSpeedButton *EmergencyPLCOffSpeedButton;
	TTntLabel *Label44;
	TTntGroupBox *GroupBox16;
	TTntLabel *Label48;
	TTntLabel *Label49;
	TTntLabel *Label50;
	TTntLabel *Label51;
	TTntLabel *Label52;
	TTntPanel *StepMotorMinusLimitPanel1;
	TTntPanel *StepMotorHomePanel1;
	TTntPanel *StepMotorPlusLimitPanel1;
	TTntPanel *StepMotorMinusLimitPanel2;
	TTntPanel *StepMotorHomePanel2;
	TTntPanel *StepMotorPlusLimitPanel2;
	TTntPanel *StepMotorMinusLimitPanel3;
	TTntPanel *StepMotorHomePanel3;
	TTntPanel *StepMotorPlusLimitPanel3;
	TTntPanel *StepMotorMinusLimitPanel4;
	TTntPanel *StepMotorHomePanel4;
	TTntPanel *StepMotorPlusLimitPanel4;
	TTntPanel *StepMotorMinusLimitPanel5;
	TTntPanel *StepMotorHomePanel5;
	TTntPanel *StepMotorPlusLimitPanel5;
	TTntLabel *Label46;
	TTntButton *HomeSearchButton;
	TTntLabel *AbsEncoderLabel1;
	TTntLabel *AbsEncoderLabel2;
	TTntLabel *AbsEncoderLabel3;
	TTntLabel *AbsEncoderLabel4;
	TTntLabel *AbsEncoderLabel5;
	TTntLabel *Motor4MidTermRPMLabel;
	TTntLabel *Motor3MidTermRPMLabel;
	TTntSpeedButton *DefectSolOnSpeedButton;
	TTntSpeedButton *DefectSolOffSpeedButton;
	TTntSpeedButton *UnInsSolOnSpeedButton;
	TTntSpeedButton *UnInsSolOffSpeedButton;
	TTntLabel *Label29;
	TTntEdit *DefectSolOnTimeEdit;
	TTntLabel *Label32;
	TTntEdit *DefectSolOffTimeEdit;
	TTntLabel *Label53;
	TTntEdit *UnInsSolOnTimeEdit;
	TTntLabel *Label54;
	TTntEdit *UnInsSolOffTimeEdit;
	TTntLabel *Label55;
	TTntSpeedButton *AirKnifeOnSpeedButton2;
	TTntSpeedButton *AirKnifeOffSpeedButton2;
	TTntLabel *Label1;
	TTntSpeedButton *SetTestModeSpeedButton;
  TTntLabel *TntLabel3;
  TTntLabel *TntLabel2;
  TTntEdit *TntEdit2;
  TTntLabel *TntLabel1;
  TTntEdit *TntEdit1;
  TTntSpeedButton *TntSpeedButton4;
  TTntSpeedButton *TntSpeedButton3;
  TTntSpeedButton *TntSpeedButton2;
  TTntSpeedButton *TntSpeedButton1;
  TTntEdit *RB3SpeedEdit;
	TTntButton *ServoMotorStartButton5;
	TTntButton *ServoMotorStopButton5;
	TTntEdit *MotorSpeedModEdit5;
	TTntLabel *MotorSpeedLabel5;
	TTntLabel *Motor5MidTermRPMLabel;
	void __fastcall BlowerOffButtonClick(TObject *Sender);
	void __fastcall ServoMotorStartButtonClick(TObject *Sender);
	void __fastcall ServoMotorStopButtonClick(TObject *Sender);
	void __fastcall ServoMotorServoOnButtonClick(TObject *Sender);
	void __fastcall ServoMotorServoOffButtonClick(TObject *Sender);
	void __fastcall MotorSettingButtonClick(TObject *Sender);
	void __fastcall MotorSpeedModEditChange(TObject *Sender);
	void __fastcall FormActivate(TObject *Sender);
	void __fastcall IOSettingButtonClick(TObject *Sender);
	void __fastcall ABROutSpeedButton1Click(TObject *Sender);
	void __fastcall ABRInSpeedButton2Click(TObject *Sender);
	void __fastcall ABROutSpeedButton2Click(TObject *Sender);
	void __fastcall AirKnifeOnSpeedButtonClick(TObject *Sender);
	void __fastcall AirKnifeOffSpeedButtonClick(TObject *Sender);
	void __fastcall SDBlowerOnSpeedButton1Click(TObject *Sender);
	void __fastcall SDBlowerOffSpeedButton1Click(TObject *Sender);
    void __fastcall Timer1Timer(TObject *Sender);
	void __fastcall MotorSpeedModEditClick(TObject *Sender);
	void __fastcall CloseBitBtnClick(TObject *Sender);
    void __fastcall DustBlowerOnSpeedButton1Click(TObject *Sender);
    void __fastcall DustBlowerOffSpeedButton1Click(TObject *Sender);
    void __fastcall DustBlowerOnSpeedButton2Click(TObject *Sender);
    void __fastcall DustBlowerOffSpeedButton2Click(TObject *Sender);
    void __fastcall DustBlowerOnSpeedButton3Click(TObject *Sender);
    void __fastcall DustBlowerOffSpeedButton3Click(TObject *Sender);
    void __fastcall DustBlowerOnSpeedButton4Click(TObject *Sender);
    void __fastcall DustBlowerOffSpeedButton4Click(TObject *Sender);
	void __fastcall DustBlowerOnSpeedButton5Click(TObject *Sender);
	void __fastcall DustBlowerOffSpeedButton5Click(TObject *Sender);
	void __fastcall AirBrushOnSpeedButtonClick(TObject *Sender);
	void __fastcall AirBrushOffSpeedButtonClick(TObject *Sender);
	void __fastcall DefectEjectorOnSpeedButtonClick(TObject *Sender);
	void __fastcall DefectEjectorOffSpeedButtonClick(TObject *Sender);
	void __fastcall UnInsEjectorOnSpeedButtonClick(TObject *Sender);
	void __fastcall UnInsEjectorOffSpeedButtonClick(TObject *Sender);
	void __fastcall NumEditClick(TObject *Sender);
	void __fastcall ABRInSpeedButton1Click(TObject *Sender);
	void __fastcall SDBlowerOnSpeedButton2Click(TObject *Sender);
	void __fastcall SDBlowerOffSpeedButton2Click(TObject *Sender);
	void __fastcall MEOpenSpeedButtonClick(TObject *Sender);
	void __fastcall MECloseSpeedButtonClick(TObject *Sender);
	void __fastcall MEStopSpeedButtonClick(TObject *Sender);
	void __fastcall LampOnSpeedButton1Click(TObject *Sender);
	void __fastcall LampOffSpeedButton1Click(TObject *Sender);
	void __fastcall LampOnSpeedButton2Click(TObject *Sender);
	void __fastcall LampOffSpeedButton2Click(TObject *Sender);
	void __fastcall LampOnSpeedButton3Click(TObject *Sender);
	void __fastcall LampOffSpeedButton3Click(TObject *Sender);
	void __fastcall BuzzerOnSpeedButtonClick(TObject *Sender);
	void __fastcall BuzzerOffSpeedButtonClick(TObject *Sender);
	void __fastcall VFOnSpeedButtonClick(TObject *Sender);
	void __fastcall VFOffSpeedButtonClick(TObject *Sender);
	void __fastcall VFMagnetOnSpeedButtonClick(TObject *Sender);
	void __fastcall VFMagnetOffSpeedButtonClick(TObject *Sender);
	void __fastcall RoomLampOnSpeedButtonClick(TObject *Sender);
	void __fastcall RoomLampOffSpeedButtonClick(TObject *Sender);
	void __fastcall MELampOnSpeedButtonClick(TObject *Sender);
	void __fastcall MELampOffSpeedButtonClick(TObject *Sender);
	void __fastcall StepMotorUpButtonClick(TObject *Sender);
	void __fastcall StepMotorSpeedButtonClick(TObject *Sender);
	void __fastcall StepMotorDownButtonClick(TObject *Sender);
	void __fastcall EmergencyPLCOffSpeedButtonClick(TObject *Sender);
	void __fastcall SetFreeModeSpeedButtonClick(TObject *Sender);
	void __fastcall SetInterlockModeSpeedButtonClick(TObject *Sender);
	void __fastcall HomeSearchButtonClick(TObject *Sender);
	void __fastcall EjectorSolTestSpeedButtonClick(TObject *Sender);
	void __fastcall AirKnifeOnSpeedButton2Click(TObject *Sender);
	void __fastcall AirKnifeOffSpeedButton2Click(TObject *Sender);
	void __fastcall SetTestModeSpeedButtonClick(TObject *Sender);
  void __fastcall RBOnSpeedButton1Click(TObject *Sender);
  void __fastcall RBOnSpeedButton3Click(TObject *Sender);
  void __fastcall RBOnSpeedButton4Click(TObject *Sender);
  void __fastcall TntSpeedButton1Click(TObject *Sender);
  void __fastcall TntSpeedButton2Click(TObject *Sender);
private:	// User declarations
	int CurrentStepMotorIndex;

	void __fastcall CheckMachineStatus(void);
  void __fastcall GetDefaultString();
public:		// User declarations
	__fastcall TMachineSettingForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TMachineSettingForm *MachineSettingForm;
//---------------------------------------------------------------------------
#endif
