Home > Back-end >  C # timer problem ask ace to help
C # timer problem ask ace to help

Time:10-17

Void BinLoadTimer_Tick (object sender, EventArgs e)
{
Double pos=new double ();
IntPtr handle=GlobalVar. AxisHandle [(int) Motor. BinGripper];
//grip moved to prepare position
If (binGripperAction==0)
{
AxisMotion. AxisMoveAbs (handle, MotionPar BT_GripperReadyPos * binGripperMultiple);
BinGripperAction++;
}
If (binGripperAction==1 & amp; & Math. Abs (pos - MotionPar. BT_GripperReadyPos) & lt;
=5){
If (btnlim. Backcolor==Color. Red)
{
AxisMotion. AxisMoveAbs (handle, MotionPar BT_GripperBufferUnloadPos * binGripperMultiple);//grip moved to buffer position
BinGripperAction++;
//grip to uninstall mobile location
If (binGripperAction==2)
{
AxisMotion. AxisMoveAbs (handle, MotionPar BT_GripperUnloadPos * binGripperMultiple);
BinGripperAction++;
}
}
The else
{
AxisMotion. AxisMoveAbs (handle, MotionPar BT_GripperLoadPos * binGripperMultiple);
BinGripperAction++;
//grip to uninstall mobile location
If (binGripperAction==2)
{
AxisMotion. AxisMoveAbs (handle, MotionPar BT_GripperUnloadPos * binGripperMultiple);
BinGripperAction++;
}
}
}
//grip moved to prepare position
If (binGripperAction==3)
{
BinGripperAction++;
BinLoadTimer. Enabled=false;
}
}
Program execution to the clamping jaw move to buffer position only, binGripperAction==2, does not perform, the program should be how to change
  • Related