MELSEC ENET communication driver

 

MELSEC ENET communication driver is the driver to communicate with MJ71E71, AJ71E71, FX3U ¡¦ module of MELSEC PLC of Mitsubishi in Japan.

 

Note) Ethernet communication with MELSEC PLC must create TCP/IP ( or UDP/IP ) Ladder routime. ( at Ladder routine : Open System = Unpassive )

 

Note) Ladder setting for Melsec ethernet communication

 

1. Read Settings

 

<Figure 1> is read setting example of MELSEC ENET communication driver.

<Figure 1>  Read setting example of MELSEC ENET communication driver

Device part of  <Figure 1> input Device type(TCP/IP), IP address of PLC(192.168.1.101), service port of TCP/IP protocol ( 7000 ),respectively, according to setting of PLC.

 

Note) When a communication error about TCP/IP connection occurs, the problem can be solved as follows.

1) Make 2 or more TCP/IP (or UDP/IP) service port routine in the Ladder program. ( maximum = 8 )

2) Input service port number at 'Device' part of <Figure 1> such as 7000, 7001, 70022 ¡¦(service port number = made by ladder program).

3) It can slove TCP/IP connection problem by connecting the next service port.

 

Note) Ladder routine for ethernet communication must include TCP/IP inital setting and connection/disconnection.

 

MELSEC ENET 3E communication driver read schedule

Read schedule setting parameters are as follows:

1) Station – 0 ~ 255 station number of PLC. direct connection = 255, other = according to setting switch.

2) Read memory type – memory type = B, CC, CCw, CN, CS, CSw, D, F, Fw, L, Lw, M, Mw, R, S, Sw, TC, TCw, TN, TS, TSw, W, X, Y. ( refer to <Table 1> )

3) Read start address – reading start address in memory.

 X, Y, B memory = read start address x 16.

4) Save start address for Communication Server – Saving start address of Communication Server.

5) Read Size – read size( word or 10 bit unit ).

 

Read schedule example)

READ,  255,     X,     0,    0,  20,

READ,  255,     Y,   10h,   20,  10,

READ,  255,     W,     0,   30,  20,

READ,  255,     M,     0,   50,  10,

READ,  255,    Mw,    10,   60,  10,

READ,  255,     D,     0,   70,  50,

 

Note) 10h = hex-dicimal unit. ( above example )

 

<Table 1> is memory type and contents of Melsec PLC.

Memory type Contents of memory Bit write Read/Write command read unit Address Remarks
B LINK relay O B WORD hex-decimal * read size  = 1
word unit  = 16 bit(1 word ),
10bit unit  = 10 bit

Digital write for
CN, D, R, TN, W
= bit operation after word unit reading.
CC Counter O CC 10 BIT decimal
CCw WORD
CN X CN WORD
CS O CS 10 BIT
CSw WORD
D DATA register X D WORD
F ANNUNCIATOR O F 10 BIT
Fw WORD
L LATCH relay O L 10 BIT
Lw WORD
M ³»ºÎ relay O M 10 BIT
Mw WORD
R FILE register X R WORD
S STEP relay O S 10 BIT
Sw WORD
TC Timer O TC 10 BIT
TCw WORD
TN X TN WORD
TS O TS 10 BIT
TSw WORD
W LINK register X W WORD hex-decimal
X Input O X
Y Output Y
<Table 1> Memory type and contents of Melsec PLC.

If you click the icon  in protocol option part at <Figure 1>, you can see the dialogue box such as <Figure 2>. you can also set read schedule by using this part. 

<Figure 2> Example of MELSEC ENET communication driver¡¯s Option dialog box

You can set read schedule by using , , button and listbox of <Figure 2>.

<Figure 3> Example of MELSEC ENET communication driver¡¯s read schedule Add/Edit dialog box

When you click Add button or Edit button in dialogue box of <Figure 2>, dialogue box of <Figure 3> is shown.

 

2. Writing settings

You can set Melsec PLC  by using 'writing settings'. 

 

Digital Write

Digital write setting parameters are as follows:

( CN, D, R, TN, W = bit operation after word unit reading )

1)  PORT                   Port no. (0 ~ 255)

2)  STATION             station number of PLC. ( single PLC = 255 )

3)  ADDRESS          address in PLC memory.

B, W, X, Y = hex-decimal unit,

other = decimal unit.

4)  Extra1                  write memory type =  B, CC, CC, CN, CS, CS, D, F, F, L, L, M, M, R, S, S, TC, TC, TN, TS, TS, W, X, Y.

5) Extra2                   don't care.

 

Write example 1)

PORT:0,  station:255, ADDRESS:001A, Extra1: Y,  Extra2 : 0

The setting parameter shown above is bit control(On/Off) example for Y001A address ( bit unit ) of Y memory.

 

Write example 2)

PORT:0,  station:255, ADDRESS:0100, Extra1: M,  Extra2 : 0

The setting parameter shown above is bit control(On/Off) example for 100 address ( bit unit ) of M memory.

 

Analog Write 

Analog write setting parameters are as follows:

1)  PORT                   Port no. (0 ~ 255)

2)  STATION             station number of PLC. ( single PLC = 255 )

3)  ADDRESS          address in PLC memory.

B, W, X, Y  = hex-decimal unit,

other = decimal unit. ( CC, CS, F, L, M, S, TC, TS : bit memory = 16 bit write )

4)  Extra1                  write memory type = B, CC, CC, CN, CS, CS, D, F, F, L, L, M, M, R, S, S, TC, TC, TN, TS, TS, W, X, Y.

5) Extra2                   block write option.

0, space : normal Analog write,

1 : output value and address saving for block(multi) write,

2 : sequential block write by using saved data, ( maximum block write count = 256 )

3 : random block write by using saved data, ( maximum block write count = 40 )

4 : delete all saved data for block write.

 

Write example 1)

PORT:0,  station:255, ADDRESS:0015, Extra1: D,  Extra2 : 0

The setting parameter shown above is word write example for D0015 address( word unit ) of D memory.

 

Write example 2)

PORT:0,  station:255, ADDRESS:000A, Extra1: Y,  Extra2 : 0

The setting parameter shown above is word write example for Y000A address ( word unit ) of Y memory.

 

Write example 3)

PORT:0,  station:255, ADDRESS:0000, Extra1: W,  Extra2 : 1, Output value = 356

The setting parameter shown above is data saving example for block writing. The saved data : Output value = 356, memory type = W, address = 0000.

Also,

PORT:0,  station:255, ADDRESS:0001, Extra1: B,  Extra2 : 1, Output value = 12

The setting parameter shown above is data saving example for block writing. The saved data : Output value = 12, memory type = B, address = 0001.

Also,

PORT:0,  station:255, ADDRESS:0002, Extra1: W,  Extra2 : 1, Output value = 34

The setting parameter shown above is data saving example for block writing. The saved data : Output value = 12, memory type = B, address = 0001.

 

Finally,

PORT:0,  station:255, ADDRESS:0005, Extra1: B,  Extra2 : 2,

The setting parameter shown above is sequential block write setting example. The writing data are saved data at internal memory, memory type = B, writing address = 5 ~ 7, Output value = 356, 12, 34.

( sequential block write setting use Port, Station, Extra1(memory type) and Address. Output value = don't care )

 

Write example 4)

PORT:0,  station:255, ADDRESS:0005, Extra1: B,  Extra2 : 1, Output value = 234

The setting parameter shown above is data saving example for block writing. The saved data : Output value = 234, memory type = B, address = 0005.

Also,

PORT:0,  station:255, ADDRESS:0003, Extra1: W,  Extra2 : 1, Output value = 45

The setting parameter shown above is data saving example for block writing. The saved data : Output value = 12, memory type = B, address = 0001.

Also,

PORT:0,  station:255, ADDRESS:0007, Extra1: B,  Extra2 : 1, Output value = 78

The setting parameter shown above is data saving example for block writing. The saved data : Output value = 12, memory type = B, address = 0001.

 

Finally,

PORT:0,  station:255, ADDRESS:0000, Extra1: B,  Extra2 : 3,

The setting parameter shown above is random block write setting example.

The writing data are saved data at internal memory,

memory type = B, writing address = 5, Output value = 234,

memory type = W, writing address = 3, Output value = 45,

memory type = B, writing address = 7, Output value = 78.

( random block write setting use Port and Station. Address, Extra1(memory type), Output value = don't care )

 

Notes of DIP switch setting

Please note DIP switch setting of AJ71E71, MJ71E71, FX3U¡¦.

1) Please set 'Binary mode' between ASCII mode and Binary mode.

2) If you want to write to the PLC, you should to set 'Write mode = Enable' at DIP Switch.