//changes the Timebase of coord system 1

//modifies the timebase to start/stop a running program
//this can also be used to adjust the execution speed

open plc 1
Coord[1].DesTimeBase=0       // freezes timebase at boot
while(1)
{
  if(PowerBrick[0].GpioData[0].0.1==1)
  {
     PowerBrick[0].GpioData[0].16.8=255
     Coord[1].DesTimeBase=Sys.ServoPeriod
  }
  else
  {
    PowerBrick[0].GpioData[0].16.8=7
     Coord[1].DesTimeBase=0
  }
}
close
