The text of a manual · part 26 of 41
E-terminals Programming manual: 17 Communication, pages 196 to 203
Pages 196 to 203 of 335, from E-terminals Programming manual
The original document is the PDF (4.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Beijer Electronics AB E200
Page 196
Communication
17 Communication The chapter is not valid for E50.
17.1 Transparent mode The programming/printer port on the terminal is used in the transparent mode to connect a unit working in parallel with the PLC system. This unit can be another terminal or a personal computer with for example the programming tool for the controller system or a superior operating system. The transparent mode works together with the MELSEC CPU port and MELSEC A-series communication ports with C24 protocol. For further information see the respective C24 manual.
Connecting a personal computer or other computer system Personal computers with the MELSEC MEDOC programming tool or other computer system are connected directly to the terminal’s programming/printer port. MELSEC MEDOC Terminal
FX-system
RS-232 RS-422
Terminal with MELSEC MEDOC connected to the programming/printer port
185
Page 197
Communication
Settings in the terminal and MELSEC MEDOC The following settings must be made in the terminal and MELSEC MEDOC for the transparent mode to work.
The terminal The printer parameters are set in the Setup menu under the menu option Peripherals. The parameters should be 9600 baud, 7 data bits, 1 stop bit and even parity if the terminal is connected to an FX system. The parameters should be 9600 baud, 8 data bits, 1 stop bit and odd parity if the terminal is connected to a A-CPU or a QnA-CPU. The parameters should be 19,200 baud, 8 data bits, 1 stop bit and no parity if the terminal is connected to one of the A-series or QnA-series serial communication modules.
MELSEC MEDOC The transfer parameters should be changed to 19,200 baud, 8 data bits, 1 stop bit and no parity when transferring via the A-series communication ports. This is done under Transfer in Setup. The Interface should also be changed from CPU to C24 under Transfer. The transfer parameters should not be changed in MELSEC MEDOC for other projects. See the Installation manual for cable connections. The settings also apply for other PC-based monitoring systems such as SCADA and MELSEC MEDOC plus.
186
Page 198
Communication
Connecting two terminals in transparent mode Several terminals can be connected to the same PLC system with the function transparent mode. In this section we describe how to connect two terminals. Several terminals are connected in a analog way.
Cable connection When connecting two terminals to a PLC system the first terminal is connected according to the description in the Installation manual. Between the two terminals a cable according to the figures below is used. The cable is connected between the free port on the first terminal and the corresponding port on the second terminal. If the distance is more than 15 meters using RS-232 communication a signal amplifier must be used.
RS-422
9-pos D-sub Female
RS-232
9-pos D-sub Female
2
3
3
2
5 Cable between two terminals using RS-232
5
25-pos D-sub Male
25-pos D-sub Male
2 15
3 16
3 16 7 8
2 15 7 8
Cable between two terminals using RS-422
187
Page 199
Communication
Settings in the first terminal In MAC Programmer+ the communication settings is made in the Setup menu under Peripherals. Settings for the port connected to the PLC system is stated in the common way. Settings for the port connected to the other terminal can be freely chosen.
Settings in the second terminal In MAC Programmer+ the communication settings is made in the Setup menu under Peripherals. The PLC system should be placed on the port that is used to connect the second terminal to the first terminal. The settings for this port shall be the same as stated in the first terminal on the port where the second terminal is connected. If any of the PLC systems FX2N or QnA is used the command BSD must be stated on the command line under System Signals in the Setup menu.
Transfer speed The transfer speed can vary between 600 and 19,200 baud. The highest transfer speed between the terminals is recommended to obtain the best results. The speed of communication decreases with the number of terminals connected according to the following table.
188
Access time to the PLC
Number of terminals
Terminal 1
Terminal 2
Terminal 3
Terminal 4
1
100%
-
-
-
2
50%
50%
-
-
3
50%
25%
25%
-
4
50%
25%
12,5%
12,5%
Page 200
Communication
Connecting three terminals in transparent mode A third terminal can be connected to Terminal 2 in the network using a cable according to the figures above. The settings in the third terminal should be analog to the settings in the second terminal. Terminal 2
Terminal 1
RS-422
RS-232
Terminal 3
RS-422
17.2 The terminal as communication interface (No protocol mode) The No protocol mode is used to connect different PLC systems or connect external units such as bar code readers or weighing scales to the PLC system. The PLC system controls what is to be sent to the communication port. Data coming in to the communication port is written to the PLC register. Communication takes place with the transfer of the PLC register area according to the control block below. Any unit
Terminal
Data register 0 1 . . 100
Communication handling
PLC program
Send buffer data
101 Recieve buffer data
Ctrl
Start send buffer Command for send Start receive buffer Command for receiving RX End code pattern RX Message length
189
Page 201
Communication
Rightclick on No Protocol Mode in Peripheral Configuration under Peripherals in the Setup menu.
Register
190
Beskrivning
Ctrl reg 0
Start register for the transmission data buffer. The first register in the buffer area contains the total number of bytes to be transmitted. The following registers contains the data to be transmitted. The maximum buffer size is 127 registers = 254 bytes.
Ctrl reg 1
Command register for transmission. Set to 1 by the PLC system when transmission is required. Set to 0 by the terminal when transmission is complete.
Ctrl reg 2
Start register for the reception data buffer. The first register in the buffer area contains the total number of bytes received. The following register contains the data received. The maximum buffer size is 127 registers = 254bytes.
Page 202
Communication Register
Beskrivning
Ctrl reg 3
Command register for reception. - Set to 0 by the PLC system when it is ready to receive. - Set to 1 by the terminal when the message is available. - Set to -1 (FFFF) on error message (e.g. too short). - Set to 2 by the PLC system when clearing of the port buffer is required. - Set to 3 by the terminal when clearing of the port buffer has been carried out. The port buffer is automatically cleared on start up and when switching between transparent mode and no protocol mode, i.e. the register receives the value 3.
Ctrl reg 4
End code (1 or 2 bytes) on the message received.
Ctrl reg 5
Length of the message received. End code is used if 0.
In the Setup menu, Peripherals you drag the icon No Protocol mode to the communication port you will use. Right click to define which register will be the first control register in the transfer area. This and the five following registers are used as control registers. The PLC system can switch between no protocol and transparent/printer modes in the run-time mode using a digital signal. State the digital signal in the dialog under No protocol on signal.
Ctrl reg 0 Ctrl reg 1 Ctrl reg 2 Ctrl reg 3
Register t0 Register t1 Register t2
Send data buffer Number of bytes Data
Control block Register t0 Register r0
Reception data buffer Register r0
Number of bytes
Register r1 Register r2
Data
191
Page 203
Communication
Example of using the No Protocol mode The following example describes the use of the No Protocol mode for a weighing system. The diagram below shows a three-step block schedule for communication.
0 M100
Wait state
Transmission start
1
Queries current weight Transmission completed
M11
2
Await current weight
Receiving complete
The terminal functions as the master towards the weighing system, that is it continually asks the weighing system for the current weight. The diagram below shows the connections between the PLC system, terminal and weighing system.
192