private void timerAxis_Tick(object sender, EventArgs e) { UpdatePos(); if (MultiMotion.CheckDefense() != MultiMotion.KSM_OK) { } }
private void timerAxis_Tick(object sender, EventArgs e) { MultiMotion.CheckDefense(); UpdatePos(); }
private void UpdatePos() { MultiMotion.GetCurrentPos(); if (checkBoxDefence.Checked == true) { MultiMotion.CheckDefense(); } // 카메라 1 ... // ---------- if (MultiMotion.AlarmValue[MultiMotion.Camera1Adjust] == 1) { Camera1Alarm.ImageIndex = 1; } else { Camera1Alarm.ImageIndex = 0; } Camera1.Text = MultiMotion.AxisValue[MultiMotion.Camera1Adjust].ToString("0.####"); // 카메라 2 ... // ---------- if (MultiMotion.AlarmValue[MultiMotion.Camera2Adjust] == 1) { Camera2Alarm.ImageIndex = 1; } else { Camera2Alarm.ImageIndex = 0; } Camera2.Text = MultiMotion.AxisValue[MultiMotion.Camera2Adjust].ToString("0.####"); // 리프트1 // ---------- if (MultiMotion.AlarmValue[MultiMotion.Lift1Motor] == 1) { Lift2MotorAlarm.ImageIndex = 1; } else { Lift2MotorAlarm.ImageIndex = 0; } Lift1.Text = MultiMotion.AxisValue[MultiMotion.Lift1Motor].ToString("0.####"); // 리프트2 // ---------- if (MultiMotion.AlarmValue[MultiMotion.Lift2Motor] == 1) { Shuttle2MotorAlarm.ImageIndex = 1; } else { Shuttle2MotorAlarm.ImageIndex = 0; } Lift2.Text = MultiMotion.AxisValue[MultiMotion.Lift2Motor].ToString("0.####"); // 셔틀1 // ---------- if (MultiMotion.AlarmValue[MultiMotion.Shuttle1Motor] == 1) { Shuttle1MotorAlarm.ImageIndex = 1; } else { Shuttle1MotorAlarm.ImageIndex = 0; } Shuttle1.Text = MultiMotion.AxisValue[MultiMotion.Shuttle1Motor].ToString("0.####"); // 셔틀2 // ---------- if (MultiMotion.AlarmValue[MultiMotion.Shuttle2Motor] == 1) { Shuttle2MotorAlarm.ImageIndex = 1; } else { Shuttle2MotorAlarm.ImageIndex = 0; } Shuttle2.Text = MultiMotion.AxisValue[MultiMotion.Shuttle2Motor].ToString("0.####"); // 로테이션 // ---------- if (MultiMotion.AlarmValue[MultiMotion.RotationMotor] == 1) { RotationMotorAlarm.ImageIndex = 1; } else { RotationMotorAlarm.ImageIndex = 0; } Rotation.Text = MultiMotion.AxisValue[MultiMotion.RotationMotor].ToString("0.####"); labelShuttle2Move.Text = SmallClass.shuttleMove1.ToString(); labelShuttle1Move.Text = SmallClass.shuttleMove2.ToString(); label90Move.Text = DataManager.sinmove94.ToString(); label0Move.Text = DataManager.sinmove4.ToString(); label45Move.Text = DataManager.sinmove49.ToString(); //// 가이드 모터 R ... //// ---------- //if (MultiMotion.AlarmValue[MultiMotion.Lift2Motor] == 1) // Shuttle2MotorAlarm.ImageIndex = 1; //else // Shuttle2MotorAlarm.ImageIndex = 0; //Shuttle2.Text = MultiMotion.AxisValue[MultiMotion.Lift2Motor].ToString("0.####"); /* * // 1. 카메라 유닛 X ... * // -------------------------------------------------- * if (MultiMotion.AlarmValue[MultiMotion.CAM_UNIT_X] == 1) * btnCamUnit_X_A.ImageIndex = 1; * else * btnCamUnit_X_A.ImageIndex = 0; * * txtCamUnitValue_X.Text = MultiMotion.AxisValue[MultiMotion.CAM_UNIT_X].ToString("0.####"); * * * // 2. 카메라 유닛 Y ... * // -------------------------------------------------- * if (MultiMotion.AlarmValue[MultiMotion.CAM_UNIT_Y] == 1) * btnCamUnit_Y_A.ImageIndex = 1; * else * btnCamUnit_Y_A.ImageIndex = 0; * * txtCamUnitValue_Y.Text = MultiMotion.AxisValue[MultiMotion.CAM_UNIT_Y].ToString("0.####"); * * * // 3. 카메라 유닛 Z ... * // -------------------------------------------------- * if (MultiMotion.AlarmValue[MultiMotion.CAM_UNIT_Z] == 1) * btnCamUnit_Z_A.ImageIndex = 1; * else * btnCamUnit_Z_A.ImageIndex = 0; * * txtCamUnitValue_Z.Text = MultiMotion.AxisValue[MultiMotion.CAM_UNIT_Z].ToString("0.####"); * * * // 8. INDEX 고정축 R ... * // -------------------------------------------------- * if (MultiMotion.AlarmValue[MultiMotion.INDEX_FIX_R] == 1) * btnIndexFix_A.ImageIndex = 1; * else * btnIndexFix_A.ImageIndex = 0; * * txtIndexFixValue.Text = MultiMotion.AxisValue[MultiMotion.INDEX_FIX_R].ToString("0.####"); * * * // 9. INDEX 이동축 R ... * // -------------------------------------------------- * if (MultiMotion.AlarmValue[MultiMotion.INDEX_MOVE_R] == 1) * btnIndexMove_A.ImageIndex = 1; * else * btnIndexMove_A.ImageIndex = 0; * * txtIndexMoveValue.Text = MultiMotion.AxisValue[MultiMotion.INDEX_MOVE_R].ToString("0.####"); * * * * */ }
private void btnAuto_Click(object sender, EventArgs e) { // 일시 정지 버튼 대응 ... // ---------- System.Windows.Forms.Application.DoEvents(); MultiMotion.CheckDefense(); if (MultiMotion.bEAutoStop == true) { MultiMotion.bEAutoStop = false; //MessageBox.Show(""); return; } // ---------- if (Rolling70() == false) { return; } // 일시 정지 버튼 대응 ... // ---------- System.Windows.Forms.Application.DoEvents(); MultiMotion.CheckDefense(); if (MultiMotion.bEAutoStop == true) { MultiMotion.bEAutoStop = false; return; } // ---------- // V-Block ... // ---------- MultiMotion.StopAll(); MultiMotion.SetSpeed(MultiMotion.KSM_SPEED_SLOW); MultiMotion.MoveAxis(MultiMotion.VBLOCK_Z, 1.0, true); MultiMotion.SetSpeed(this.AxisSpeed); // ---------- // 일시 정지 버튼 대응 ... // ---------- System.Windows.Forms.Application.DoEvents(); MultiMotion.CheckDefense(); if (MultiMotion.bEAutoStop == true) { MultiMotion.bEAutoStop = false; return; } // ---------- if (RotatingIndex() == false) { return; } // 일시 정지 버튼 대응 ... // ---------- System.Windows.Forms.Application.DoEvents(); MultiMotion.CheckDefense(); if (MultiMotion.bEAutoStop == true) { MultiMotion.bEAutoStop = false; return; } // ---------- if (Rolling80() == false) { return; } // 일시 정지 버튼 대응 ... // ---------- System.Windows.Forms.Application.DoEvents(); MultiMotion.CheckDefense(); if (MultiMotion.bEAutoStop == true) { MultiMotion.bEAutoStop = false; return; } // ---------- if (RotatingIndex() == false) { return; } // 일시 정지 버튼 대응 ... // ---------- System.Windows.Forms.Application.DoEvents(); MultiMotion.CheckDefense(); if (MultiMotion.bEAutoStop == true) { MultiMotion.bEAutoStop = false; return; } // ---------- MultiMotion.Swing(false); // 일시 정지 버튼 대응 ... // ---------- System.Windows.Forms.Application.DoEvents(); MultiMotion.CheckDefense(); if (MultiMotion.bEAutoStop == true) { MultiMotion.bEAutoStop = false; return; } // ---------- SaveData(); this.DialogResult = System.Windows.Forms.DialogResult.OK; }
private void UpdatePos() { MultiMotion.GetCurrentPos(); if (checkBoxDefence.Checked == true) { MultiMotion.CheckDefense(); } // 1. 카메라 유닛 X ... // -------------------------------------------------- if (MultiMotion.AlarmValue[MultiMotion.CAM_UNIT_X] == 1) { btnCamUnit_X_A.ImageIndex = 1; } else { btnCamUnit_X_A.ImageIndex = 0; } txtCamUnitValue_X.Text = MultiMotion.AxisValue[MultiMotion.CAM_UNIT_X].ToString("0.####"); // 2. 카메라 유닛 Y ... // -------------------------------------------------- if (MultiMotion.AlarmValue[MultiMotion.CAM_UNIT_Y] == 1) { btnCamUnit_Y_A.ImageIndex = 1; } else { btnCamUnit_Y_A.ImageIndex = 0; } txtCamUnitValue_Y.Text = MultiMotion.AxisValue[MultiMotion.CAM_UNIT_Y].ToString("0.####"); // 3. 카메라 유닛 Z ... // -------------------------------------------------- if (MultiMotion.AlarmValue[MultiMotion.CAM_UNIT_Z] == 1) { btnCamUnit_Z_A.ImageIndex = 1; } else { btnCamUnit_Z_A.ImageIndex = 0; } txtCamUnitValue_Z.Text = MultiMotion.AxisValue[MultiMotion.CAM_UNIT_Z].ToString("0.####"); // 4. 고정축 롤링 A ... // -------------------------------------------------- if (MultiMotion.AlarmValue[MultiMotion.ROLLING_FIX_1] == 1) { btnRollingFix_A_A.ImageIndex = 1; } else { btnRollingFix_A_A.ImageIndex = 0; } txtRollingValue_Fix_A.Text = MultiMotion.AxisValue[MultiMotion.ROLLING_FIX_1].ToString("0.####"); // 5. 고정축 롤링 B ... // -------------------------------------------------- if (MultiMotion.AlarmValue[MultiMotion.ROLLING_FIX_2] == 1) { btnRollingFix_B_A.ImageIndex = 1; } else { btnRollingFix_B_A.ImageIndex = 0; } txtRollingValue_Fix_B.Text = MultiMotion.AxisValue[MultiMotion.ROLLING_FIX_2].ToString("0.####"); // 6. 이동축 롤링 A ... // -------------------------------------------------- if (MultiMotion.AlarmValue[MultiMotion.ROLLING_MOVE_1] == 1) { btnRollingMove_A_A.ImageIndex = 1; } else { btnRollingMove_A_A.ImageIndex = 0; } txtRollingValue_Move_A.Text = MultiMotion.AxisValue[MultiMotion.ROLLING_MOVE_1].ToString("0.####"); // 7. 이동축 롤링 B ... // -------------------------------------------------- if (MultiMotion.AlarmValue[MultiMotion.ROLLING_MOVE_2] == 1) { btnRollingMove_B_A.ImageIndex = 1; } else { btnRollingMove_B_A.ImageIndex = 0; } txtRollingValue_Move_B.Text = MultiMotion.AxisValue[MultiMotion.ROLLING_MOVE_2].ToString("0.####"); // 8. INDEX 고정축 R ... // -------------------------------------------------- if (MultiMotion.AlarmValue[MultiMotion.INDEX_FIX_R] == 1) { btnIndexFix_A.ImageIndex = 1; } else { btnIndexFix_A.ImageIndex = 0; } txtIndexFixValue.Text = MultiMotion.AxisValue[MultiMotion.INDEX_FIX_R].ToString("0.####"); // 9. INDEX 이동축 R ... // -------------------------------------------------- if (MultiMotion.AlarmValue[MultiMotion.INDEX_MOVE_R] == 1) { btnIndexMove_A.ImageIndex = 1; } else { btnIndexMove_A.ImageIndex = 0; } txtIndexMoveValue.Text = MultiMotion.AxisValue[MultiMotion.INDEX_MOVE_R].ToString("0.####"); // 10. INDEX X축 이동 ... // -------------------------------------------------- if (MultiMotion.AlarmValue[MultiMotion.INDEX_MOVE_M] == 1) { btnIndex_X_A.ImageIndex = 1; } else { btnIndex_X_A.ImageIndex = 0; } if (MultiMotion.AlarmValue[MultiMotion.INDEX_MOVE_S] == 1) { btnIndex_X_A2.ImageIndex = 1; } else { btnIndex_X_A2.ImageIndex = 0; } txtIndex_X_Value.Text = MultiMotion.AxisValue[MultiMotion.INDEX_MOVE_M].ToString("0.####"); // 11. V-Block Z축 이동 ... // -------------------------------------------------- if (MultiMotion.AlarmValue[MultiMotion.VBLOCK_Z] == 1) { btnVBlock_Z_A.ImageIndex = 1; } else { btnVBlock_Z_A.ImageIndex = 0; } txtVBlockValue.Text = MultiMotion.AxisValue[MultiMotion.VBLOCK_Z].ToString("0.####"); // 12. 후방 카메라 Z축 이동 ... // -------------------------------------------------- if (MultiMotion.AlarmValue[MultiMotion.BACK_CAM_Z] == 1) { btnBCam_Z_A.ImageIndex = 1; } else { btnBCam_Z_A.ImageIndex = 0; } txtBackCamValue.Text = MultiMotion.AxisValue[MultiMotion.BACK_CAM_Z].ToString("0.####"); }