source: trigger/Main.py@ 63

Last change on this file since 63 was 52, checked in by rissim, 15 years ago
trigger software (VME) v1
  • Property svn:executable set to *
File size: 1.2 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 time
22#connecting to the crates:
23print "connecting to the crates..."
24_VME.VME_Open()
25_VME.V560_Open()
26#_VME.V560_Print_Info()
27_VME.V812_Open()
28
29# clear the v560 scales:
30_VME.V560_Clear_Scales(1)
31
32
33
34GlobalVariables.UserInput = ''
35print "start the shell... "
36inputShell= PythonShell.InputShell()
37#inputShell.daemon=True
38inputShell.start()
39
40# start the server:
41print "start the server... "
42commServer = CommSocket.CommServer(3492,5)
43commServer.start()
44
45print "start the parser..."
46parseUserInput= CommunicateWithVME.ParseUserInput()
47parseUserInput.start()
48
49while(GlobalVariables.UserInput!="exit" and GlobalVariables.UserInput != "EXIT"):
50 time.sleep(0.1)
51 #do something
52# dummy=1
53
54_VME.V812_Close()
55_VME.V560_Close()
56_VME.VME_Close()
Note: See TracBrowser for help on using the repository browser.