generate.py for new MCS1 driver
This commit is contained in:
18
generate.py
18
generate.py
@@ -165,18 +165,13 @@ epicsEnvSet("LOCATION", "{loc}")
|
|||||||
# smarActMot PSI templates and other files
|
# smarActMot PSI templates and other files
|
||||||
require motorSmarAct
|
require motorSmarAct
|
||||||
require smarActMot
|
require smarActMot
|
||||||
require ESB_MX zamofing_t
|
require ESB_MX
|
||||||
|
|
||||||
###### initialize device ############
|
###### initialize device ############
|
||||||
drvAsynIPPortConfigure("asyn{port}", "{host}:5000", 0, 0, 0)
|
drvAsynIPPortConfigure("asyn{port}", "{host}:5000", 0, 0, 0)
|
||||||
# PORT, MCS_PORT, number of axes, active poll period (sec), idle poll period (sec)
|
#ctrlPort, asynPort, number of axes, active poll period (ms), idle poll period ms), [default debug lvl]
|
||||||
smarActMCSCreateController("{port}", "asyn{port}", {num_ax}, 0.1, 1.0)
|
MCSCreateController("{port}", "asyn{port}", {num_ax}, 100, 1000, 0x00)
|
||||||
|
|
||||||
###### initialize axes ############
|
|
||||||
'''
|
|
||||||
|
|
||||||
tplMcsAxis='''\
|
|
||||||
smarActMCSCreateAxis({PORT}, {ADDR}, {ADDR})
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
mcsSubsHdr='''\
|
mcsSubsHdr='''\
|
||||||
@@ -383,12 +378,9 @@ file PPMACMotor.template
|
|||||||
fh_sb.close()
|
fh_sb.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def genSmarActIOC(self):
|
def genSmarActIOC(self):
|
||||||
tplCtrl=Generate.tplMcsCtrl
|
tplCtrl=Generate.tplMcsCtrl
|
||||||
tplAxis=Generate.tplMcsAxis
|
#tplAxis=Generate.tplMcsAxis
|
||||||
#tplAxSR=Generate.tplMcsAxisSaveRestore
|
#tplAxSR=Generate.tplMcsAxisSaveRestore
|
||||||
subsHdr=Generate.mcsSubsHdr
|
subsHdr=Generate.mcsSubsHdr
|
||||||
lutPSENS=Generate.lutPSENS
|
lutPSENS=Generate.lutPSENS
|
||||||
@@ -443,7 +435,7 @@ file PPMACMotor.template
|
|||||||
motPar['VELO']=2
|
motPar['VELO']=2
|
||||||
motPar['RTRY']=1
|
motPar['RTRY']=1
|
||||||
fh_sb.write(fmt.format(**motPar))
|
fh_sb.write(fmt.format(**motPar))
|
||||||
fh_ss.write(tplAxis.format(**motPar))
|
#fh_ss.write(tplAxis.format(**motPar))
|
||||||
#fh_sr.write(tplAxSR.format(**motPar))
|
#fh_sr.write(tplAxSR.format(**motPar))
|
||||||
fh_sb.write('}\n\n')
|
fh_sb.write('}\n\n')
|
||||||
fh_ss.close()
|
fh_ss.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user