This commit is contained in:
boccioli_m
2015-06-26 09:24:55 +02:00
parent 87f5cb833c
commit 382bb652d5
4 changed files with 380 additions and 360 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +1,23 @@
#Running scripts in parallel
run("Motor Test 3 100ms")
ret = parallelize((run,("Motor Test 3 100ms")), (run,("Motor Test 3 200ms")))
print ret
#Simple parallization
def task1():
return out.read()
return 1
def task2():
return inp.read()
return 2
def task3():
time.sleep(0.1)
return sin.read()
return 3
ret = parallelize(task1, task2, task3)
print ret
@@ -23,10 +32,10 @@ print ret
#Functions with parameters
def devRead(dev, msg):
print msg + " -> " + dev.getName()
return dev.read()
print msg
return "OK"
ret = parallelize((devRead,(out,"1")), (devRead,(inp,"2")), (devRead,(sin,"3")))
ret = parallelize((devRead,(1,"1")), (devRead,(2,"2")), (devRead,(3,"3")))
print ret
@@ -35,8 +44,7 @@ def taskExcept(msg):
raise Exception ("Error in parallel task " + msg)
ret = parallelize((taskExcept,("1")), (taskExcept,(inp,"2")) )
ret = parallelize((taskExcept,("1")), (taskExcept,("2")) )
print ret

View File

@@ -66,7 +66,7 @@ for setpoint1 in frange(0.0, 30.0, 5.0, True):
ret = 'Test completed'
status = True
print 'Raming test done'
print 'Ramping test done'
#reset output to 0V
SetVA.put(0.0, timeout=None)
@@ -78,3 +78,4 @@ ActualIA.close()
scan.end()
'Ramping A test done'

View File

@@ -78,3 +78,4 @@ ActualIA.close()
scan.end()
'Ramping B test done'