Last change
on this file since 5851 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 |
|
---|
13 | import _VME
|
---|
14 | import threading
|
---|
15 | #import CommSocket
|
---|
16 | import PythonShell
|
---|
17 | import CommSocket
|
---|
18 | #mport CommServer
|
---|
19 | import GlobalVariables
|
---|
20 | import CommunicateWithVME
|
---|
21 | import ReadTemperatures
|
---|
22 | import time
|
---|
23 | #connecting to the crates:
|
---|
24 | print "\n\n\n"
|
---|
25 | print " ####################################"
|
---|
26 | print " # #"
|
---|
27 | print " # Trigger Control Program #"
|
---|
28 | print " # M. Rissi 2009 #"
|
---|
29 | print " # #"
|
---|
30 | print " ####################################"
|
---|
31 | print "\n\n\n"
|
---|
32 | print "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 |
|
---|
44 | GlobalVariables.UserInput = ''
|
---|
45 | #print "start the shell... "
|
---|
46 | inputShell= PythonShell.InputShell()
|
---|
47 | #inputShell.daemon=True
|
---|
48 | inputShell.start()
|
---|
49 |
|
---|
50 | # start the server:
|
---|
51 | #print "start the server... "
|
---|
52 | commServer = CommSocket.CommServer(3492,5)
|
---|
53 | commServer.start()
|
---|
54 |
|
---|
55 | #print "start the parser..."
|
---|
56 | parseUserInput= CommunicateWithVME.ParseUserInput()
|
---|
57 | parseUserInput.start()
|
---|
58 |
|
---|
59 | #print "listening to Arduino..."
|
---|
60 | readTemperatures = ReadTemperatures.ReadTemperatures()
|
---|
61 | readTemperatures.start()
|
---|
62 | while(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.