'My Computer/Get Back PLC'에 해당되는 글 2건

  1. 2008.07.04 MODBUS PLUS 프로토콜 설정법 by housegod
  2. 2008.05.31 Modicon SA85 / SA85-002 by housegod

MODBUS PLUS 프로토콜 설정법

 

MODICON PLC의 MODBUS PLUS 방식의 통신은 MODBUS PLUS 프로토콜을 사용한다.

MODBUS PLUS 컴퓨터에 AT984, MC984, PCMCIA 416NHM/21200/3, SA85, SM85, TSXMBP100 등의 통신카드를 내장하고 MBX 통신 드라이브를 설치하여야 통신이 가능하다.

 

중요) MODBUS PLUS 통신을 하기위해서는 다음과 같은 순서로 드라이브를 설치하여야 한다.

가)   먼저 슈나이더(미국) 사에서 제공하는 MBX 드라이브를 설치한다.

나)   ‘프로그램디렉토리\PROTOCOL\ETC’ 디렉토리에 있는 ‘MODPLUS.DLL’파일을 ‘프로그램디렉토리\PROTOCOL’디렉토리로 복사한다.

 

 

1. 읽기 설정

 

아래 <그림 1>은 MODBUS PLUS 프로토콜의 통신설정 예이다.

 

<그림 1> MODBUS PLUS 프로토콜의 통신설정 예

 

<그림 1>에서 통신 DEVICE는 MBX 드라이브를 사용하므로 None으로 설정하고 옵션부에는 통신 Path Type, R2 ~ R5 Node 번호, Host Based Address(BUS 번호) 를 입력한다.

프로토콜 옵션부의  아이콘을 클릭하면 <그림 2>의 대화상자가 나타나는데 여기서 MODBUS PLUS의 Path Type, Node 등을 설정할 수 있다.

 

<그림 2> MODBUS PLUS 프로토콜 옵션 대화상자의 예

 

<그림 2>의 설정인자는 다음과 같이 설정한다.

 

  Path Type – 일반적으로 DM(Data Master)이나 PM(program Master)을 설정. (기본 값 : DM)

Node 2~ 5 – level 의 Node 번호 R2 ~ R5를 입력.  또한 R1 Node는 읽기 스케쥴의 Station으로 설정한다.  (기본 값 : 모두 0  - Point To Point)

Host Based Device – MBX 드라이브에서 설정한 BUS 번호.  95/98/ME는 0 ~99 사이 값, NT/2000 에는 0 ~ 10 중에서 설정한다.  (기본값 : 0)

 

 

MODBUS PLUS 프로토콜의 READ 작성 형식

MODBUS PLUS 프로토콜의 READ 형식은 다음과 같은 인자 순으로 사용한다.

1) Node 1 ADDRESS - PLC에서 설정한 Slave 번지.

2) Function 번호 – 통신 프로토콜의 읽기 Function 번호를 입력.

1 : Read Coil Status (0XXXX 번지  읽기),

2 : Read Input Status (1XXXX 번지 읽기),

3 : Read Holding Registers (3XXXX 번지 읽기),

4 : Read Input Registers (4XXXX 번지 읽기).

3) 읽을 주소 – 지정한 읽기 Function 에 따른 메모리 주소를 입력. 읽기 Function 1, 2 번은 WORD 단위의 번지로 계산 (0 : 0,  1 : 16,  2 : 32  3 : 48 … 등)

4) 통신 메모리 저장 위치 - 읽은 값이 저장될 ScanBuf의 위치.

5) 읽는 크기 : 워드 단위의 읽을 크기. 읽기 Function 1, 2 번은 1워드만 읽어도 16채널 값을 읽을 수 있다.

 

READ 예)

READ,  2,  3,   0,    0,   10,

READ,  2,  3,  20,   20,  30,

READ,  2,  3,  50,   50,  70,

READ,  2,  1,   0,  200,  20,

 

또한 <그림 2>의 , ,  버턴과 리스트 박스에서도 READ 스케쥴을 작성할 수 있다.

 

<그림 3> MODBUS PLUS 프로토콜 READ 추가/편집 대화상자의 예

 

<그림 3>은 <그림 2>의 프로토콜 옵션 대화상자에서 READ 스케쥴을 추가 또는 편집할 때 나타나는 대화상자의 예이다.

 

 

2. 출력 설정

출력은 SCAN File과 상관없이 PLC의 직접 ADDRESS에 쓴다.

 

MODBUS PLUS 프로토콜의 디지털 출력 설정법

디지털 출력은 Coil Status (0XXXX 번지)와 Holding Register(4XXXX) 영역의 Bit 값을 할 수 있다.

디지털 출력 TAG 설정 시 필요한 설정 5 가지

1) PORT : MODBUS PLUS 프로토콜을 설정한 통신 포트번호.

2) STATION : PLC의 Slave 번호 즉 Node 1 번지.

3) ADDRESS : 출력 번지.

3~4 자리는 10진수, 뒤쪽 1자리는 16진수 (0 ~ F).

4) EXTRA1 : Function 번호. (메모리 영역설정)

3 – Holding Registers 의 Bit 별 출력,

기타 – Coil Status 의 Bit 출력.

5) EXTRA2 : 사용안함.

 

설정 예1)

PORT : 0 , STATION : 2, ADDRESS : 0102, EXTRA1 : 빈칸,  이라고 설정하고 디지털 출력을 하면 MODICON PLC Slave address 2 의 Coil Status 0102번지의 (10번지 워드, 3번째 비트) Bit를 제어(ON/OFF)할 수 있다.

 

설정 예2)

PORT : 0 , STATION : 2, ADDRESS : 112F, EXTRA1 : 3,  이라고 설정하고 디지털 출력을 하면 MODICON PLC Slave address 2 의 Holding Registers 112F  (112번지 워드, 16번째 비트) Bit 값을 바꿀 (ON/OFF) 수 있다.

 

 

MODBUS PLUS 프로토콜의 아날로그 출력 설정법

아날로그 출력은 Holding Register(4XXXX) 영역 값을 지정한 값으로 바꿀 수 있다.

아날로그 출력 TAG 설정 시 필요한 설정 5 가지

1) PORT : MODBUS PLUS 프로토콜을 설정한 통신 포트번호.

2) STATION : PLC의 Slave 번호 즉 Node 1 번지.

3) ADDRESS : 출력 번지. (10진수)

4) EXTRA1 : 사용안함.

5) EXTRA2 : 사용안함.

 

설정 예)

PORT : 0  Station : 2, ADDRESS : 0123 라고 설정하고 아날로그 출력을 하면  MODICON PLC Slave 2  의 Holding Registers 메모리의 0123 번지 값을 지정한 값으로 변경할 수 있다.

 

 

* MODBUS PLUS 통신을 위한 MBX 드라이브 설치법

 

1 윈도우 95/98/ME 사용 시

 

a) 컴퓨터에 AT984, MC984, PCMCIA 416NHM/21200/3, SA85, SM85, TSXMBP100 등의 통신카드를 장착한다.

b) 슈나이더(미국) 사에서 제공하는 MBX 드라이브를 설치한 후 컴퓨터를 재시작 한다.

c) Plug and Play 기능으로 MBX 통신카드(MBX 카드)를 인식 시킨다.

Plug and Play 기능을 지원하지 않은 통신카드(SA85, SM85 등) 는 ‘제어판’의 ‘새 하드웨어 추가’에서 통신카드(MBX 카드)를 인식시키고 재 부팅한다.

          d) 설치된 MBX 드라이브의 ‘통신 드라이브 설정’ 프로그램을 실행한다.

e) <그림 4>< 그림 5>와 같은 대화상자에서 통신카드에 설정된 Memory Range (기본 : D0000), Device Number (Host Based Address – 0 ~ 99), Polling Interval 등을 설정한다.

 

<그림 4> MBX 드라이브의 Resource 설정 대화상자 예

 

<그림 5> MBX 드라이브의 통신 Device Settings 대화상자 예

 

 

2) 윈도우 NT/2000 사용 시

 

a) 컴퓨터에 AT984, MC984, PCMCIA 416NHM/21200/3, SA85, SM85, TSXMBP100 등의 통신카드를 장착한다.

b) Cyberlogic Technologies Inc. 에서 제공하는 MBX 드라이브를 설치한 후 컴퓨터를 재시작 한다.

c) MBX Driver Configuration 프로그램을 실행하여 <그림 6>처럼 새로운 통신카드를 설정하면 지정한 MBX Device 로 MODBUS PLUS 통신을 할 수 있다.

  <그림 7>은 MBX Device Type 이 SA85 일 때 디바이스 Configuration 대화상자의 예인데 여기서 통신카드에 설정된 Memory 번지 와 Polling Interval 등을 설정한다.

윈도우 NT/2000 에서 Host Based Address 는 <그림 6>의 MBX Device (0 ~ 10 까지) 번호이다.

 

<그림 6> MBX Driver Configuration 대화상자의 예

 

<그림 7> MBX Device Type 이 SA85 일 때 디바이스 Configuration 대화상자의 예

 

 

기타 상세한 통신 드라이브 설정법은 MBX 드라이브 도움말을 참조하세요.

 

Posted by housegod
l

Configuring Modicon SA85/SA85-002 Cards, Bridge Multiplexer 85 and Bridge Plus 85

All Tech Notes and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information.

Topic#: 000306
Created: May 9, 1997

This Tech Note describes how to configure the Modicon SA85/SA85-002 adapter cards, the Modicon Bridge Multiplexer 85 (BM85) and the Modicon Bridge Plus 85 (BP85).

Configuring Modicon SA85/SA85-002 Adapter Cards

The Modicon SA85/SA85-002 adapter cards allow a computer to act as a master node and can enable a Modbus Plus I/O Server to communicate to nodes and slave devices on the Modbus Plus network. The difference between the SA85 and SA85-002 adapter cards is that the SA85-002 adapter card contains dual ports for redundancy on the Modbus Plus network. To configure the SA85/SA85-002 adapter cards, set the adapter jumper for Polled Mode and set two DIP switches: one that defines the network node address and one that sets the memory base address.

Setting the DIP Switches for the Network Node Address

To define the node address for an SA85/SA85-002 adapter card, set the network address DIP switches on the card to the desired address. The following diagrams show the location of the network address DIP switches for the SA85/SA85-002 adapter cards.

SA85 Adapter Card

[03y.bmp]

SA85-002 Adapter Card

[040.bmp]

A switch is considered to be in position ‘1’ when it is set toward the numbers on the DIP switch. Likewise, a switch is considered to be in position ‘0’ when it is set away from the numbers on the DIP switch. Use switches 1 through 6 to set the node address. Note that switches 7 and 8 are not used. The following diagram shows the numbered DIP switches and a combination of settings that can be used to set an SA85/SA85-002 adapter card node address between 1 and 64.

[041.bmp]

Note Modicon recommends not setting the SA85/SA85-002 adapter cards to address 1 or 64. Using address 1 could create confusion if a local default address of 1 is used at a controller node’s programming panel. Address 64 should be reserved for network maintenance.

Setting DIP Switches for the Memory Base Address

The SA85/SA85-002 adapter cards should use a memory area in the computer that does not conflict with other boards in the computer. Use the memory base address switches to define the address for the memory area, as seen in the following diagrams:

SA85 Adapter Card

[042.bmp]

SA85-002 Adapter Card

[043.bmp]

The following table shows the possible memory base configurations that can be set by these switches:

[044.bmp]

Configuring the Bridge Multiplexer 85

A set of switches on the rear panel of the Bridge Multiplexer 85 (BM85) allow you to configure the serial ports and set the Modbus Plus node address. The Bridge Multiplexer contains non-volatile memory that will store the port configurations after the unit is turned off.

  • Switch 1 puts the Bridge Multiplexer into configuration mode or run mode;
  • Switches 2 and 3 define which port on the Bridge Multiplexer will connect to the serial terminal program, such as the Windows Terminal;
  • Switches 4 through 7 set the baud rate and parity mode to match the terminal emulation program settings. Always use 8 data bits and 1 stop bit when communicating to the device;
  • Switch 8 should be left in an upright position.

The following diagrams show the location of the switches on the rear panel and the settings you should use to configure the Bridge Multiplexer serial ports. Make sure that the Bridge Multiplexer is turned off before you set the switches.

[045.bmp]

Configuring the Serial Ports

To configure the serial ports, connect a terminal emulation program, such as Windows Terminal, to one of the Bridge Multiplexer ports. The Bridge Multiplexer does not need to be connected the Modbus Plus Network. Use a null modem cable to connect the serial port on the computer to the defined port on the Bridge Multiplexer. The null modem cable could be a minimum pin-out which only uses three lines: transmit, receive and ground; or it could be a ‘full-handshake’ which uses all signals.

When the terminal emulation program has established communication with the Bridge Multiplexer, it will display a screen similar to the following:

MODICON MODBUS BRIDGE/MUX - Ver 1.01

Copyright (c) 1989 MODICON Inc., Industrial Automation Systems Group

MODBUS PORTS CONFIGURATION [V1]

[Modbus Plus Address = 64]

<COMMANDS>

[OPTIONS]

<P>PORT NUMBER#

1

2

3

4

[1, 2, 3, 4]

<T>Port Type

slave

slave

slave

slave [m, s, n, x]

<N>Slave Dev Addr

1

1

1

1

[1 - 247]

<B>Baud Rate

19200

9600

19200

9600 [300 - 19200]

<S>Stop Bits

1

1

1

1

[1, 2]

<R>Parity

even

even

even

even [n, o, e]

<M>Mode

rtu

rtu

rtu

rtu

[a, r]

<Y>Priority

1

2

3

4

[1 - 4]

<L>Link Timeout

600

600

600

600 [1 - 3000]

<F>Modem Booster

-

-

-

-

[y, n]

>>Valid Commands:[V1 V2 V3 V4 P T N B S R M Y L F] Keys:[Enter Esc ?-help]<<

Active Port 1>>

After the terminal emulation program displays this screen, you may configure the Bridge Multiplexer serial ports. (See the Modicon Modbus Plus Network BM85 Bridge Multiplexer User’s Guide or contact Modicon for any questions about configuring the Bridge Multiplexer or using the terminal emulation program.) Once the serial ports are configured appropriately, run the Bridge Multiplexer to use the new settings.

Note The Modbus Plus I/O Server can only communicate through a serial port that is configured as either a ‘Network’ or ‘Slave.’

Configuring the Bridge Multiplexer Modbus Plus Address

Use switches 1 through 6 on the rear panel of the Bridge Multiplexer to set the Modbus Plus address. Be sure not to use switches 7 and 8. The following diagram and table illustrate the location of the switches and the switch settings that can be used to set the Modbus Plus address.

[046.bmp]

[047.bmp]

Configuring the Bridge Plus 85

To assign the network addresses for the Bridge Plus 85 (BP85), use switches 1 through 6, located on the unit's rear panel. Be sure not to use switches 7 and 8. The following diagram and table illustrate the location of the network address switches and the switch settings for the addresses that you will assign to the Bridge Plus 85.

[048.bmp]

[049.bmp]

Posted by housegod
l