MITSUBISHI MELSEC 1C (AnA/AnU CPU) (Serial)

Communication Setup: Xpanel

Create a new Device

To configure the communication device of Melsec 1C (ACPU, AnA/AnU CPU) PLC, select [Tools] → [I/O Devices], or click the icon in the main toolbar. The ‘I/O Device Configuration’ dialog box will pop up.

Click the [New Device] button to open the ‘I/O Device Selection’ dialog box.

I/O Device Name: MEL

In the case that there are various kinds of field equipment, type a device name to identify each equipment. The string “MEL” of this item will be shown up in the selection list of I/O devices when you register a tag. Xpanel can communicate with various kinds of equipment simultaneously by identifying the equipment’s name. The value saved as a tag is the compound string of a device name and station name such as “MEL.ST” (“MEL” is a device name, and “ST" is a station name). It is used as a unique identifier in the Xpanel project.

I/O Device Selection: Serial device

You can select field equipment and a communication type. Select one according to the communication method of the selected device.

Select a device type

 

After clicking the [Ok] button on the previous step, the ‘Serial Communication Configuration’ dialog box will pop up.

This example shows you selecting ‘MITSUBISHI Melsec 1C (AnA/AnU CPU)’, but you can select ‘MITSUBISHI 1C (ACPU)’ as well.

I/O Device type: ' MITSUBISHI Melsec 1C (AnA/AnU CPU) '

Comm. Port: COM1

This example uses COM1 port. If you want to use other ports, select one in the combo box.

Baud rate: 19,200

Select the communication speed for the equipment. The configuration of the communication speed of Xpanel must be the same as the configuration of the equipment. If the speed of the configurations of the two sides is different, they will not communicate with each other.

Parity: None

Data bits: 8 Bits

Stop bits: 1 Bit

RTS/CTS: ON

This example uses RTS-CTS control always ON doing.

Comm. Type: RS232

This example selects RS-232C communication.

When using RS-422 communication select RS422. When using RS-485 communication, select RS485.

Retry No.: 3

If communication failed with the devices, it will try to reconnect 3 times.

Time Out: 30

The time out count will be 30 seconds.

Using Dial Up Modem: Not Select

This item can be chosen only when using the Dial Up modem.

See the Communication Configuration section for more information about the remaining parameters.

Create a station

Move to the [Station] tab of the ‘Serial Communication Configuration’ dialog box. Click the [Add Station] button to open the ‘Station' dialog box. Please configure the following contents, then click the [Ok] button.

Station Name: ST

When the field equipment number exceeds two, the station name is used for differentiation of the field equipment at the internal Xpanel.

It is expressed as “Device.Station” in the internal Xpanel. This example shows “MEL.ST”.

Station Type: AnA/AnU

Network ID: This field has no effect.

Station No.: 0

When the field equipment number exceeds two, it is assigned a different station number. The station number must be the same as configured in the field equipment, otherwise, they will not communicate.

Socket Port No.: 2005

The exclusive use of GLOFA Enet supporting socket number is TCP 2004, UDP 2005.

16Bit Data Swap: This field has no effect.

32Bit Data Swap: This field has no effect.

Using Checksum: This field has no effect.

Comm. Error Message Pop Up: When this item is checked, Xpanel displays a communication error message box for every Rx and Tx error. Otherwise (unchecked), Xpanel does not display a message for communication errors. This message box will close automatically after a few seconds.

See the Communication Configuration section for more information about the remaining parameters.

Configuration of PLC Communication module: AJ71UC24

Configure the communication module according to the table below. For more details, refer to the module manuals.

Mode Configuration

Switch

Xpanel communicates with PLC using “A compatible 1C Frame”. You can choose one of the protocols using the Mode setting switch. If you use RS-232C, configure the switch as 1. If using RS-422/485, configure the switch as 5.

When RS-232 and RS-422/485 are used at the same time, configure the switch as A.

Station No.

Configuration Switch

The station number must match the Xpanel station number. For this example, the configuration of the Xpanel station number is 0.

Configure both x10 and x1 as 0.

Communication

Configuration Switch

Configure the communication switch as shown below:

Baud Rate Configuration

If all configurations are done, reboot the PLC to apply the changed configurations.

Wiring Diagram

Wire the communication cables as shown below.

RS-232C

RS-422

The wiring in the terminal resistance must be 330 Ω. To improve the stability of communication, devices should connect through SG, using STP cables. Shielded cables must be earthed.

RS-485

The wiring in the terminal resistance must be 120 Ω. When using RS-485, connect SDA and SDB, but disconnect RDA and RDB. To improve the stability of communication, devices should connect through SG, using STP cables. Shielded cables must be earthed.

Device Memory Range

Usable device ranges are shown below. Note that Input(X) and Output(Y) are Hexadecimal.

Device

Symbol

I/O Device

Type

Bit/Word

Melsec 1C (ACPU)

Melsec 1C (AnA/AnU)

Input

X

X0000-X07FF

X000000-X001FFF

Hex

Bit

Output

Y

Y0000-Y07FF

Y000000-Y001FFF

Hex

Bit

Internal Relay

M

M0000-M2047

M000000-M008191

Decimal

Bit

Latch Relay

L

L0000-L2047

M000000-M008191

Decimal

Bit

Step Relay

S

S0000-S2047

S000000-S008191

Decimal

Bit

Link Relay

B

B0000-B03FF

B000000-B001FFF

Hex

Bit

Annunciator

F

F0000-M0255

F000000-F002047

Decimal

Bit

Special Relay

M

M9000-M9255

M009000-M009255

Decimal

Bit

Special register

D

D9000-D9255

D9000-D9255

Decimal

Word

Timer (point)

T

TS000-TS255

TS00000-TS02047

Decimal

Word

Timer (coil)

T

TC000-TC255

TC00000-TC02047

Decimal

Word

Timer (present value)

T

TN000-TN255

TN00000-TN02047

Decimal

Word

Counter (point)

C

CS000-CS255

CS00000-CS01023

Decimal

Word

Counter (coil)

C

CC000-CC255

CC00000-CC01023

Decimal

Word

Counter (present value)

C

CN000-CN255

CN00000-CN01023

Decimal

Word

Data Register

D

D0000-D1023

D000000-D08191

Decimal

Word

Link Register

W

W0000-W03FF

W000000-W001FFF

Hex

Word

File Register

R

R0000-R8191

R000000-R008191

Decimal

Word

Error Code

When Xpanel communicates with the PLC, it can receive a NAK error code.

Reference the error code contents from the following table.

Error

Code

Error type

Error contents

Solution

00H

Impossible on RUN

Even if it is forbidden to write on RUN, it receives writing a command.

Change the configuration of on RUN to writable

01H

Parity error

Parity bit wrong

Change the configuration of the parity bit

02H

Sum-check error

Uncorrected Sum-check

Check the wiring of the communication

03H

Protocol error

Receiving uncorrected statements that violate the control order of the protocol

Confirm the opponent equipment’s transfer statement and communicate after modifying

04H

Framing error

Uncorrected stop bit configuration

Change the configuration of the stop bit

05H

Over-run error

In the case of it receive data before the previous data receiving ended

Down the Baud rate and then try communication again

06H

Character part error

· Statement error

· Received a non-existing command

· Exceeded the allowable range

· Non-existent device assigned

Check the device range

07H

Character error

In the case of receiving data that cannot be used

Confirm the opponent equipment’s transfer statement and communicate after modifying

08H

PLC access error

Cannot communicate with CPU

Substitute CPU

10H

PLC number error

PLC number is not “FF” or a configured station number of the network parameter

Confirm the opponent equipment’s transfer statement and communicate after modifying

11H

Mode error

Error detection with PLC CPU

Substitute CPU

12H

Special function module assignment error

The special function module does not exist in the assigned location

Confirm the opponent equipment’s transfer statement and communicate after modifying

21H

Special function module bus error

Access error to the special module detected in assigned location

According to the correspondent module manual, detect an error, and solute the problem as indicated.