Programming Hints
Why do I Get "Unknown Instruction" |
---|
If you get "Unknown Instruction" Displayed in the Motorvator Communications Window (the black window with green writing), then it means that the Motorvator doesn't understand how to interpret the next instruction in your program.
There are two likely causes: 1. If you use MeccCompiler 3.0.9 (find the version under Help>About)
then it can make instructions that older Motorvators (running AWOS 2.23 - check this by typing H - for Help at the Command Prompt) can't understand. The most common one (and one that will be compiled in the first few lines of your program) is that V3.0.9 uses a SET BYTE instruction to assign an initial value to a variable. V2 uses MOVE BYTE. Use MeccCompiler 2.0.131 with AWOS 2.23 and 3.0.9 with AWOS 2.35. If in doubt, use Compiler 2.0.131. It will work with both AWOS types, but obviously you won't be able to use the new instructions. 2. Your program is trying to execute the next instruction from an incorrect address. This is most probably because your program has messed up the Stack by executing an odd PUSH or POP instruction. |
How do I make the Director "Centre Off band" Wider? |
Q. When using the Director controller, there is a "Centre Off band" when the stick is centred, where the motors are stopped. How can I make this "centre off band" wider so it is easier to operate my model?
A. The pre-programmed Modes 1 to 6 have a default band of 10% of the full movement as "centre off". You can load your own program and increase this. Here is part of the code
The two code lines:
indicate that the "centre off band" should be 10% for the X and Y directions on both joysticks. To change to band to 30%, change the lines to
then compile and download. You can make the "Centre off Band" as big as you want. E.g if you used say a value of 80, then the motors would only start at the very end of the joystick travel (but they would be either full On or Off - you would lose the proportional control). Don't forget to fit the Program Memory Backup Battery!http://www.meccanisms.com/modules/tinycontent/admin/modes 1 to 6.txt |