1. Intro nsfcamio is a commmand line program that transmits a single nsfcam command to the IC. It is located on all IRTF Sun and can be used by other system to command nsfcam. It was written for the AutoFocus tool. nsfcamio return "OK" if the command was sucessful. Otherwise and error is returned. See the example below: > nsfcamio itime 5 OK > nsfcamio itime five ERR -2 invalid range 2. AutoFocus Example: 2.1. To set up the camera, the following commands can be used to put nsfcam in the correct setting to generate autofocus data to a directory of your choosing. nsfcamio ParameterSave nsfcamio cammode basic nsfcamio obsmode 0 nsfcamio cycles 1 nsfcamio filename af1600 nsfcamio imageNumber 1 nsfcamio autosaveic off nsfcamio autosavexui on nsfcamio XUIPATH /scrs1/af_nsfcam/030711 nsfcamio Comment Autofocus data 2.2 To take data, use the go command. The isready command can be used to indicate when the GO is done (and your data file is ready). nsfcamio go nsfcamio isready Isready return "ERR -12 unable to execute, object is busy " while the GO is in progress. This is the only 'good' error message you receive. If any other error code are returned, then you should about the data collection. 2.3 At the end of your session, the ParameterRestore command restores the camera to the state so the observer can continue with the same observing parameter before doing autofocus. The 'AF' parameter restores the image_number varaiable. nsfcamio ParameterRestore AF 2.4 Filename. nsfcam will create files using the following naming scheme: sprintf( name, "%s%04ld.%s", filename, image_number, ext); where ext should be '.a' to indicated TCS is in the A beam. (This should be constant when using obsmode 0).