Test results 2022-06-22 (Parker and Russell): everything works except the shutter, which did not move.
startChiller works even if it's already chilling
stopChiller works; controllerState goes to 1
startChiller works from stopped, but it takes some time for the (source) temperature to stabilize.
- Test that you cannot turn the lamp on if the chiller is off
stopChiller
turnLampOn 0 # correctly rejected
turnLampOff 0 # correctly accepted
- Turn the lamp on
startChiller
turnLampOn 0 # correctly accepted; power is 900 as expected
- Test that we cannot turn the lamp off too soon
turnLampOff 0 # correctly rejected: "Failed: Can't power off lamp while warming up; wait 731.6 seconds or use force=True."
- Test changing lamp power
turnLampOn 950 # correctly reported the new power as 950W
turnLampOn 800 # correctly reported the new power as 800W; this is the minimum
- Test too low and too high lamp power
turnLampOn 799 # correctly rejected: "Failed: must be in range [800, 1200], inclusive"
turnLampOn 1201 # correctly rejected: "Failed: 1201.0 must be in range [800, 1200], inclusive"
- Test force off, after making sujre there isn't much time remaining
turnLampOff 0 # correctly rejected: "Failed: Can't power off lamp while warming up; wait 127.5 seconds or use force=True."
turnLampOff 1 # forced the lamp off
1655935408.652: logMessage: name=ATWhiteLight.LampModel, level=30, message=Turning off lamp while warming up because force=True; remaining warmup duration=125.0 seconds, traceback=, filePath=/home/saluser/tsrepos/ts_atwhitelight/python/lsst/ts/atwhitelight/lamp_model.py, functionName=turn_lamp_off, lineNumber=547, process=2066, timestamp=0.0000
Finished command turnLampOff
1655935408.666: lampState: basicState=3, controllerError=-1, controllerState=4, setPower=0.0000, cooldownEndTime=1655936256.0000, warmupEndTime=1655935488.0000
1655935408.668: lampOnHours: hours=0.2153
- Test that we cannot turn the lamp on yet
turnLampOn 0 # correctly rejected: "Failed: Cooling; wait 818.0 seconds"
We did not test turnLampOn after the cooldown timer expired. I didn’t want to turn the bulb on again and have to run it for 15 more minutes. It would be best to test this, but it is already unit-tested. We could test it without shortening the bulb life by disconnecting the power input wire (DAC0), and we could even speed up the test by using a non-default configuration to shorten the timers (only reasonable if we don’t actually turn on the lamp).
We also tried the openShutter and closeShutter comamnds. The result was that the shutter did not move (except a bit the second time we tried opening it – the closed limit switch deactivated).
The CSC is presently coded to control the shutter as follows:
- shutter_enable="EIO3", # 0=enable
- shutter_direction="EIO2", # 0=open
Thus openShutter sets E103=1 and E102=0 and waits for the move to finish (as indicated by the limit switches) or a timeout, then it sets E103=1.
closeShutter is the same except it sets E102=1.
Since the shutter did not actually move and the shutter was closed, the openShutter command timed out and closeShutter finished immediately.
I found one typo in ts_atwhitelight.
Test results 2022-06-22 (Parker and Russell): everything works except the shutter, which did not move.
startChiller works even if it's already chilling
stopChiller works; controllerState goes to 1
startChiller works from stopped, but it takes some time for the (source) temperature to stabilize.
stopChiller
turnLampOn 0 # correctly rejected
turnLampOff 0 # correctly accepted
startChiller
turnLampOn 0 # correctly accepted; power is 900 as expected
turnLampOff 0 # correctly rejected: "Failed: Can't power off lamp while warming up; wait 731.6 seconds or use force=True."
turnLampOn 950 # correctly reported the new power as 950W
turnLampOn 800 # correctly reported the new power as 800W; this is the minimum
turnLampOn 799 # correctly rejected: "Failed: must be in range [800, 1200], inclusive"
turnLampOn 1201 # correctly rejected: "Failed: 1201.0 must be in range [800, 1200], inclusive"
turnLampOff 0 # correctly rejected: "Failed: Can't power off lamp while warming up; wait 127.5 seconds or use force=True."
turnLampOff 1 # forced the lamp off
1655935408.652: logMessage: name=ATWhiteLight.LampModel, level=30, message=Turning off lamp while warming up because force=True; remaining warmup duration=125.0 seconds, traceback=, filePath=/home/saluser/tsrepos/ts_atwhitelight/python/lsst/ts/atwhitelight/lamp_model.py, functionName=turn_lamp_off, lineNumber=547, process=2066, timestamp=0.0000
Finished command turnLampOff
1655935408.666: lampState: basicState=3, controllerError=-1, controllerState=4, setPower=0.0000, cooldownEndTime=1655936256.0000, warmupEndTime=1655935488.0000
1655935408.668: lampOnHours: hours=0.2153
turnLampOn 0 # correctly rejected: "Failed: Cooling; wait 818.0 seconds"
We did not test turnLampOn after the cooldown timer expired. I didn’t want to turn the bulb on again and have to run it for 15 more minutes. It would be best to test this, but it is already unit-tested. We could test it without shortening the bulb life by disconnecting the power input wire (DAC0), and we could even speed up the test by using a non-default configuration to shorten the timers (only reasonable if we don’t actually turn on the lamp).
We also tried the openShutter and closeShutter comamnds. The result was that the shutter did not move (except a bit the second time we tried opening it – the closed limit switch deactivated).
The CSC is presently coded to control the shutter as follows:
Thus openShutter sets E103=1 and E102=0 and waits for the move to finish (as indicated by the limit switches) or a timeout, then it sets E103=1.
closeShutter is the same except it sets E102=1.
Since the shutter did not actually move and the shutter was closed, the openShutter command timed out and closeShutter finished immediately.
I found one typo in ts_atwhitelight.