diff --git a/config/config.properties b/config/config.properties index 2728ebb..79b82e1 100755 --- a/config/config.properties +++ b/config/config.properties @@ -1,4 +1,4 @@ -#Mon Nov 28 08:33:33 CET 2016 +#Tue Dec 20 14:54:53 CET 2016 autoSaveScanData=true createSessionFiles=false dataLayout=default @@ -12,7 +12,7 @@ deviceUpdateStrategyFile={config}/update.properties hostName= instanceName=OP logDaysToLive=-1 -logLevel=Info +logLevel=Fine logLevelConsole=Off logPath={logs}/{date}_{time} scanStreamerPort=-1 diff --git a/script/test/bs4.py b/script/test/bs4.py new file mode 100644 index 0000000..3174c26 --- /dev/null +++ b/script/test/bs4.py @@ -0,0 +1,43 @@ +################################################################################################### +# Scans with beam synchronous streams +################################################################################################### + +#Creating a stream, assuming a provided named "dispatcher". +st1 = Stream("st1", dispatcher) + +#Adding channels to that stream +s1=st1.addScalar("SINEG01-DICT210:GUN_CHARGE", "SINEG01-DICT210:GUN_CHARGE", 10, 0) +s2=st1.addScalar("SINEG01-DICT215:B1_CHARGE", "SINEG01-DICT215:B1_CHARGE", 10, 0) +s3=st1.addScalar("S10DI01-DICT025:B1_CHARGE", "S10DI01-DICT025:B1_CHARGE", 10, 0) +#s4=st1.addScalar("S10DI01-DICT025:B1_CHARGES", "S10DI01-DICT025:B1_CHARGES", 10, 0) + + +st1.initialize() + + +#Filter +st1.setFilter("SINEG01-DICT210:GUN_CHARGE > -10.0") +try: + while(True): + #The stream can be used on any conventional scan. The next stream value is sampled. + #Readable values belong to same pulse id. + tscan (st1.getReadables(), 10 , 0.1) + + #The bscan command performs samples every stream element + #Readable values belong to same pulse id. + bscan (st1, 10) #Sampling 10 elements + + #An individual stream channel can be used in a conventional scan, but in this case the stream + #must be explicitly started, and there is no guarantee the values belong to the same PulseID + #(likely they are since as only cached values are taken). + st1.start(True) + tscan ([s1,s2], 10 , 0.1) + + #If waveform individual stream channel is used, and no size is provided in constructor/config, + #then it must be read previously to the scan to update the size value. + st1.start(True) + tscan ([s1,s2,s3], 10 , 0.1) + + +finally: + st1.close()