Station Commands ================ These commands are executed directly by the instrument through the DataLink port on the Communication Module. They are sent through the module by using :ref:`sendcommand` or :ref:`sendmlcommand`, found in :ref:`Communication Module API`. - `echo`_ - `getid`_ - `setdate`_ - `settime`_ - `setmode`_ - `listfiles`_ - `getfile`_ - `putfile`_ - `writefile`_ - `rmfile`_ - `closefile`_ - `getstate`_ - `pausescript`_ - `unpausescript`_ - `stopscript`_ - `startscript`_ - `status`_ - `checkscript`_ ``echo`` -------- Syntax: ``echo [...]`` Example: ``echo Hello World!`` Returned: ``echo Hello World!`` Prints the whole command given back to the user. May be used for testing purposes. ``getid`` --------- Syntax: ``getid`` Gets serial number. ``setdate`` ----------- Syntax: ``setdate [yy-mm-dd]`` Sets the date on the instrument. If user-inputted date is omitted, date is set to current date. ``settime`` ----------- Syntax: ``settime [hhmmss]`` Sets the time on the instrument. If user-inputted time is omitted, time is set to current time. ``setmode`` ----------- Syntax: ``setmode [single|dual|script]`` Sets sampling mode to SINGLE, DUAL, or SCRIPT. ``listfiles`` ------------- List files stored on *backup*, *cartridge*, or *all* memory cards. This is a multi-line command. Be sure the requesting device (ie. COM100) knows the specified ``. Syntax: ``listfiles [B|C|A] `` Example: ``listfiles B EOC`` ``getfile`` ----------- Syntax: ``getfile [B|C] [path]`` Get file from BACKUP or CARTRIDGE via the given path. ``putfile`` ----------- .. NOTE:: This command is almost never used manually. Create a new file in *backup* or *cartridge*. First character of *path* specifies target card. Syntax: ``putfile [B|C]`` Example: ``putfile Bfile.aps`` ``writefile`` ------------- Syntax: ``writefile [data]`` Writes data to open file. ``rmfile`` ---------- Removes file. First character of *path* specifies target card. Syntax: ``rmfile [B|C]`` Example: ``putfile Bfile.aps`` ``closefile`` ------------- Syntax: ``closefile`` Closes open file. ``getstate`` ------------ Syntax: ``getstate`` Gets the current state of script. Expected outputs: ``Script running, since ...`` , ``Script paused``, ``Sampling paused``, ``Sampling stopped``, or ``Unknown state``. ``pausescript`` --------------- Syntax: ``pausescript`` Pauses a running script. Expected output ``Paused`` or ``ERROR script not running`` ``unpausescript`` ----------------- Syntax: ``pausescript`` Resumes a paused script. Expected output ``Unpaused`` or ``ERROR script not paused`` ``stopscript`` -------------- Syntax: ``stopscript`` Stops a running script. Expected output ``Stopped`` or ``ERROR sampling not running`` ``startscript`` --------------- Starts execution of an AirPhoton script. ee `setscript` for which script is active. Optional `strict` keyword enable strict `checkscript` mode prior to script execution. Syntax: ``startscript (strict)`` Example: ``startscript strict`` ``status`` ---------- Prints a list of the instrument properties. Syntax: ``status`` ``checkscript`` --------------- Checks if a script for valid syntax. Syntax: ``checkscript [B|C]`` Example: `` checkscript B/script.aps``