Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 103 of 909
PRINT1 prints to the AniLink port with RS-485 protocol.
SILENT, SILENT1
Suppress PRINT() outputs
TALK, TALK1
De-assert Silent Mode
The SILENT mode causes all PRINT() output to be suppressed. This is useful when talking to a
chain of motors from a host, when the chain would otherwise be talking within itself because
of programs executing that contain PRINT() commands. The TALK and TALK1 commands
restore print messaging.
a=CHN(channel)
Communication Error Flags
Where channel can be 0 or 1 for COM Channel 0 or 1. It holds binary coded information about
historical errors on the two communications channels.
The command gives the 5-bit status of either serial port channel 0 or 1. The information is as
follows:
Bit Value Meaning
0 1 Buffer overflow
1 2 Framing error
2 4 N/A
3 8 Parity error
4 16 Timeout occurred
The following example subroutine prints errors to an LCD display:
C9
IF CHN(0) 'If CHN0 != 0
IF CHN(0)&1
PRINT("BUFFER OVERFLOW")
ENDIF
IF CHN(0)&2
PRINT("FRAMING ERROR")
ENDIF
IF CHN(0)&8
PRINT("PARITY ERROR")
ENDIF
IF CHN(0)&16
PRINT("TIMEOUT OCCURRED")
ENDIF
Z(2,0) 'Reset CHN0 errors
ENDIF
RETURN
Part 1: Programming: SILENT, SILENT1