# File: restart_dep.src
#
# This procedure turns on all the devices normally on.  Use this control file
# if the DEP has been reset/reloaded with the instrument fully on.  The
# commands in this file gets the DEP status to a state consistant with the
# "ON" instrument.

program "@(#) MODULE: dpstart.src RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/sim/src/restart_dep.src"
descr "  dpstart - Informs the DEP that the instrument is on."


display "Executing procedure restart_dep."

tcblock mbpwaeon

# Tell DEP that prime 160k telemetry interface is selected.
tcblock mbpwtm1o

tcblock mbobt    ## Set proper On-Board Time
wait time 5

# Reset all motor controllers.
tcblock mbshrs
tcblock mbm1rs
tcblock mbm2rs
tcblock mbpars
tcblock mbc1rs
tcblock mbc2rs
tcblock mbfdrs
tcblock mbam1rs
tcblock mbam2rs

tcblock mbpwipon  ## Set IP state ON
tcblock mbiprsal  ## Reset IP
tcblock mbipcmd 5 ## Run Initialization code

tcblock mbcmhdr1 0x4040 0x4040 0 1 0

# .... The following is the important part of lcmpon .....

tcblock mbpwcmon
tcblock mbcmres
tcblock mbcmaadc 6

tcblock mbpwshon
tcblock mbpwm1on
tcblock mbpwm2on
tcblock mbpwpaon
tcblock mbpwc1on
tcblock mbpwc2on

perf dep_patches_v01
perf dep_mos+10e_v01

##perf obs_std_str60
##perf obs_std_str30
##perf obs_std_alt30

display "Finished procedure restart_dep : %s" !TIME
return
