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
msg
to the log
- acquire(resource)¶
reserve the
resource
for use. blocks other scripts from usingresource
untilrelease()
is called.
- release(resource)¶
release
resource
so other scripts can use it.
- sleep(seconds)¶
sleep for
seconds
. ifseconds>5
a 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_script
is relative to the current script. e.ggosub(commonscripts/fuse.py)
.commonscripts
must be a directory in the same directory this script is saved in.
- begin_interval(timeout)¶
start an interval. if
timeout>5
a timer will appear.
- complete_interval()¶
wait unit
timeout
has elapsed