# File: fl_cmon.src
#
# This procedure powers up the CCD Camera.
#

program "@(#) MODULE: fl_cmon.src RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/src/fl_cmon.src"
descr "   fl_cmon - Power up CCD camera"

display "Executing procedure fl_cmon."

tcblock mbipldin 0x154

display "Switching on CCD camera."

# CCD camera on 
tcblock mbpwcmon

wait time 60

if getdig(mkpwcm) <> "          ON" then
  display "CCD camera is NOT on - procedure halted"
  halt
end if

# Reset camera
tcblock mbcmres
wait time 10

# Reset IP
tcblock mbiprsal
wait time 10

tcblock mbiprun
wait time 10

# Set A ampifier & CCD offset (aadc=3 for flight electronics)
tcblock mbcmaadc 3

tcblock mbipldin 0x136

display "Finished procedure fl_cmon : %s" !TIME
