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

#ifndef MachineControl_FormH
#define MachineControl_FormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>
#include <Menus.hpp>
#include "TntButtons.hpp"
#include "TntExtCtrls.hpp"
#include "TntStdCtrls.hpp"
#include "TntForms.hpp"
//---------------------------------------------------------------------------
class TMachineControlForm : public TTntForm
{
__published:	// IDE-managed Components
    TTntButton *EmergencyStopButton;
    TTntButton *Button1;
    TTntButton *CloseButton;
    TTntLabel *Label18;
	TTntButton *MachineSettingButton;
	TTntGroupBox *GroupBox8;
	TTntButton *MainControlRunButton;
	TTntButton *MainControlStopButton;
	TTntGroupBox *GroupBox10;
	TTntLabel *Label7;
	TTntGroupBox *GroupBox9;
	TTntLabel *Label10;
	TTntLabel *Label11;
	TTntLabel *VD1SpeedLabel;
	TTntLabel *VD2SpeedLabel;
	TTntLabel *Label8;
	TTntLabel *BFIDSpeedLabel;
	TTntLabel *Label9;
	TTntLabel *BFOD1SpeedLabel;
	TTntEdit *SD1SpeedEdit;
	TTntEdit *SD2SpeedEdit;
	TTntEdit *BFIDSpeedEdit;
	TTntEdit *BFOD1SpeedEdit;
	TTntSpeedButton *RunSpeedSpeedButton2;
	TTntSpeedButton *RunSpeedSpeedButton1;
	TTntSpeedButton *RunSpeedSpeedButton3;
	TTntRadioButton *AirKnifeSpeedRadioButton0;
	TTntGroupBox *GroupBox11;
	TTntPanel *Panel1;
	TTntLabel *Label5;
	TTntGroupBox *GroupBox12;
	TTntPanel *Panel3;
	TTntLabel *Label14;
	TTntRadioButton *VFAutoTrainModeRadioButton;
	TTntRadioButton *VFManualTrainModeRadioButton;
	TTntButton *MainControlCleaningButton;
	TTntButton *MainControlReadyButton;
	TTntGroupBox *GroupBox13;
	TTntGroupBox *GroupBox1;
	TTntSpeedButton *VFRunSpeedButton;
	TTntSpeedButton *VFStopSpeedButton;
	TTntSpeedButton *VFAutoSpeedButton;
	TTntLabel *Label13;
	TTntEdit *VFSpeedEdit;
	TTntGroupBox *GroupBox3;
	TTntSpeedButton *SDRunSpeedButton;
	TTntSpeedButton *SDStopSpeedButton;
	TTntSpeedButton *SDMotorStopSpeedButton;
	TTntGroupBox *GroupBox5;
	TTntButton *BowlFeederRunButton;
	TTntButton *BowlFeederStopButton;
	TTntButton *BowlFeederBreakButton;
	TTntGroupBox *GroupBox7;
	TTntButton *DustBlowOnButton;
	TTntButton *DustBlowOffButton;
	TTntGroupBox *GroupBox4;
	TTntButton *IntervalButton;
	TTntButton *TabletCounterButton;
	TTntButton *NewTabletCounterButton;
	TTntEdit *SuctionDiskSuctionSpeedEdit1;
	TTntLabel *Label23;
	TTntPanel *Panel4;
	TTntLabel *Label24;
	TTntLabel *Label25;
	TTntEdit *SuctionDiskSuctionSpeedEdit2;
	TTntButton *NCSettingButton;
	TTntButton *GeneralHomeSettingButton;
	TMainMenu *MainMenu1;
	TMenuItem *ErrorMenuItem;
	TMenuItem *N1;
	TMenuItem *LightOnMenuItem;
	TMenuItem *LightOffNenuItem;
	TTntEdit *VFDelayRunEdit;
	TTntLabel *Label26;
	TTntSpeedButton *VFDelayRunSpeedButton;
	TTimer *VibratorRunTimer;
	TTntButton *AdvMachineControlButton;
	TTntRadioButton *AirKnifeSpeedRadioButton1;
	TTntRadioButton *AirKnifeSpeedRadioButton2;
	TTntRadioButton *AirKnifeSpeedRadioButton3;
	TTntGroupBox *GroupBox14;
	TTntSpeedButton *AirKnifeSpeedButton0;
	TTntSpeedButton *AirKnifeSpeedButton1;
	TTntSpeedButton *AirKnifeSpeedButton2;
	TTntSpeedButton *AirKnifeSpeedButton3;
	TTntButton *Graph_Check;
	TTntGroupBox *GroupBox2;
	TTntGroupBox *GroupBox16;
	TTntLabel *Label20;
	TTntLabel *Label22;
	TTntLabel *Label1;
	TTntLabel *Label2;
	TTntEdit *Sensor2RatioEdit;
	TTntEdit *Sensor1RatioEdit;
	TTntGroupBox *GroupBox15;
	TTntLabel *Label15;
	TTntLabel *Label16;
	TTntLabel *Label19;
	TTntLabel *Label21;
	TTntEdit *ManualMaxSpeedEdit;
	TTntEdit *ManualModeSensorActiveRatioEdit;
	TTntComboBox *ManualModeSensorIndexComboBox;
  TTntGroupBox *TntGroupBox1;
  TRadioButton *SensorRadioBtn1;
  TRadioButton *SensorRadioBtn2;
  TTntPanel *TntPanel1;
  TTntLabel *TntLabel2;
  TTntLabel *TntLabel3;
  TTntEdit *SuctionDiskSuctionSpeedEdit3;
  TRadioButton *SensorRadioBtn3;
  TTntButton *ViewThreeDSensorInfoBtn;
  TTntButton *ShowTPBButton;
	TTntPanel *EjectorTestPanel;
	TTntGroupBox *EjectTestGroupBox;
	TTntLabel *Label27;
	TTntLabel *TntLabel7;
	TTntLabel *Label29;
	TTntButton *EjectTestRunButton;
	TTntButton *MisejectTestRunButton;
	TTntButton *MisejectTestStopButton;
	TTntEdit *MisejectTestActiveDelayEdit;
	TTntEdit *MisejectTestDurationTimeEdit;
	TTntGroupBox *TntGroupBox3;
	TTntLabel *TntLabel10;
	TTntEdit *EjectorWindStrengthEdit;
	TGroupBox *GroupBox17;
	TTntLabel *Label3;
	TTntLabel *Label35;
	TTntLabel *TntLabel11;
	TTntLabel *Label36;
	TTntEdit *DefectEjectorLengthEdit;
	TTntEdit *DefectEjectorDelayEdit;
	TGroupBox *GroupBox18;
	TTntLabel *Label39;
	TTntLabel *TntLabel12;
	TTntLabel *TntLabel13;
	TTntLabel *Label40;
	TTntEdit *UnInsEjectorDelayEdit;
	TTntEdit *UnInsEjectorLengthEdit;
	TGroupBox *GroupBox19;
	TTntLabel *TntLabel14;
	TTntLabel *TntLabel15;
	TTntLabel *TntLabel16;
	TTntLabel *TntLabel17;
	TTntEdit *GoodEjectorDelayEdit;
	TTntEdit *GoodEjectorLengthEdit;
	TGroupBox *GroupBox20;
	TTntLabel *Label49;
	TTntCheckBox *MisejectActiveCheckBox;
	TTntEdit *MisejectActiveDelayEdit;
	TTntButton *EjectSetupButton;
	TTntButton *EjectorSetupCloseButton;
	TTntButton *EjectTestButton;
	TTntComboBox *EjectTestCountComboBox;
	TTntLabel *EjectorTestCountLabel;
	TTntGroupBox *EjectTestSettingGroupBox1;
	TTntRadioButton *EjectPassRadioButton1;
	TTntRadioButton *EjectBlowRadioButton1;
	TTntLabel *EjectTypeLabel;
	TTntComboBox *EjectTypeComboBox;
	TTntGroupBox *EjectTestSettingGroupBox2;
	TTntRadioButton *EjectPassRadioButton2;
	TTntRadioButton *EjectBlowRadioButton2;
	TTntGroupBox *EjectTestSettingGroupBox3;
	TTntRadioButton *EjectPassRadioButton3;
	TTntRadioButton *EjectBlowRadioButton3;
	TTntGroupBox *EjectTestSettingGroupBox4;
	TTntRadioButton *EjectPassRadioButton4;
	TTntRadioButton *EjectBlowRadioButton4;
	TTntLabel *TntLabel1;
	TTntEdit *BFOD2SpeedEdit;
	TTntLabel *BFOD2SpeedLabel;
	void __fastcall VFRunSpeedButtonClick(TObject *Sender);
	void __fastcall VFStopSpeedButtonClick(TObject *Sender);
	void __fastcall VFAutoSpeedButtonClick(TObject *Sender);
	void __fastcall SDRunSpeedButtonClick(TObject *Sender);
	void __fastcall SDStopSpeedButtonClick(TObject *Sender);
    void __fastcall BowlFeederStopButtonClick(TObject *Sender);
    void __fastcall BowlFeederRunButtonClick(TObject *Sender);
    void __fastcall Button1Click(TObject *Sender);
    void __fastcall TabletCounterButtonClick(TObject *Sender);
	void __fastcall BowlFeederBreakButtonClick(TObject *Sender);
	void __fastcall SDMotorStopSpeedButtonClick(TObject *Sender);
	void __fastcall EjectTestRunButtonClick(TObject *Sender);
    void __fastcall CloseButtonClick(TObject *Sender);
    void __fastcall MotorSpeedEditChange(TObject *Sender);
    void __fastcall EmergencyStopButtonClick(TObject *Sender);
    void __fastcall AirKnifeSpeedButton0Click(TObject *Sender);
    void __fastcall IntervalButtonClick(TObject *Sender);
	void __fastcall MachineSettingButtonClick(TObject *Sender);
	void __fastcall MotorSpeedEditClick(TObject *Sender);
	void __fastcall DustBlowOnButtonClick(TObject *Sender);
	void __fastcall DustBlowOffButtonClick(TObject *Sender);
	void __fastcall NumEditClick(TObject *Sender);
	void __fastcall NewTabletCounterButtonClick(TObject *Sender);
	void __fastcall MainControlRunButtonClick(TObject *Sender);
	void __fastcall RunSpeedSpeedButtonClick(TObject *Sender);
	void __fastcall MainControlStopButtonClick(TObject *Sender);
	void __fastcall MainControlCleaningButtonClick(TObject *Sender);
	void __fastcall MainControlReadyButtonClick(TObject *Sender);
	void __fastcall NCSettingButtonClick(TObject *Sender);
	void __fastcall GeneralHomeSettingButtonClick(TObject *Sender);
	void __fastcall VFDelayRunSpeedButtonClick(TObject *Sender);
	void __fastcall VibratorRunTimerTimer(TObject *Sender);
	void __fastcall AdvMachineControlButtonClick(TObject *Sender);
	void __fastcall MisejectTestRunButtonClick(TObject *Sender);
	void __fastcall MisejectTestStopButtonClick(TObject *Sender);
	void __fastcall AirKnifeSpeedButton1Click(TObject *Sender);
	void __fastcall AirKnifeSpeedButton2Click(TObject *Sender);
	void __fastcall AirKnifeSpeedButton3Click(TObject *Sender);
	void __fastcall Graph_CheckClick(TObject *Sender);
  void __fastcall TntFormCreate(TObject *Sender);
  void __fastcall ViewThreeDSensorInfoBtnClick(TObject *Sender);
  void __fastcall ShowTPBButtonClick(TObject *Sender);
	void __fastcall EjectSetupButtonClick(TObject *Sender);
	void __fastcall EjectorSetupCloseButtonClick(TObject *Sender);
	void __fastcall EjectTestButtonClick(TObject *Sender);
	void __fastcall EjectTestCountComboBoxChange(TObject *Sender);
	void __fastcall EjectTypeComboBoxChange(TObject *Sender);
private:	// User declarations
	void __fastcall CheckMachineStatus(void);
    int TestBlowInterval;
    int TestBlowRunTime;
    int TestBlowTime;
	int TestBlowTimeRun;
    int EjectType;
  void __fastcall GetDefaultString();

	unsigned int VibratorStopTime;
public:		// User declarations
	__fastcall TMachineControlForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TMachineControlForm *MachineControlForm;
//---------------------------------------------------------------------------
#endif
