EasyManuals Logo

Moog SmartMotor User Manual

Moog SmartMotor
909 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #830 background imageLoading...
Page #830 background image
Part 3: Examples
Moog Animatics SmartMotor Developer's Guide,Rev. L
Page 830 of 909
Long-Term Storage of Variables
Each SmartMotor is equipped with a kind of solid-state disk drive, called EEPROM, reserved
just for long term data storage and retrieval. Data stored in the EEPROM will remain even
after power cycling, just like the SmartMotor's program itself. However, the EEPROM has
limitations. It cannot be written to more than about one million times without being damaged.
That may seem like a lot, but if a write command (VST) is used in a fast loop, this number can
be exceeded in a short time. Therefore, it is the responsibility of the programmer to see that
the memory limitations are considered.
The following example is a subroutine to be called whenever a motion limit is reached. It
assumes that the memory locations were pre-seeded with zeros.
NOTE: This example is a subroutine. It would be called with the command
GOSUB10.
C10 'Subroutine label
EPTR=100 'Set EEPROM pointer in memory
VLD (aa,2) 'Load 2 long variables from EEPROM
IF Br 'If right limit, then...
aa=aa+1 'Increment variable aa
Zr 'Reset right limit state flag
ENDIF
IF Bl 'If left limit, then...
bb=bb+1 'Increment variable bb
Zl 'Reset left limit state flag
ENDIF
EPTR=100 'Reset EEPROM pointer in memory
VST(aa,2) 'Store variables aa and bb
RETURN 'Return to subroutine call
Find Errors and Print Them
This code example looks at different error status bits and prints the appropriate error
information to the RS-232 channel.
NOTE: This example is a subroutine. It would be called with the command
GOSUB10.
C10 'Subroutine label
IF Be 'Check for position error
PRINT("Position Error",#13)
ENDIF
IF Bh 'Check for over temp error
PRINT("Over Temp Error",#13)
ENDIF
IF Ba 'Check for over current error
PRINT("Over Current Error",#13)
ENDIF
RETURN 'Return to subroutine call
Part 3: Examples: Long-Term Storage of Variables

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Moog SmartMotor and is the answer not in the manual?

Moog SmartMotor Specifications

General IconGeneral
BrandMoog
ModelSmartMotor
CategoryServo Drives
LanguageEnglish

Related product manuals