What is a SPEL+ program?
A SPEL+ program is a collection of functions, variables, and macros. You can put one or more statement in each line of a program. Every program file has a ".prg" extension and is stored in the project folder.
Each project must include at least one program and define the function called "main". "Function main" is the default definition. If "Function main" is not found, an error occurs.
In addition, you can define other 63 main functions in the same project. Each program has own start function: main1, main2…main63. Each of the main functions can be started from the [Operator window], the remote console, or RC+ API.
A function definition begins with the Function statement and ends with the Fend statement.
The following program file contains two function definitions. Function Main calls function "Func1".
MAIN.PRG
Function Main
Call Func1
...
Fend
Function Func1
Jump pickpnt
...
Fend