beautypg.com

5 programming precautions – Yaskawa MP920 Communications Module User Manual

Page 183

background image

7.7 Connection with Devices Manufactured by Other Companies

7-37

7

MEMOBUS Response Data

• Copy the identification number set in the MEMOBUS command data.
• Copy the leading source channel number set in the MEMOBUS command data is copied

as the leading destination channel.

• A unique Machine Controller value is added for the source channel. It can therefore be

ignored at the personal computer.

• Reverse the upper 4 bits and the lower 4 bits of the CPU numbers in the MEMOBUS

command data and set is as the CPU numbers. If it is not required at the personal com-
puter, it can be ignored.

„

Using the Personal Computer as a Slave

MEMOBUS Response Data

• Set the number that is set in the MEMOBUS command data for the identification num-

ber.

• Set the source channel number in the MEMOBUS command data for the destination

channel.

• Set the destination channel number in the MEMOBUS command data for the source

channel.

• Reverse the upper 4 bits and the lower 4 bits of the CPU numbers in the MEMOBUS

command data and set is as the CPU numbers.

„

Sample Program

Appendix C C Language Sample Programs shows a sample program for the personal com-
puter.

7.7.5

Programming Precautions

When a Master program is created with TCP, its own IP address or port number may not
always be allocated by the bind ( ) function. This depends on the application. In this case, the
system will automatically allocate an unused port number when the connect ( ) function is
called.

When the DST. IP Address and the DST. Port are set in the Transmission Parameters Tab
on the CP-218 Connection Parameter Window, the connection will be rejected if the IP
address and the port number do not match. Use the method shown below to avoid this situa-
tion.