Last change
on this file since 103 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 |
|
---|
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 ListenToArduino
|
---|
22 | import time
|
---|
23 | #connecting to the crates:
|
---|
24 | print "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 |
|
---|
35 | GlobalVariables.UserInput = ''
|
---|
36 | print "start the shell... "
|
---|
37 | inputShell= PythonShell.InputShell()
|
---|
38 | #inputShell.daemon=True
|
---|
39 | inputShell.start()
|
---|
40 |
|
---|
41 | # start the server:
|
---|
42 | print "start the server... "
|
---|
43 | commServer = CommSocket.CommServer(3492,5)
|
---|
44 | commServer.start()
|
---|
45 |
|
---|
46 | print "start the parser..."
|
---|
47 | parseUserInput= CommunicateWithVME.ParseUserInput()
|
---|
48 | parseUserInput.start()
|
---|
49 |
|
---|
50 | print "listening to Arduino..."
|
---|
51 | listenToArduino = ListenToArduino.ListenToArduino()
|
---|
52 | listenToArduino.start()
|
---|
53 | while(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.