Skip to content

UserGuide

Joshua Mitchell edited this page Oct 9, 2021 · 2 revisions

All instructions can be sent without waiting for the previous one to complete. Thus, many actions can be sent by the user one after the other and they will run in order. This is because each action is sent as a set of ordered instructions which are placed into a queue. At any given time, 300 instructions can be stored within the queue.

GUI

Calibration

The first thing to do when loading up the application for the first time or when changing the length of the stage is the calibrate it. This lets the microcontroller calculate the number of steps that it takes to move across the whole stage. Given the length of the stage and the total number of steps we can then accurately move to given positions.

The process of this instruction is to move to the end limit switch and count the number of steps before reaching the starting limit switch.

Instructions:

  • M04

Scan Between

Scan Between takes samples while moving between two positions, specified by the start and end position sliders. The stage will first move rapidly to the starting position, set the sample duration, step length, step mode and enable the sample duration timer before beginning the scan. The scan is started by starting the sample duration timer. Samples are collected, averaged and sent over the serial connection. The stage then moves to the next sampling position and repeats the process until reaching the end position.

Once reaching the end position, the sample duration timer is disabled, and a flag is sent back to the GUI to set it back in the idle state.

Instructions:

  • M01
  • M00
  • G00
  • S1
  • T1
  • S3
  • S2
  • G01
  • T2
  • M03
  • M02

Sample at Stationary Position

Sampling at a stationary point is completed in two actions by user. The first is the move the stage in to the correct position with the stationary sample position slider and click move to start button. Once the stage reaches the position, the user can then begin sampling by setting the average interval to the desired value and clicking the start sampling button.

Instructions:

(Move to Start)

  • M01
  • T2
  • G00
  • M02

(Start Sampling)

  • M01
  • M00
  • S4
  • T1
  • T3
  • T2
  • M03
  • M02

Stopping Instructions

Stopping the execution of the microcontroller will stop the currently executing instruction and will wait until receiving the resume instruction. The current state of execution is saved, thus upon resuming the microcontroller will continue where it had left off.

Instructions:

  • M01

Clearing the Queue

Clearing the queue will remove all instructions yet to be executed by the microcontroller. So once removed, the microcontroller will wait to recieve following instructions. Stopping and resuming will not restart execution.

Instructions:

  • M05

Clearing Samples

The data received from the microcontroller are stored within the GUI process memory. So clearing samples will delete this data and empty the data arrays for samples, time and position.

Saving Data

Data can be saved by going to File -> Save Data. This will write all samples to individual rows and separate lines and stationary samples by multiple lines within a csv document.

Settings

The settings file is used for storing values permanently outside each session of the application. Specifically, we store the default values used to load the application's interface, the result of calibration, the default port to connect and if terminal mode is enabled. The file is located in the root folder of the application and is titled "settings.ini".