source: trigger/Main.py@ 2297

Last change on this file since 2297 was 115, checked in by daqct3, 15 years ago
New Functions
  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#!/usr/bin/python
2
3
4#################################################################
5#
6# Handles the communication between the driver _VMEmodule.so,
7# the user interface (PythonShell.py) and TCP/IP (CommSocket.py)
8#
9# Michael Rissi 06/2009
10#
11#################################################################
12
13import _VME
14import threading
15#import CommSocket
16import PythonShell
17import CommSocket
18#mport CommServer
19import GlobalVariables
20import CommunicateWithVME
21import ReadTemperatures
22import time
23#connecting to the crates:
24print "\n\n\n"
25print " ####################################"
26print " # #"
27print " # Trigger Control Program #"
28print " # M. Rissi 2009 #"
29print " # #"
30print " ####################################"
31print "\n\n\n"
32print "connecting to the crates..."
33
34_VME.VME_Open()
35_VME.V560_Open()
36#_VME.V560_Print_Info()
37_VME.V812_Open()
38
39# clear the v560 scales:
40_VME.V560_Clear_Scales(1)
41
42
43
44GlobalVariables.UserInput = ''
45#print "start the shell... "
46inputShell= PythonShell.InputShell()
47#inputShell.daemon=True
48inputShell.start()
49
50# start the server:
51#print "start the server... "
52commServer = CommSocket.CommServer(3492,5)
53commServer.start()
54
55#print "start the parser..."
56parseUserInput= CommunicateWithVME.ParseUserInput()
57parseUserInput.start()
58
59#print "listening to Arduino..."
60readTemperatures = ReadTemperatures.ReadTemperatures()
61readTemperatures.start()
62while(GlobalVariables.UserInput[1:]!="exit" and GlobalVariables.UserInput[1:] != "EXIT"):
63 time.sleep(0.1)
64 #do something
65# dummy=1
66
67_VME.V812_Close()
68_VME.V560_Close()
69_VME.VME_Close()
Note: See TracBrowser for help on using the repository browser.