Smc communication protocol guidelines – Yaskawa SMC–4000 User Manual

Page 46

Advertising
background image

36

SMC–4000 User Manual

Configuration

Although Yaskawa’s YTerm software automatically configures the port, you may need to manually
configure the PC’s serial port if using third party software. Configure the computer for 8-bit data, one
start-bit, one stop-bit, full duplex and no parity.

Handshaking Modes

The RS232 port is configured for hardware handshaking. In this mode, the RTS and CTS lines are used.
The CTS line will go high whenever the SMC–4000 is not ready to receive additional characters. The RTS
line will inhibit the SMC–4000 from sending additional characters.

If a device that is used in conjunction with the SMC–4000 does not support hardware handshaking, solder
a jumper across the CTS and RTS lines in the cable. Remember that doing so may degrade communication
reliability.

SMC Communication Protocol Guidelines

The following items outline details of the simple ASCII communication protocol which the SMC–4000
implements. Note: throughout this section, strings are enclosed in single quotes, and characters are
enclosed in greater than / less than signs < >.

1)

To query a variable value use the MG command: Example `MG VAR<cr>' where MG is the message
command and VAR is a variable defined in the controller.

2)

To query a command value use the `MG _TPX<cr>' or `TPX <cr>' where MG is the controller's
message command and TP is the command to return the current position. For other details, see the
command section of an SMC manual. It describes the possible methods of obtaining data when
multiple axes are involved.

3)

To set a variable, use `VAR=105<cr>'

4)

To se a command parameter, use `PRX=12345<cr>' where PR is the Position Relative command, "X"
is the X axis, and the value assigned after the equal sign is the relative move distance specified for the
X axis. For other details, see the command section of an SMC manual. It describes the possible
methods of obtaining data when multiple axes are involved. Multiple axes can be set at once.
Example `PR 12345,6789<cr>' where PR is the Position Relative command, the first value is
assigned to the X axis and the second value is assigned to the Y axis. If an axis does not need to be set,
it can be omitted as follows: `PR ,,54321<cr>' which will set only the third (Z) axis.

5)

Hardware Handshaking is always recommended when communicating with the SMC family of
controllers. It is the primary method used by the controller to synchronize communication with
external devices. The SMC does not support software handshaking, and simply using three-wire
communication will result in possible character loss.

6)

When sending a command string of any kind to the controller, verify that the echo is active (EO1) and
matches the computer’s outgoing string before sending the carriage return. Compare the echo, then
either send the carriage return <cr> (if good) or send the backslash character <\> to flush the
controller’s buffer in the controller (if bad) then resend. Depending on the environment, retry the
same string up to 3-5 times before finally determining that there is a serious communication failure.

7)

When a message retry is required, send the backslash <\> character to flush the buffer in the SMC so
the next command string can be correctly understood. If the buffer contains a partial message, an

Advertising