Ethernet communication between controllers, Handling communication errors, Modbus support – Yaskawa SMC–4000 User Manual
Page 49
![background image](https://www.manualsdir.com/files/819559/content/doc049.png)
39
SMC–4000 User Manual
Ethernet Communication Between Controllers
For this purpose there is the SA command. In its simplest form the SA command is:
SAh=”command string”
Here “command string” will be sent to handle h. For example, the SA command is the means for sending
an XQ command to a slave. A more flexible form of the command is:
SAh=field1,field2,field3,field4...field8 Where each field can be a string in quotes or a variable.
For example, to send the command KI,,5,10; assume var1=5 and var2=10 and send the command:
SAF=”KI”,var1,var2
When the master sends an SA command to a sender it is possible for the master to determine the status of
the command. The response _IHh4 will return a number of 1 to 4.
If a command generates multiple responses (such as the TE command), the values will be stored in
_SAh0 through _SAh7. If a field is unused its _SA value will be -2^31.
Handling Communication Errors
If a controller has an application program running and the TCP communication is lost, the #TCPERR
routine will automatically execute. See the Special Label Example program in the Example Applications
for cases where a command is sent to the lost device.
Modbus Support
The Modbus protocol supports communication between masters and slaves. The masters may be multiple
PC’s that send commands to the controller. The slaves are typically peripheral I/O devices that receive
commands from the controller.
*Note There are numerous ways to reset the controller; hardware reset (push reset button or
power-down controller) and software resets (through Ethernet or RS232 by entering RS).
The only reset that will not cause the controller to disconnect is a software reset via the
Ethernet or RS232.
1
Waiting for the acknowledgement from the slave.
2
A colon (command accepted) has been received.
3
A question mark (command rejected) has been received.
4
The command timed out.
Host Computer
Local Operation
Ethernet or RS 232