Help Contents

Yaskawa MP Ethernet Device Driver Help

CONTENTS

Overview

What is the Yaskawa MP Ethernet Device Driver?

Device Setup

How do I configure a device for use with this driver?

Optimizing Your Yaskawa Ethernet Communications

How do I get the best performance from the Yaskawa MP Ethernet driver?

Data Types

What data types does the Yaskawa MP Ethernet driver support?

Addressing

How do I reference a data location in a Yaskawa MP Ethernet device?

Error Descriptions

What error messages does the Yaskawa MP Ethernet driver produce?


Overview

The Yaskawa MP Ethernet Device Driver was designed specifically for use with 32 bit OPC Server products and the Windows NT/2000/95/98 operating systems running on Intel microprocessor based computers.

This driver supports the Yaskawa MP 920 series CPU’s equipped with 218IF Ethernet communications modules.

Notes:

1) The driver will post messages when a failure occurs during operation. See Error Descriptions for a list of possible messages.

2) TCP/IP must be properly installed in order to use this driver. Consult your Windows documentation on setting up TCP/IP.


Device Setup

Supported Devices

Yaskawa MP 920 Series CPU equipped with 218IF Ethernet communication modules

Communication Protocol

Memobus Plus RTU Protocol over Ethernet using Winsock V1.1 or higher and TCP/IP.

Device ID

Yaskawa MP Ethernet devices are networked using standard IP addressing. The device ID has the following format YYY.YYY.YYY.YYY designating the device IP address (each YYY byte should be in the range of 0 to 255).

Connection Timeout

This is the time the driver will wait for a connection to be made with a device. Depending on network load the connect time may vary with each connection attempt. The default setting is 3 seconds. The valid range is 1 to 60 seconds.

Request Timeout

This is the time the driver will wait on a response from the device before giving up and going on to the next request. Longer timeouts only affect performance if a device is not responding. The default setting is 1000 milliseconds. The valid range is 100 to 9999 milliseconds.

Retry Attempts

The retry attempts setting determines the number of times the driver will retry a message before giving up and going on to the next message. The default setting is 3 retries. The valid range is 1 to 10.

See also: Communications Parameters, Block Sizes, Hardware Configuration.

Cable Diagrams

The 218IF Ethernet communications module is connected with the network via an Ethernet twisted pair transceiver. The table below shows the pinout of the 218IF Ethernet connector:

Pin Number | Signal Name | Remarks
1 | GND | Shield ground
2 | CI+ | Collision detection (+)
3 | DO+ | Send data (+)
4 | GND | Shield ground
5 | DI+ | Receive data (+)
6 | PWRGND | 12 V power supply
7 | N.C. | Not Connected
8 | GND | Shield ground
9 | CI- | Collision detection (-)
10 | DO- | Send data (-)
11 | GND | Shield ground
12 | DI- | Receive data (-)
13 | +12 V | 12 V power supply
14 | GND | Shield ground
15 | N.C. | Not Connected


Communications Parameters

Port Number

Specifies the TCP/IP port number the remote device is configured to use. The default port number is 502.

There should only be one device per connection defined in your PLC.


Block Sizes

Block Sizes for Bit addresses

Input bits (IB) and output bits (MB) can be read from 8 to 800 points (bits) at a time.

Block Sizes for Register addresses

Input registers (IW, IL, IF) and output registers (MW, ML, MF) can be read from 1 to 120 locations (words) at a time.

Reasons to Change the Default Block Sizes

1. Future versions of the device may not support block read/write operations of the default size.

2. The device may contain non-contiguous addresses, such as when a binary space module is used. If this is the case and the driver attempts to read a block of data that encompasses undefined memory, the device will probably reject the request.


Hardware Configuration

The 218IF module must be configured before Ethernet connections to it may be established. Each connection point must be configured individually. Up to 20 connections may be configured, though only 10 may be used at a time. Each device in the OPC server requires a corresponding connection configuration in a 218IF module. Connections for remote stations and other software applications must be configured in addition to those required by the OPC server.

Configure the following for each connection to an OPC server device:

  1. A unique source port. The driver will use 502 by default.

  2. Set the connection to use TCP/IP in "Unpassive Open" mode. Unpassive Open mode is used when "000.000.000.000" is specified for the destination IP, and "0" is specified for the destination port.

  3. Set the connection to use the "Memobus" protocol.

  4. Set the connection to use the "RTU" protocol code.

You must also create a simple ladder program that executes the "MSG-RCV" function in a cyclic manner. This is absolutely necessary, otherwise the driver will not be able to connect to the 218IF module or exchange data with it. See your Yaskawa 218IF documentation for details on the proper use of this function.

Example

The following is a simple ladder program that enables Ethernet communication with the 218IF module.

The most important component in this ladder program is the MSG-RCV function, seen at rung 14. This function takes 6 input sigals:

  1. Execute (B-VAL) Send message command

  2. Abort (B-VAL) Send Message Abort command

  3. Dev_Typ (I-REG) Communications device type (6 for 218IF)

  4. Pro-Typ (I-REG) Protocol Type (1 for Memobus)

  5. Cir-No (I-REG) Line number (1 to 8)

  6. Ch-No (I-REG) Transmissions Buffer Channel (1 to 10 for 218IF)

The MSG-RCV gives 3 outputs:

  1. Busy (B-VAL) Message is being sent

  2. Complete (B-VAL) Message transmission has been completed

  3. Error (B-VAL) Error has occurred

The MSG-RCV function also reads several parameters starting at the address specified by "Param". There are a total of 17 words of data that must be set in this memory area:

Word | In/Out/Sys | Description
0 | Out | Processing result
1 | Out | Status
2 | In | 218IF Connection number (1 in example - rung 4)
3 | Sys | Reserved
4 | In | Function code (initialized to 0 in example)
5 | In | Data address (initialized to 0 in example)
6 | In | Data size
7 | In | Remote CPU number
8 | In | Coil offset (0 in example - rung 5)
9 | In | Input relay offset (0 in example - rung 6)
10 | In | Input register offset (0 in example - rung 7)
11 | In | Holding register offset (0 in example - rung 8)
12 | In | Low boundary for write enabled registers (0 in example - rung 9)
13 | In | High boundary for write enabled registers (32767 in example - rung 10)
14 | Sys | Reserved by system
15 | Sys | Reserved by system
16 | Sys | Reserved by system


Optimizing Wago Ethernet Communications

Optimizing Yaskawa MP Ethernet Communications

The Yaskawa MP Ethernet driver has been designed to provide the best performance with the least amount of impact on your system's overall performance. While the Yaskawa MP Ethernet driver is fast, there are a couple of guidelines that you can use to control and optimize your application to gain maximum performance.

If you're familiar with our server you already know that it refers to communications protocols like Yaskawa MP Ethernet as a channel. Each channel defined in your application represents a separate path of execution in the server. Once you have a channel defined, the next step is to define a series of devices under that channel. Each of these devices represents a single Yaskawa MP controller from which data will be collected. While this approach to defining your application will provide a high level of performance it won't take full advantage of the Yaskawa MP Ethernet driver or your network. To illustrate this point here is a picture of how your application might be configured using a single channel:

In this example each device appears under a single Yaskawa MP Ethernet channel. In this configuration the driver must move from one device to the next as quickly as possible to gather information at an effective rate. The problem is, as more devices are added or more information is requested from a single device the overall update rate begins to suffer.

If the Yaskawa MP Ethernet driver allowed you to define only a single channel then the above example would be the only option available, however the Yaskawa MP Ethernet driver allows you to define up to 16 channels. The use of multiple channels distributes the data collection workload by simultaneously issuing multiple requests to the network. Here is the same application shown above but now done using multiple channels to improve performance:

As you can see each device has now been defined under its own channel. In this new configuration a single path of execution is dedicated to the task of gathering data from each device. If your application has 16 or fewer devices you can optimize your application just as it is shown here.

But what if your application has more than 16 devices? Will you see a gain? Absolutely. While 16 or fewer devices may be ideal, your application will still benefit from additional channels. Using the same goals shown here you would simply spread your device load across all 16 channels. Yes this means that within a given channel the server must again move from device to device but it can now do it with far less devices to process on a single channel.

There is one more parameter that can also affect the performance of your Yaskawa MP Ethernet driver, block size. The block size parameter is available on each device you define. The block size refers to the number of registers or bits that may be requested from a device at one time. To better allow you to fine tune the performance of this driver, the block size may be configured to 1 to 120 registers and 8 to 800 bits.


Data Types Description

Boolean

Single bit

Word

Unsigned 16 bit value

bit 0 is the low bit

bit 15 is the high bit

Short

Signed 16 bit value

bit 0 is the low bit

bit 14 is the high bit

bit 15 is the sign bit

DWord

Unsigned 32 bit value

bit 0 is the low bit

bit 31 is the high bit

Long

Signed 32 bit value

bit 0 is the low bit

bit 30 is the high bit

bit 31 is the sign bit

BCD

Two byte packed BCD

Value range is 0 - 9999. Behavior is undefined for values beyond this range.

LBCD

Four byte packed BCD

Value range is 0 - 99999999. Behavior is undefined for values beyond this range.

Float

32 bit floating point value.

The driver interprets two consecutive registers as a floating point value by making the second register the high word and the first register the low word.

When accessing data from a thermocouple or resistance sensor input module, the driver will use a single 16-bit register as a floating point value.

Float example

If register 40001 is specified as a float, bit 0 of register 40001 would be bit 0 of the 32 bit word, and bit 15 of register 40002 would be bit 31 of the 32 bit word.


Address Descriptions

Default data types for dynamically defined tags are shown in bold where appropriate.

Memory Type | Range | Data Type | Access
Input Bits | IB0000.b – IB7FFF.b (b is bit number 0x0 – 0xF) | Boolean | Read Only
Output Bits | MB00000.b – MB32767.b (b is bit number 0x0 – 0xF) | Boolean | Read/Write
Input Registers | IW0000 – IW7FFF IW0000 – IW7FFE IW0000.b – IW7FFF.b (b is bit number 0x0 – 0xF) IL0000 – IL7FFE IF0000 – IF7FFE | Short, Word, BCD Long, DWord, LBCD, Float Boolean Long, DWord, LBCD Float | Read Only
Output Registers | MW00000 – MW32767 MW00000 – MW32766 MW00000.b – MW32767.b (b is bit number 0x0 – 0xF) ML00000 – ML32766 MF00000 – MF32766 | Short, Word, BCD Long, DWord, LBCD, Float Boolean Long, DWord, LBCD Float | Read/Write

Arrays

Arrays are also supported for register addresses (IW, IL, IF, MW, ML, MF). The syntax for declaring an array is MMxxxxx[cols] with assumed row count of 1 and MMxxxxx[rows][cols], where ""MM" is the memory type mnemonic and "xxxxx" is the base address of the array data.

For Word, Short, and BCD arrays, the base address + (rows * cols) - 1 cannot exceed 32767.

For Float, DWord, Long, and Long BCD arrays, the base address + (rows * cols * 2) - 1 cannot exceed 32766.

For all arrays, the total number of registers being requested cannot exceed the register block size that was specified for this device.

Arrays are not supported for Boolean types (Ibxxxx.b, MBxxxxx.b, IWxxxx.b, MWxxxxx.b).

Notes

Input addresses (IB, IW, IL, IF) are in hex, while output addresses (MB, MW, ML, MF) are in decimal. Bit numbers, "b" are always in hex. Array "rows" and "cols" are always in decimal.

All output addresses map to the same memory area. For example, MB00001.F is the same as MW00001.F. ML00001 and MF00001 both map to the same memory as MW00001 and MW00002. The same is true for input addresses.

Writes to MB00000 – MB04095 are faster than writes to MB04096 – MB32767 because they can take advantage of direct bit access Memobus commands. Writes to the higher bits requires the driver to perform a read modify write operation, taking approximately twice as long.

The actual range of valid addresses is hardware specific, and may be smaller than the range allowed by this driver.


Error Descriptions

The following error/warning messages may be generated. Click on the link for a description of the message.

Address Validation

Missing address.

Device address '<address>' contains a syntax error.

Address '<address>' is out of range for the specified device or register.

Device address '<address>' is not supported by model '<model name>.'

Data Type '<type>' is not valid for device address '<address>'

Device address '<address>' is read-only.

Array size is out of range for address '<address>'

Array support is not available for the specified address: '<address>'

Device Status Messages

Device '<device name>' is not responding.

Unable to write to '<address>' on device '<device name>.'

Device Specific Messages

Winsock initialization failed (OS Error = <error code>).

Winsock shut down failed (OS Error = <error code>).

Winsock V1.1 or higher must be installed to use the Yaskawa MP Ethernet device driver.

Unable to bind to adapter: '<adapter>'. Connect failed.

Failure to start winsock communications.

Unable to create a socket connection for Device '<device>'.

Device '<device>' responded with error '<Memobus error code>' (Tag '<tag>', Size '<bytes>').

Bad received length [<start address> to <end address>] on device '<device>'.

Bad address in block [<start address> to <end address>] on device '<device>.'


Address Validation

The following error/warning messages may be generated. Click on the link for a description of the message.

Address Validation

Missing address.

Device address '<address>' contains a syntax error.

Address '<address>' is out of range for the specified device or register.

Device address '<address>' is not supported by model '<model name>.'

Data Type '<type>' is not valid for device address '<address>'

Device address '<address>' is read-only.

Array size is out of range for address '<address>'

Array support is not available for the specified address: '<address>'


Missing address.

Error Type:

Warning

Possible Cause:

A tag address that has been specified dynamically has no length.

Solution:

Reenter the address in the client application.


Device address '<address>' contains a syntax error.

Error Type:

Warning

Possible Cause:

An invalid tag address has been specified in a dynamic request.

Solution:

Reenter the address in the client application.


Address '<address>' is out of range for the specified device or register.

Error Type:

Warning

Possible Cause:

A tag address that has been specified dynamically references a location that is beyond the range of supported locations for the device.

Solution:

Verify the address is correct and if not reenter it in the client application.


Device address '<address>' is not supported by model '<model name>.'

Error Type:

Warning

Possible Cause:

A tag address that has been specified dynamically references a location that is valid for the communications protocol but not supported by the target device.

Solution:

Verify that the address is correct and if not reenter it in the client application.

Verify that the selected model name for the device is correct.


Data Type '<type>' is not valid for device address '<address>'

Error Type:

Warning

Possible Cause:

A tag address that has been specified dynamically has been assigned an invalid data type.

Solution:

Modify the requested data type in the client application.


Device address '<address>' is read-only.

Error Type:

Warning

Possible Cause:

A tag address that has been specified dynamically has a requested access mode that is not compatible with what the device supports for that address.

Solution:

Change the access mode in the client application.


Array size is out of range for address '<address>'

Error Type:

Warning

Possible Cause:

A tag address that has been specified dynamically is requesting an array size that is too large for the address type or block size of the driver.

Solution:

Reenter the address in the client application to specify a smaller value for the array or a different starting point.


Array support is not available for the specified address: '<address>'

Error Type:

Warning

Possible Cause:

A tag address that has been specified dynamically contains an array reference for an address type that doesn't support arrays.

Solution:

Reenter the address in the client application to remove the array reference or correct the address type.


Device Status Messages

The following error/warning messages may be generated. Click on the link for a description of the message.

Device Status Messages

Device '<device name>' is not responding.

Unable to write to '<address>' on device '<device name>.'


Device '<device name>' is not responding.

Error Type:

Serious

Possible Cause:

1. The connection between the device and the host PC is broken.

2. The communication parameters for the connection are incorrect.

3. The named device may have been assigned an incorrect network ID.

Solution:

1. Verify the cabling between the PC and the device.

2. Verify that the specified communication parameters match those of the device.

3. Verify that the network ID given to the named device matches that of the actual device.


Unable to write to '<address>' on device '<device name>.'

Error Type:

Serious

Possible Cause:

1. The named device may not be connected to the network.

2. The named device may have been assigned an incorrect network ID.

3. The named device is not responding to write requests.

4. The address does not exist in the PLC.

Solution:

1. Check the PLC network connections.

2. Verify the network ID given to the named device matches that of the actual device.


Device Specific Messages

The following error/warning messages may be generated. Click on the link for a description of the message.

Device Specific Messages

Winsock initialization failed (OS Error = <error code>).

Winsock shut down failed (OS Error = <error code>).

Winsock V1.1 or higher must be installed to use the Yaskawa MP Ethernet device driver.

Unable to bind to adapter: '<adapter>'. Connect failed.

Failure to start winsock communications.

Unable to create a socket connection for Device '<device>'.

Device '<device>' responded with error '<Memobus error code>' (Tag '<tag>', Size '<bytes>').

Bad received length [<start address> to <end address>] on device '<device>'.

Bad address in block [<start address> to <end address>] on device '<device>.'

Device '<device>' block request [<start address> to <end address>] responded with exception <Memobus error code>.


Winsock initialization failed (OS Error = <error code>).

Error Type:

Fatal

Possible Cause:

Could not negotiate with the operating systems winsock 1.1 functionality.

Solution:

Verify that the winsock.dll is properly installed on the system.


Winsock shut down failed (OS Error = <error code>).

Error Type:

Serious

Possible Cause:

Could not negotiate with the operating systems winsock 1.1 functionality.

Solution:

Verify that the winsock.dll is properly installed on the system.


Winsock V1.1 or higher must be installed to use the Yaskawa MP Ethernet device driver.

Error Type:

Fatal

Possible Cause:

Could not negotiate with the operating systems winsock 1.1 functionality.

Solution:

Verify that the winsock.dll is properly installed on the system.


Unable to bind to adapter: '<adapter>'. Connect failed.

Error Type:

Fatal

Possible Cause:

Could not bind local IP address of specified adapter.

Solution:

Verify that the winsock.dll is properly installed on the system. Verify that TCP/IP and Ethernet adapter is properly configured on system.


Failure to start winsock communications.

Error Type:

Fatal

Possible Cause:

Could not negotiate with the operating systems winsock 1.1 functionality.

Solution:

Verify that the winsock.dll is properly installed on the system.


Unable to create a socket connection for Device '<device>'.

Error Type:

Fatal

Possible Cause:

Could not create a socket for TCP/IP Ethernet communication.

Solution:

Verify that the winsock.dll is properly installed on the system.


Device '<device>' responded with error '<Memobus error code>' (Tag '<tag>', Size '<bytes>').

Error Type:

Fatal addresses falling in this block.

Possible Cause:

The driver attempted to read a block of memory in the PLC. The PLC responded with the specified Memobus error code.

Solution:

Ensure that the range of memory exists for the PLC.


Bad received length [<start address> to <end address>] on device '<device>'.

Error Type:

Fatal addresses falling in this block.

Cause:

The driver attempted to read a block of memory in the PLC. The PLC responded with no error, but did not provide the driver with the requested block size of data.

Solution:

Ensure that the range of memory exists for the PLC.


Bad address in block [<start address> to <end address>] on device '<device>.'

Error Type:

Fatal addresses falling in this block.

Cause:

This error is reported when the driver attempts to read a location in a PLC that does not exist. For example in a PLC that only has input registers IW00000 to IW10000, requesting address IW10001 would generate this error. Once this error is generated, the driver will not request the specified block of data from the PLC again. Any other addresses being requested that are in this same block will also go invalid.

Solution:

Ensure that the range of memory exists for the PLC.


Device '<device>' block request [<start address> to <end address>] responded with exception <Memobus error code>.

Error Type:

Fatal addresses falling in this block.

Cause:

This error is reported when the driver attempts to read a location in a PLC that does not exist. For example in a PLC that only has input registers IW00000 to IW10000, requesting address IW10001 would generate this error. Once this error is generated, the driver will not request the specified block of data from the PLC again. Any other addresses being requested that are in this same block will also go invalid.

Solution:

Ensure that the range of memory exists for the PLC.