Ejemplo n.º 1
0
def just_add_water(queue: Queue, completed: int):
    """
    put water sample and reactant onto paper
    """
    queue.put(QueueMessage('Starting', task_name='Sampling'))
    queue.put(QueueMessage('Adding Water', task_name='Sampling'))
    move_water_valve(1)
    # push out some water then sucking back in
    move_water_linear([2000, 0])
    # move valve to inlet so no liquid can go on paper
    queue.put(QueueMessage('Adding Reactant', task_name='Sampling'))
    move_water_valve(2)
    move_reactant_linear(completed)
    queue.put(QueueMessage('Finished', task_name='Sampling'))
Ejemplo n.º 2
0
def pre_test_clean(queue: Queue):
    """
    Flush the pipe with air before test begins
    Assume water actuator starts in extended position
    """
    # suck in air
    queue.put(QueueMessage('Starting', task_name='Pre-Test Cleaning'))
    queue.put(QueueMessage('Sucking in Air', task_name='Pre-Test Cleaning'))
    move_water_valve(1)
    move_water_linear([0])
    queue.put(QueueMessage('Pushing out air, then pulling in water',
                           task_name='Pre-Test Cleaning'))
    move_water_valve(2)
    # push out air, pull in water
    move_water_linear([5000, 1000])
    queue.put(QueueMessage('Finished', task_name='Pre-Test Cleaning'))
Ejemplo n.º 3
0
def post_test_clean(queue: Queue):
    """
    Empty tubes so that there is only air
    """
    # make doubly sure
    queue.put(QueueMessage('Starting', task_name='Post-test Clean'))
    queue.put(QueueMessage('Push out water', task_name='Post-test Clean'))
    move_water_valve(2)
    # push water out
    move_water_linear([5000])
    # take in more air
    queue.put(QueueMessage('Pulling in air', task_name='Post-test Clean'))
    move_water_valve(1)
    move_water_linear(0)
    queue.put(QueueMessage('Push out air', task_name='Post-test Clean'))
    move_water_valve(2)
    move_water_linear([5000])
    queue.put(QueueMessage('Finished', task_name='Post-test Clean'))