In future versions of Motorvator Software we might use 7, 8 etc for extra Modes.
From MeccCompiler, you can only load 1 user program, which by default is always program 99. However, in your own program, you can use the instruction
?variable? = GetProgramNumber
to look at the program number selected by the user when starting your program.
This allows you to select sub-programs number 90-99.
For example
Prog_Num = GetProgramNumber
Select case Prog_Num
Case 90 Call Program90 Case 91 Call Program91 Case 92 Call Program92 etc end Select
Thus you can load a big program with several different operations, and select using program numbers 90 through 99. For an example, look at the robot Arm code - it has a TestMode which allows you to test only one axis of movement, and this is triggered by selecting program 95 through 98.
There is 22Kbytes of program space, and the largest program I have written (for playing Noughts and Crosses - TicTacToe) is less than 2K.
|