towards using gather and ppc in shapepath
This commit is contained in:
38
python/MXMotion.py
Normal file
38
python/MXMotion.py
Normal file
@@ -0,0 +1,38 @@
|
||||
import os, sys
|
||||
sys.path.insert(0,os.path.expanduser('~/Documents/prj/SwissFEL/PBTools/'))
|
||||
#import pbtools.misc.pp_comm as pp_comm -> pp_comm.PPComm
|
||||
from pbtools.misc.pp_comm import PPComm
|
||||
from pbtools.misc.gather import Gather
|
||||
|
||||
|
||||
class MotionBase:
|
||||
def __init__(self, comm, gather, verbose):
|
||||
self.comm=comm
|
||||
self.gather=gather
|
||||
self.verbose=verbose
|
||||
|
||||
def wait_trigger(self):
|
||||
'''
|
||||
//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
|
||||
'''
|
||||
pass
|
||||
Reference in New Issue
Block a user