source: trigger/Main.py@ 113

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