40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  TCS elog  Not logged in ELOG logo
Message ID: 31     Entry time: Wed May 5 18:45:51 2010
Author: Aidan 
Type: Computing 
Category: Hartmann sensor 
Subject: Python code to interface the Dalsa1M60 and export the temperature to EPICS 

Python script

I wrote a Python script, ~/scripts/dalsa_to_epics.py that reads the temperature off the camera using serial_cmd vt and then it writes this to the EPICS channels using ezcawrite. See attached. It is now running continuously in the background as dalsa_to_epics.

Dalsa1M60 baud rate

Also I accessed the menu of the 1M60 and changed the baud rate to 115200 using sbr 115200. Then I edited the dalsa_1m60.cfg file to set the baud rate to 115200 in that file. Finally, I changed the settings on the camera so that it will boot with the new baud rate when it is turned off and on again - this was with wus in the camera menu.

All the files are attached.




Attachment 1: dalsa_to_epics.py  983 Bytes  Uploaded Wed May 5 19:53:57 2010  | Hide | Hide all

# Import the Dalsa1M60 packzge
import Dalsa1M60, subprocess

# define the serial command location
serial_cmd_location = '/opt/EDTpdv/serial_cmd'

# start a loop that continually gets the temperatures
getTemperatures = 1
... 18 more lines ...
Attachment 2: VerifyTemperature.py  2 kB  Uploaded Wed May 5 19:54:12 2010  | Hide | Hide all

# part of the Dalsa1M60 package
# a module for verifying the temperature of the Dalsa 1M60
# The serial command 'vt' is sent to the camera. The camera responds as follow
#    > vt
#    Camera Temperature on Digitzer Board: 47.2 Celsius
#    Camera Temperature on Sensor Board: 39.4 Celsius
... 65 more lines ...
Attachment 3: dalsa_1m60.cfg  1 kB  Uploaded Wed May 5 19:54:24 2010  | Hide | Hide all
# CAMERA_MODEL "Dalsa 1m60 config file (freerun)"

# camera name/description
camera_class:                  "Dalsa"
camera_model:                  "1M60"
camera_info:                   "12 bit dual channel camera link"

... 51 more lines ...
ELOG V3.1.3-