General¶
#==========================================================
def main():
info('this is an info message')
acquire('pipette')
info('aquired resourece - pipette')
sleep(15)
release('pipette')
begin_interval(120)
#do some stuff ...
complete_interval() #wait until 120 seconds have passed
#===============================================================
functions¶
-
info(msg)¶ add info
msgto the log
-
acquire(resource)¶ reserve the
resourcefor use. blocks other scripts from usingresourceuntilrelease()is called.
-
release(resource)¶ release
resourceso other scripts can use it.
-
sleep(seconds)¶ sleep for
seconds. ifseconds>5a timer will appear. decimal seconds are allowed e.gsleep(0.5)
-
gosub(path_to_script)¶ execute a pyscript located at
path_to_script.path_to_scriptis relative to the current script. e.ggosub(commonscripts/fuse.py).commonscriptsmust be a directory in the same directory this script is saved in.
-
begin_interval(timeout)¶ start an interval. if
timeout>5a timer will appear.
-
complete_interval()¶ wait unit
timeouthas elapsed