added python examples in source

This commit is contained in:
Erik Frojdh
2020-08-20 09:21:59 +02:00
parent c4fde7f7bc
commit 9b26f5a6c8
3 changed files with 80 additions and 30 deletions

View File

@@ -0,0 +1,21 @@
import time
from multiprocessing import Process
from slsdet import Detector, runStatus
d = Detector()
#Create a separate process to run acquire in
p = Process(target=d.acquire)
#Start the thread and short sleep to allow the acq to start
p.start()
time.sleep(0.01)
#Do some other work
while d.status != runStatus.IDLE:
print("Working")
time.sleep(0.1)
#Join the process
p.join()