Commit 8dbfd947 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

software: Added general-purpose scripts and README

Signed-off-by: Theodor-Adrian Stana's avatarTheodor Stana <t.stana@cern.ch>
parent 0bf34b20
General purpose Python scripts
==============================
clrchxpcr.py -- Clears the channel pulse counter registers
rdchxpcr.py -- Read the channel pulse counter registers
mantrig.py -- Manually trigger a pulse on a selected channel
import time
import sys
import time
sys.path.append("../ei2c")
from ei2c import *
if __name__ == "__main__":
testelma = EI2C("cfvm-864-celma1", "user", "USER")
testelma.open()
testelma.write(1, 0x0c, 0)
testelma.write(1, 0x10, 0)
testelma.write(1, 0x14, 0)
testelma.write(1, 0x18, 0)
testelma.write(1, 0x1c, 0)
testelma.write(1, 0x20, 0)
import time
import sys
import time
sys.path.append("../ei2c")
from ei2c import *
if __name__ == "__main__":
testelma = EI2C("cfvm-864-celma1", "user", "USER")
testelma.open()
testelma.write(1, 0x8, 0xde << 2)
testelma.write(1, 0x8, 0xad << 2)
testelma.write(1, 0x8, 0xbe << 2)
testelma.write(1, 0x8, 0xef << 2)
chan = input("chan (1..6): ")
testelma.write(1, 0x8, chan << 2)
import time
import sys
import time
sys.path.append("../ei2c")
from ei2c import *
if __name__ == "__main__":
testelma = EI2C("cfvm-864-celma1", "user", "USER")
testelma.open()
print "CH1: %d" % testelma.read(1, 0x0c)
print "CH2: %d" % testelma.read(1, 0x10)
print "CH3: %d" % testelma.read(1, 0x14)
print "CH4: %d" % testelma.read(1, 0x18)
print "CH5: %d" % testelma.read(1, 0x1c)
print "CH6: %d" % testelma.read(1, 0x20)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment