XGT Ethernet Communication Driver

 

XGT Ethernet is driver to communicate with general-purpose PLC XGT series of LS Industrial System.

 

1. Read settings

 

<Figure 1> is read setting example of XGT Ethernet communication driver.

<Figure 1> Read setting example of XGT Ethernet driver

Device setting of <Figure 1> input Connection type(TCP/IP), IP address of PLC(192.168.1.68), TCP service port(2004) respectively.

Also, set whether to set as communication error(0 = Not error, 1 = Error processing, Default = 0) when CPU is Slave by using option part.

 

Reference) You can set the IP address setting etc of XGT Ethernet by using the XG-PD program which is offered by LS Industrial System.

              But, service port is fixed to no.2004(TCP/IP) and no.2005(UDP/IP).

 

XGT Ethernet read schedule

Read schedule setting parameters are as follows :

1) Station : Don't care.

2) Device Type : Input the PLC device such as P, M, K, F, T, C, U, Z, S, L, N, D, R, ZR. (Refer to <Table 1>)

Input the unit to read next to device type such as X(10 bit), W(Word), D(Double Word), F(Float Lo Hi), F2(Float Hi Lo). (Default = W)

3) Read Start Address : Start address to read at designated device.

4) Save Start Address for Communication Server : Saving start address of Communication Server.

5) Read Size : Data size to read at a time. (Max 750 WORD)

 

Read schedule example)

READ,     0,    PW,     0,    0,  16,

READ,     0,    MW,     0,   20,  16,

READ,     0,    KW,     0,   40,  16,

READ,     0,    FW,     0,   60,  16,

READ,     0,    TW,     0,   80,  16,

READ,     0,    CW,     0,  100,  16,

READ,     0,    UW,     0,  120,  16,

READ,     0,    ZW,     0,  140,  16,

READ,     0,    SW,     0,  160,  16,

READ,     0,    LW,     0,  180,  16,

READ,     0,    NW,     0,  200,  16,

READ,     0,    DW,     0,  220,  16,

READ,     0,    RW,     0,  240,  16,

 

<Table 1> is PLC device type and size to be used at XGT Ethernet communication driver.

Device Type

Range Size Remarks

P

P0 ~ P2047

2048 Word

 

M

M0 ~ M2047

2048 Word

 

K

K0 ~ K2047

2048 Word

 

F

F0 ~ F1023

2048 Word

Read only

F1024 ~ F2047

 

T

T0 ~ T2047

2048 Word

 

C

C0 ~ C2047

2048 Word

 

U

U00.00 ~ U7F.31

4096 Word

 

Z

Z0 ~ Z127

128 Word

 

S

S0 ~ S127

128 Word

 

L

L0 ~ L11263

11264 Word

 

N

N0 ~ N21503

21504 Word

 

D

D0 ~ D32767

32768 Word

CPUH

D0 ~ D19999

20000 Word

CPUS

R

R0 ~ R32767

32768 Word

 

ZR

ZR0 ~ ZR65535

65536 Word

In case of CPUH

<Table 1> PLC device type and size to be used at XGT Ethernet communication driver

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

<Figure 2> Example of XGT Ethernet communication driver's Option dialog box

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

Also, you can set whether to set as communication error when CPU is Slave at 'Error When CPU is Slave Mode' area of <Figure 2>.

<Figure 3> Example of XGT Ethernet communication driver's read schedule Add/Edit dialog box

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

 

2. Write settings

You can change value of specified device of XGT PLC by using the write command.

 

Digital Write

Digital write setting parameters are as follows :

1) Port : Connected Port no. (It is not COM number)

2) Station : Don't care.

3) Address : Address to output.

PX, MX, KX,¡¦ P, M, K, ¡¦ = 3 ~ 7 digit of front - Decimal output address for word memory of device, 1 digit of back – Hexadecimal output address of 0~F bit.

PW, MW, KW, ¡¦ = 3 ~ 7 digit of front - Decimal output address for word memory of device, 1 digit of back – Hexadecimal output address of 0~F bit.

4) Extra1 : Input device type such as P, M, K, F, T, C, U, Z, S, L, N, D, R, ZR. (Refer to <Table 1>)

5) Extra2 : Don't care.

 

Write example 1)

PORT : 0   STATION : 0   ADDRESS : 123F  EXTRA1 : MW  EXTRA2 : 0

If you set as above and output the digital value, you can control(ON/OFF) value for MW123.F address of XGT PLC which connected to no.0 port.

 

Write example 2)

PORT : 0   STATION : 0   ADDRESS : 0052  EXTRA1 : MX  EXTRA2 : 0

If you set as above and output the digital value, you can control(ON/OFF) value for MX005.2 address of XGT PLC which connected to no.0 port.

 

Write example 3)

PORT : 0   STATION : 0   ADDRESS : 0125  EXTRA1 : DX  EXTRA2 : 0

If you set as above and output the digital value, you can control(ON/OFF) value for DX0125 address of XGT PLC which connected to no.0 port.

 

Analog Write

Analog write setting parameters are as follows :

1) Port : Connected Port no. (It is not COM number)

2) Station : Don't care.

3) Address : Decimal output address for Word(W, etc)/DoubleWord(D)/Float(F, F2) unit of device to output.

4) Extra1 : Input device type such as P, M, K, F, T, C, U, Z, S, L, N, D, R, ZR. (Refer to <Table 1>)

            Input the data unit(Default = W) such as W(Word), D(DoubleWord), F(Float Lo Hi), F2(Float Hi Lo), to beside device type.

5) Extra2 : Don't care.

 

Write example 1)

PORT : 0   STATION : 0   ADDRESS : 0012  EXTRA1 : MW  EXTRA2 : 0

If you set as above and output the analog value, you can change the Word value for MW0012 address of XGT PLC which connected to no.0 port.

 

Write example 2)

PORT : 0   STATION : 0   ADDRESS : 0037  EXTRA1 : DW  EXTRA2 : 0

If you set as above and output the analog value, you can change the Word value for DW0037 address of XGT PLC which connected to no.0 port.

 

Write example 3)

PORT : 0   STATION : 0   ADDRESS : 0063  EXTRA1 : DD  EXTRA2 : 0

If you set as above and output the analog value, you can change the DoubleWord value for DD0063 address of XGT PLC which connected to no.0 port.

 

Write example 4)

PORT : 0   STATION : 0   ADDRESS : 0072  EXTRA1 : DF  EXTRA2 : 0

If you set as above and output the analog value, you can change the DoubleWord value as Float Lo, Hi order(IEEE form) for DD0144 address of XGT PLC which connected to no.0 port.

 

Write example 5)

PORT : 0   STATION : 0   ADDRESS : 0005  EXTRA1 : DF2  EXTRA2 : 0

If you set as above and output the analog value, you can change the DoubleWord value as Float Hi, Lo order(IEEE form) for DD0002 address of XGT PLC which connected to no.0 port.

 

3. Communication cable connection and power connection

Connect Ethernet communication cable of XGT PLC and basic power as follows.

 

Communication cable connection

Connect general Ethernet communication cable to RJ45 terminal of XGT PLC Ethernet communication card.(Refer to <Figure 4>)

<Figure 4> is appearance of XGT PLC.

1
<Figure 4> Appearance of XGT PLC

Basic power connection

Connect basic power of 110 ~ 240 V AC to L, N terminal of XGT PLC such as <Figure 4>.

 

4. Setting for IP address etc of XGT PLC Ethernet communication card

Set the IP address of XGT PLC Ethernet communication card and protocol etc as follows.

1)    Screen such as <Figure 5> is shown when you execute XG-PD program which LS Industrial System offer.

2)    Set adequate PLC at '¿É¼Ç|PLC ŸÀÔ ¼³Á¤' menu of XG-PD program.

3)    Connect to PLC by selecting '¿Â¶óÀÎ|Á¢¼Ó'.

4)    After connecting to PLC, read current set information by selecting the '¿Â¶óÀÎ|IO Á¤º¸ Àбâ'

5)    ¸¸¾à Ethernet Åë½ÅÄ«µå°¡ ÀåÂøµÈ º£À̽º|½½·Ô¿¡ Åë½Å¸ðµâ ¼³Á¤ÀÌ µÇÁö ¾Ê¾ÒÀ¸¸é Åë½Å ¸ðµâ Á¾·ù¸¦ ¡®FEnet¡¯¸¦ ¼³Á¤ÇÑ´Ù.

6)    <Figure 6> dialogue box is shown when you select the set communication module slot(double clicking the mouse).

7)    Set IP address, driver type(set as XGT server) at <Figure 6>.

8)    <±×¸² 6>¿¡¼­ ¡®Àο¡À̺í È£½ºÆ® Å×ÀÌºí¡¯À» üũ( V )ÇÏ¸é ¼³Á¤ÇÑ IP ¹øÁö¿¡¼­ÀÇ ÄÄÇ»ÅÍ¿¡¼­¸¸ PLC¿ÍÀÇ Åë½ÅÀÌ °¡´ÉÇÏ´Ù.

<Figure 5> Example for default screen of XG-PD

<Figure 6> Example of IP address setting dialogue box for Ethernet communication card