|
Last change
on this file since 76 was 52, checked in by rissim, 17 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 |
|
|---|
| 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 time
|
|---|
| 22 | #connecting to the crates:
|
|---|
| 23 | print "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 |
|
|---|
| 34 | GlobalVariables.UserInput = ''
|
|---|
| 35 | print "start the shell... "
|
|---|
| 36 | inputShell= PythonShell.InputShell()
|
|---|
| 37 | #inputShell.daemon=True
|
|---|
| 38 | inputShell.start()
|
|---|
| 39 |
|
|---|
| 40 | # start the server:
|
|---|
| 41 | print "start the server... "
|
|---|
| 42 | commServer = CommSocket.CommServer(3492,5)
|
|---|
| 43 | commServer.start()
|
|---|
| 44 |
|
|---|
| 45 | print "start the parser..."
|
|---|
| 46 | parseUserInput= CommunicateWithVME.ParseUserInput()
|
|---|
| 47 | parseUserInput.start()
|
|---|
| 48 |
|
|---|
| 49 | while(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.