4.5 Standalone Control Screen

The Standalone Control screen is where you write, check, download, upload and run A-Script standalone programs. The A-Script compiler is built into the program, so no other software is needed.

Open it with Control > Standalone Control. You can open it without a controller to write and check a program; you need a connection to download, upload, clear or run.

Applies to: all controllers. The same A-Script language is used on every model.

On this page:

Standalone Control window

Program selection and status

Display

Description

Related commands

Program Select

Selects which program, Program 0 to Program 3, the status display and run buttons apply to.


Status

Status of the selected program: Idle, Running, Paused or ERROR.

SASTAT

Index

The compiled line the selected program is running.

SPC

Auto Start

When checked, the selected program starts at power-up. Changing the checkbox sends the setting and stores it in flash memory right away; you do not need to download the program again.

SLOAD, STORE

Max Lines

Number of compiled lines the controller can hold. Without a connection the program shows 1700.

SAMAX

Program Lines

Number of compiled lines of the program in the editor, after Check Syntax, Download or Upload.


Return to Top

Run control

Button

Description

Related commands

Start Program

Start Program: starts the selected program. It is refused if the controller's program area is blank; download a program first.

SACTRL =1

Stop Program

Stop Program: stops the selected program.

SACTRL =0

Pause Program

Pause Program: pauses the selected program.

SACTRL =2

Continue Program

Continue Program: continues a paused program.

SACTRL =3

The button names above are the tooltips shown when you point at each button.

If the controller rejects a run command, a message shows the command and the reply.

Return to Top

Program editor and files

The Program Editor shows the A-Script source with line numbers on the left. Programs 0 to 3 are written in the same file. Program files use the .prg extension; the Open and Save dialogs start in your Documents folder.

Button

Description

Related commands

CLR

Clears the program stored in the controller (see Clear the controller's program). It does not change the editor.

SR, SA

Check Syntax

Check Syntax: compiles the program in the editor without a controller and reports the number of compiled lines. On an error, the line is highlighted and the compiler message is shown.


Download Program

Download Program: compiles the program and writes it to the controller (see Write and download a program).

SA, SR

Upload Program

Upload Program: reads the program stored in the controller and decompiles it into the editor (see Upload a program).

SA, SAMAX

Save Program

Save Program: saves the editor text to a .prg file on the PC.


Open Existing Program

Open Existing Program: loads a .prg file into the editor. Files with Unix (LF) line ends are converted.


New Program

New Program: replaces the editor text with an empty program (;**** Your Code Here ****).


Variables button (bottom right, tooltip Reveal Standalone Variables)

Shows or hides the variable view (see Variables).

V

The compiler accepts plain ASCII text only. Characters such as accented letters or typographic quotes are allowed in comment lines (starting with ; or ') but stop the compile anywhere else; the line is highlighted.

Return to Top

Write and download a program

  1. Write the program in the editor, or clickOpen to open a .prg file.
  2. ClickCheck Syntax Check Syntax. Fix any error at the highlighted line. The message shows the number of compiled lines and the controller's maximum, and warns if the program is too large.
  3. ClickSave to keep a copy of the source on the PC. The controller stores only the compiled lines.
  4. Connect to the controller and clickDownload Download Program.
  5. Confirm the message Download <n> lines to <controller>? This stops all programs and replaces the program stored in the controller. Click OK.
  6. The program stops all four programs, writes every compiled line and shows a progress dialog with a line counter. You can click Cancel; the controller then holds an incomplete program, so download it again or clear it.

A-Script Download progress dialog

  1. With firmware V3xx, the program then reads every line back and compares it with what it sent (verify). A difference stops the download with the line number. With older firmware there is no read-back.
  2. A message confirms the download: Download complete: <n> lines written and verified.
  3. Select the program in Program Select and clickStart to run it. Check Auto Start if it should start at power-up.

Firmware V305 and V305.1 read back the jump number of WHILE, IF, ELSEIF and LOOPWHILE lines incorrectly. The program still verifies these lines by their comparison and adds a note to the message; the lines are stored and run correctly. See 1.6.1 Known Issues.

Return to Top

Upload a program from the controller

  1. Connect to the controller.
  2. ClickUpload Upload Program. If the editor already holds a program, confirm that it may be replaced.
  3. The program reads the stored lines (until the first erased line) and decompiles them into A-Script source in the editor. Program Lines shows the number of lines read.

WHILE, IF, ELSEIF and LOOPWHILE conditions decompile correctly, also from firmware V305 and V305.1. (In V3.0.1 these conditions showed as "?".)

If the program area is blank or was cleared, a message says there is no program in the controller. Comments and your original formatting are not stored in the controller, so the uploaded source looks different from the file you wrote.

Return to Top

Clear the controller's program

  1. Click CLR.
  2. Confirm the message Erase the program stored in <controller>? This stops all programs. The program in the editor is not changed.
  3. The program stops all four programs and erases the program area. It leaves a single END line, so a program started by mistake ends at once.

Caution: CLR stops every running program and erases the whole program area in the controller. Upload or save the program first if you need it.

Return to Top

Messages

Message

What to do

There is no program to compile.

The editor holds only comments or blank lines. Write or open a program.

Compile failed! with a line number

Fix the highlighted line and check the syntax again.

Non-ASCII character(s) found on line <n>

Replace the character, or move it into a comment.

The program has <n> lines; <controller> holds <m>.

Shorten the program until Program Lines is no more than Max Lines.

Verify line <n>: sent ..., read back ...

The line read back from the controller is different. Download again; if it repeats, contact Nippon Pulse support.

Not connected to a Commander.

Connect first (see 3.1 USB communication).

The program area is blank; download a program first

Shown by Start Program when the controller has no program.

Return to Top

Related commands and see also

Related commands: SA, SACTRL, SASTAT, SPC, SAMAX, SLOAD, SR, STORE, V

See also:

Return to Top