Storing and Retreiving Programs

Can we store a program in memories of the unit from 7 to 98 ?
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

case Prog_Num

Case 90            Call Program90
Case 91            Call Program91
Case 92            Call Program92
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.

The Motorvator isn't saving my programs any more.
WHen you upgrade the version of MeccCompiler, check that the COM port setting (under Options>Motorvator) is still correct.

If it is not correct, the MeccCompiler will still try to send the program, but the MotorVator will not receive anything.

The main clue is: Do you get the MotorVator menu (in green text in the black comms window) when you first open the comms window. If not, then you don't have a connection.