Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 360 of 909
CCHN(type,channel)
Close Communications Channel (RS-232 or RS-485)
APPLICATION: Communications control
DESCRIPTION: Close a communications channel
EXECUTION: Immediate
CONDITIONAL TO: N/A
LIMITATIONS: N/A
READ/REPORT: N/A
WRITE: N/A
LANGUAGE ACCESS: N/A
UNITS: N/A
RANGE OF VALUES: Type= RS2, RS4
Channel = 0 or 1
TYPICAL VALUES: N/A
DEFAULT VALUE: N/A
FIRMWARE VERSION: 5.x and later
COMBITRONIC: N/A
DETAILED DESCRIPTION:
CCHN(type,channel) closes the specified communications channel, where "type" is the
communications mode, and "channel" is the COM port to close. This command flushes the
serial port buffer — any characters in the buffer will be lost.
For a D-style motor, the channel 0 COM port can only be RS-232 or RS-485, while channel 1
can only be RS-485.
For an M-style motor, only the channel 0 COM port can be opened. It is only RS-485.
The following are valid CCHN commands:
CCHN(RS2,0) 'Close the channel 0 RS-232 port
CCHN(RS4,1) 'Close the channel 1 RS-485 port
After power up or a Z reset command, channel 0 is opened as RS-232 by default.
EXAMPLE:
EIGN(W,0) 'Make all onboard I/O inputs
ZS 'Clear errors
CCHN(RS2,0) 'Close main RS-232 communications port 0
END
RELATED COMMANDS:
OCHN(...) Open Channel (see page 601)
Z Total CPU Reset (see page 806)
Part 2: Commands: CCHN(type,channel)