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 #459 background imageLoading...
Page #459 background image
Part 2: Commands
Moog Animatics SmartMotor Developer's Guide,Rev. L
Page 459 of 909
GETCHR
Next Character from Communications Port 0
APPLICATION: Communications control
DESCRIPTION: Get the next character in channel 0 serial input buffer
EXECUTION: Immediate
CONDITIONAL TO: Requires that a character is in the buffer; communications chan-
nel 0 must be open in data mode
LIMITATIONS: Maximum buffer length is 31 characters
READ/REPORT: RGETCHR
WRITE: Read only
LANGUAGE ACCESS: Formulas and conditional testing
UNITS: N/A
RANGE OF VALUES: -1 to 255
TYPICAL VALUES: -1 to 255
DEFAULT VALUE: N/A
FIRMWARE VERSION: 5.x and later
COMBITRONIC: N/A
DETAILED DESCRIPTION:
GETCHR (or GETCHR0) reads and removes the next available character in the channel 0 serial
receive buffer. It is recommended to check that LEN>0 before issuing the GETCHR command.
Otherwise, it is possible to read an empty receive buffer.
Alternatively, the value returned from GETCHR can be checked to see if it is -1. However, do
not use an ab[] register to store the value in this case, because the value -1 will be aliased
with the character 255. Instead use an aw[] or al[] register.
Normally, the SmartMotor™ interprets incoming characters on communications channel 0 as
commands. However, it is sometimes useful to prevent that from happening and write a
custom command interpreter. This is accomplished by reopening the input channel in data
mode with the OCHN command. For details see OCHN(...) on page 601.
CAUTION: The OCHN command will cause the SmartMotor to ignore incoming
commands and can lock you out. Therefore, during development, prevent this
by using the RUN? command at the start of each program.
NOTE: If you get locked out and are unable to communicate with the SmartMotor,
you may be able to recover communications using the SMI software's
Communication Lockup Wizard. For more details, see Communication Lockup
Wizard on page 30.
Part 2: Commands: GETCHR

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