### Required Parameters ###
#PORT='PPMAC1'
#P='SARFE10-OAPU...'
#M1_ADDR=1
#powerPmacCreateController(<port_name>, <moving_poll_pseriod [ms]>, <idle_poll_period [ms]>)
#powerPmacCreateController("$(PORT)", 100, 100) <<< done in commom module
###########################
require gpasciiCommander
! $(gpasciiCommander_DIR)/gpasciiCommander --path $(ESB_MX_DIR) $(ESB_MX_DIR)/mx-stage.cfg

#M1=$(M1_ADDR)
M1=1
M2=$(M1)+1
M3=$(M1)+2
M4=$(M1)+3
M5=$(M1)+4
M6=$(M1)+5
M7=$(M1)+6
M8=$(M1)+7

powerPmacCreateAxis($(PORT), $(M1))
powerPmacCreateAxis($(PORT), $(M2))
powerPmacCreateAxis($(PORT), $(M3))
powerPmacCreateAxis($(PORT), $(M4))
powerPmacCreateAxis($(PORT), $(M5))
powerPmacCreateAxis($(PORT), $(M6))
powerPmacCreateAxis($(PORT), $(M7))
powerPmacCreateAxis($(PORT), $(M8))



# Load databse
dbLoadTemplate("$(ESB_MX_TEMPLATES)/ESB_MX.subs", "PORT_M=$(PORT),P_M=$(P),M1=$(M1),M2=$(M2),M3=$(M3),M4=$(M4),M5=$(M5),M6=$(M6),M7=$(M7),M8=$(M8)")
