Professional Documents
Culture Documents
Version: 1.0
MESSUNG SYSTEMS
EL-2, J- Block MIDC Bhosari,
Pune – 411026.(INDIA)
Revision
Warning !
INDEX
1. Introduction .................................................................................................................. 5
2. GOT_SLAVE (FB) ......................................................................................................... 6
2.1 PLC Variables and Range Supported by FB.............................................................. 8
2.2 Memory Mapping for Processor 521x......................................................................... 9
Appendix 1 GOT_ComSet ................................................................................................... 10
Appendix 2 PLC Variables and Range Supported by Processor 521x........................... 13
Appendix 3 Function List Supported by GOT interfaced with Nexgen. ......................... 14
Appendix 4 Commands Supported by FB ......................................................................... 16
Appendix 5 Set Up for GOT................................................................................................. 17
1. Introduction
The GOT FB library is designed to configure the on-board serial ports of
Nexgen5000 series CPUs as Mitsubishi C 24 protocol slave port. The
Processor modules in Nexgen5000 series, provides up to 3 serial ports with
open protocol feature. The GOT library FB is compatible with all these ports.
Depending on the CPU model, Port 1, Port 2 and Port 3 are available. Please
refer to Processor 521x User Manual for model wise features. All the three
serial ports support open protocol and user can communicate with any third
party device using communication driver functions.
2. GOT_SLAVE (FB)
Description of Parameters-
Port VAR_IN BYTE This input byte holds communication port number to
be activated with GOT slave FB. It should contain
constant value of 1 or 2 or 3 for Port 1, Port 2, Port
3 respectively. Any other value is invalid.
SNo VAR_IN BYTE This input byte holds the station number. Valid range
is from 0 to 31. For invalid station numbers, FB is not
executed.
Comset VAR_IN_OUT GOT_Comset This is input variable of user defined data type
GOT_Comset. It defines communication parameter
settings like baud rate, parity, operation mode, etc
for a slave device. Appendix 1 provides the details of
various communication parameter settings.
Status VAR_OUT BYTE This output BYTE holds the status of execution
Status.0 This bit is TRUE when port is opened
successfully with the communication
parameters assigned.
Replies VAR_OUT WORD This word holds number of healthy replies send to
the commands received from master. After 65535,
value rolls over to 0.
ErrCount VAR_OUT WORD This word holds number of errors detected in
reception. The number increments by 1 if
• Station number in command received is not
matching with station number defined by SNo.
• CPU type is not matching to Melsec A.
• Command received in invalid. The commands
supported by FB are listed in Appendix 4.
• While reception of any command, necessary
number of bytes are not received in time
duration of 300 ms.
• After reception of any command, calculated
ckecksum is not matching with that of received.
• Command requests for PLC variables which are
out of range for a particular Nexgen 5000
Processor.
In all these cases, earlier received bytes are ignored
and no response is sent.FB looks for next command.
Example –
X07F0 to X07FF
Output bits Y Y0000 to Y000F 2048
Y0010 to Y001F
Y07F0 to Y07FF
Auxiliary Relay bits M M0000 to M8191 8192
Data Registers D D0, D1 to D7935 7936
Nexgen 5000 Processor supports 2048 Input BOOLs from %IX0.0 to %IX255.7.
They are mapped as input devices from X0000 to X07FF.
Variable Range Mapping in X (Input Devices)
Input %IX0.0 to %IX1.7 X0000 to X000F
BOOL %IX2.0 to %IX3.7 X0010 to X001F
%IX4.0 to %IX5.7 X0020 to X002F
Appendix 1 GOT_ComSet
This is user defined data type provided in GOT library. The definition of this
user defined data type along with default values is as shown below.
TYPE GOT_ComSet :
STRUCT
Comset : WORD:=16#1407;
TX_Delay : BYTE ;
RX_Delay :BYTE ;
END_STRUCT
END_TYPE`
Bits F E D C B A 9 8 7 6 5 4 3 2 1 0
ComSet is a word for
Receive Buffer Initialization
Baud Rate Group selection
Baud Rate
Parity
2400 0 0 0 0 0 0 1 1 16#3
4800 0 0 0 0 0 1 0 0 16#4
9600 0 0 0 0 0 1 0 1 16#5
14400 0 0 0 0 0 1 1 0 16#6
19200 0 0 0 0 0 1 1 1 16#7
28800 0 0 0 0 1 0 0 0 16#8
38400 0 0 0 0 1 0 0 1 16#9
57600 0 0 0 0 1 0 1 0 16#A
115200 0 0 0 0 1 0 1 1 16#B
230400 0 0 0 0 1 1 0 0 16#C
F E D C B A 9 8
No. of Data Bits 7 data bits 0
Bit 8 decides number of data bits.
8 data bits 1
Parity No parity 0 0
Bits 9 and A decides parity.
Odd parity 0 1
Even parity 1 0
Invalid 1 1
No. of Stop Bits 1 stop bit 0
Bit B decides number of stop bits
2 stop bit 1
Communication Mode
Bit C decides communication
mode. If half duplex mode is Half duplex 0
selected, reception is disabled
during transmission and vice versa.
For full duplex mode, reception is
possible during transmission and
vice versa. If full duplex mode is
selected for RS-485, echo is
Full duplex 1
received while transmission. User
should take care for handling such
communication.
Software Handshake XON/XOFF control disable 0
Bit D selects software handshake.
XON/XOFF control enable 1
Receive Buffer Initialization No Initialization 0
The Comset is initialized to 16#1407. So baud rate is 19.2 Kb, even parity, 7
data bits and 1 stop bit. Normally, these are default settings for GOT. Other
members of user defined data type GOT_ComSet are explained in table
below.
Rx_Delay BYTE Rx_Delay is a delay for starting reception after completion of any
transmission. This delay is active while receiving first byte after any
transmission. It is a character delay and varies according to
communication parameter settings. This is applicable only in half duplex
mode.
Actual time delay = (No. of parity bits+ No. of stop bits for transmission+
No. of data bits)*Rx_Delay / BPS
Tx_Delay BYTE Tx_Delay is a delay for starting transmission after completion of any
reception. This delay is active while transmitting first byte after any
reception. It is a character delay and varies according to communication
parameter settings. This is applicable only in half duplex mode.
Actual time delay = (No.of parity bits+ No. of stop bits for reception+
No. of data bits)* Tx_Delay / BPS
IX255.0 to IX255.7
Input WORD %I W IW0, IW2, IW4 to IW254 128
Output BOOL %Q X QX0.0 to QX0.7 2048
(X is optional) QX1.0 to QX1.7
QX254.0 to QX254.7
Output WORD %Q W QW0, QW2, QW4 to QW254 128
Marker BOOL %M X MX0.0 to MX0.7 126976
(X is optional) MX1.0 to MX1.7
%MX15871.0 to %MX15871.7
Marker WORD %M W %MW0, %MW2, %MW4 to %MW15870 7936
The table below shows the functions supported by GOT for Nexgen
PLC interface marked as ‘Yes’ from the list of all the functions supported.
Alarm The alarm history is stored together with the event time, in
History Yes
mode order of occurrence.
Frequency The number of events of each alarm is stored. Yes
History clear The alarm history is cleared. Yes
Screen list User screens are displayed in order of screen No. Yes
The data used in the recipe function (data file transfer
Data file Yes
function) is changed.
Test The operations are checked to know whether key
mode Debug operation operations, screen changeover, etc. have been correctly Yes
performed on the displayed user screen.
Communication The status of communication with the connected PLC is
Yes
monitor displayed.
Time switch The specified bit device is turned ON/OFF at specified time. Yes
The screen data, the data sampling result and the alarm
PC transfer history can be transferred between the GOT and the screen Yes
creation software.
The sampling result and the alarm history can be output to a
Printer output Yes
Other printer
mode
The keyword (password) to protect programs in the PLC can
Keyword No
be registered.
The initial setting can be specified for the system language,
connected PLC, serial transfer, title screen, menu screen
Environment setting Yes
call, current time, backlight extinguishing time, buzzer
volume, LCD contrast, screen data clear, etc
Command
Function ASCII Description
Symbol
Code
Device Batch Read Bit JR 4AH, Reads bit devices (X,Y,M) in units of 1
Memory units 52H device
Word QR 51H, Reads bit devices (X,Y,M) in units of 16
units 52H devices
Reads word devices (D) in units of 1
device.
Batch Write Bit JW 4AH, Writes bit devices (X,Y,M) in units of 1
units 57H device
Word QW 51H, Writes bit devices (X,Y,M) in units of 16
units 57H devices
Writes word devices (D) in units of 1
device.
Monitor Data Bit JM 4AH, Sets bit devices to be monitored (X,Y,M)
Registration units 4DH in units of 1 device.
Word QM 51H, Sets bit devices to be monitored (X,Y,M)
units 4DH in units of 16 devices.
Sets word devices to be monitored (D) in
units of 1 device.
Monitor Bit MJ 4DH, Reads data from devices for which device
units 4AH data has been registered.
Word MQ 4DH,
units 51H
Parameter Batch Read PR 50H, Reads parameters from PLC CPU
52H
PC CPU PC CPU Read PC 50H, Reads type of PLC CPU
43H
Serial Link Cable from GOT port (RS-422) to Processor 521x Port 2 (RS-422)
RX+ TX+
2 7
TX-
7 RX- 4
TX+ RX+
1 2
TX- RX-
6 1
SG GND
5 3, 6
Serial Link Cable from GOT port (RS-422) to Processor 521x Port 3 (RS-422)
RX+ TX+
2 3
TX-
7 RX- 2
TX+ RX+
1 4
TX- RX-
6 5
SG GND
5 1
RTS+
8
CTS+ 7
RTS-
9
CTS- 6
The figure below shows the cable connections required for downloading application
program from PC (GT Designer programming software) to GOT.
PC GOT
9 pin D Female Connector 9 pin D Female Connector
RXD TXD
2 3
RXD 2
3 TXD
SG SG
5 5
DSR DTR
6 4
CTS
8
DTR DSR
4 6
CTS
8
MESSUNG SYSTEMS
EL – 2, J - Block, MIDC, Bhosari,
PUNE – 411 026. INDIA
Tel. – (+91) –020 – 712 0807, 712 2807
Fax. – (+91) –020 –712 0391
Document No.:ED-2002-048