From 002e4a3df4aab2849b2b47794f8f0962c5639d41 Mon Sep 17 00:00:00 2001 From: Lukas Bromig Date: Tue, 30 Mar 2021 14:12:38 +0200 Subject: [PATCH] Reworked Tutorial 3 Signed-off-by: Lukas Bromig --- examples/Tutorial_3_Using_The_Data_Handler.py | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/examples/Tutorial_3_Using_The_Data_Handler.py b/examples/Tutorial_3_Using_The_Data_Handler.py index 16b8c4e..17c6faf 100644 --- a/examples/Tutorial_3_Using_The_Data_Handler.py +++ b/examples/Tutorial_3_Using_The_Data_Handler.py @@ -1,10 +1,32 @@ -# You can use this code editor like a regular scripting environment. -# If you require specific python packages for your script, you can import them here. -# Note: Packages you want to import must be specified in the dockerfiles requirements.txt! +""" +TUTORIAL 3: Using the Data Handler +--------------------------------------------- +3.1 The data handler can be used without writing a script. Go to the data handler tab and setup a database. Influx + databases are supported. The overview will show you whether a connection has been established between the SiLA 2 + Manager and the specified database. Depending on the security settings of your database, supplying a username or + password may not be necessary. -import time +3.2 You can link a database to a specific SiLA service. Click on the link button and select the desired database. You + can unlink a database by selecting the empty option [] in the drop-down menu. +3.3 There are several levels of customization. Expand the Service tree and activate the SiLA Features you want the data- + acquisition to be active for. Selecting "Data Transfer" on the top level will automatically activate all features. + Start de-selecting. -def run(devices): +3.4 The data handler distinguishes between two types of data: Meta data and process/experimental data. They differ in + the time interval they are queried in. Both types have a set default polling interval. However, you may customize + the time interval for both of them for each SiLA Command and Property on the lowest level of the tree. + +3.5 If a command requires a parameter, you can set the parameter here. + +3.6 The data handler is active for the full duration of the experiment and does not stop when the script is finished. + It will only stop at the specified time or if the experiment is stopped manually. + +Hint 4: If your parameter changes over time, you should exclude the command query from the data handler and add a + respective function and command call to your experimental script. +""" + + +def run(services): """ Required to import and instantiate devices """ return