Page 2
It could lead to an electric shock. Copyright / Trademarks -This manual and its contents are copyrighted. -You may not copy this manual,in whole or part,without written consent of Panasonic Electric Works.,Ltd. -Windows and Windows NT are registered trademarks of Microsoft Corporation in the United States and/or other countries.
Table of Contents Precautions Concerning Compatibility with the FP3 ... Transmission Speed and Transmission Format ....Flow Control .
Page 4
Table of Contents FP2 Serial Data Unit Chapter 4 Communication with External Devices Overview of Communication with External Devices ....4 − 3 4.1.1...
Page 5
FP2 Serial Data Unit Table of Contents Chapter 7 Specifications Tables of Performance Specifications ....... .
Page 7
Units. The DIP switch settings are different. With the FP2 Serial Data Unit, the contents that can be set with the DIP switches are limited to the transmission speed and data length. The settings for the parity, stop bit length, and the start code/end code, as well as the control signal CS / CD effective/valid settings, are fixed in the initial status, but can be changed by writing different values to the shared memory.
Page 8
Invalid • • Valid • External reset switch • : These items can be set in the default settings, or using the DIP switches. *: With the FP2, these are items which can only be set using the shared memory.
Page 9
FP2 Serial Data Unit Transmission Speed and Transmission Format Transmission Speed and Transmission Format The transmission speed and transmission format are decided when serial communication is carried out. These settings must match on the transmitting side and receiving side, and consist of the following items.
Page 10
Transmission Speed and Transmission Format FP2 Serial Data Unit Start bit and Stop bit With normal communication, it is rare for a data transmission to consist of a single data element (character). Usually, characters of a certain unit are sent in succession. With serial communication, one “0”...
Page 11
FP2 Serial Data Unit Transmission Speed and Transmission Format Parity check With serial communication, sometimes noise or another factor causes a bit to be transmitted erroneously. The parity check is designed to detect data bit errors such as these. It does this by determining whether the total number of “1” bits in the data is an odd number or an even number.
Page 12
Transmission Speed and Transmission Format FP2 Serial Data Unit Stop−and−start synchronization data format As described in this section, the serial data unit adds a start bit to the beginning of the data being transmitted, and a stop bit to the end of the data. This is called the “stop−and−start synchronization”...
Page 13
FP2 Serial Data Unit Transmission Speed and Transmission Format Operation of the CD (received line signal detector) signal The CD (Received line signal detector) signal pin of the serial data unit is connected to the ER (Data terminal ready) pin on the other side. When the CD (Received line signal detector) signal of the serial data unit goes on, data reception processing begins, and when the signal goes off, data reception processing stops.
Page 14
Transmission Speed and Transmission Format FP2 Serial Data Unit Start code The start code designates one frame of the data being transmitted as the start of the data. If the start code is made valid in the transmission format settings, the data received between the STX and the next end code is considered to be one frame.
Page 15
These are connected with the SD (Sent Data) and RD (Received Data) of the two devices crossed. This is the basic method used to connect the serial data unit to the external device. FP2 serial data unit side (9 pins) RS232C device side Pin No.
Page 16
RS (Request to send), CS (Clear to send), and ER (Data terminal ready), and CD (Received line signal detector) signals are used when the wiring is connected. FP2 serial data unit side (9 pins) RS232C device side Pin No.
Chapter 1 Functions of Serial Data Unit Features and Parts Number of Serial Data Unit ..1 − 3 1.1.1 Features ....... 1 −...
Page 18
Functions of Serial Data Unit FP2 Serial Data Unit 1 − 2...
Page 19
1.1.1 Features The FP2 serial data unit is a communication interface unit which is installed in the Programmable Controller FP2 in order to connect it to devices with an RS232C interface. It can be used to read data from an image checker, bar code reader, or other device, and to output data to a printer or similar device.
Functions of Serial Data Unit FP2 Serial Data Unit Function of Serial Data Unit Function of Serial Data Unit The CPU unit and serial data unit handle reading and writing of data through a shared memory installed in the serial data unit.
1.3.2 Restrictions on Unit Installation Position The FP2 serial data unit may be installed in either the CPU backplane or the expansion backplane position. Also, multiple units may be installed, as long as they are within the combined restrictions imposed by the above current consumption values. However, the units should be installed to the right of the power supply unit and CPU unit.
Page 22
Functions of Serial Data Unit FP2 Serial Data Unit Restrictions on Units Combination 1 − 6...
Chapter 2 Parts and Functions Parts and Functions ......2 − 3 2.1.1 Name of Parts .
Page 24
Parts and Functions FP2 Serial Data Unit 2 − 2...
Page 25
FP2 Serial Data Unit Parts and Functions Parts and Functions Parts and Functions 2.1.1 Name of Parts Front Back Operation status display LEDs These display the communication and error statuses. COM.1 port (RS232C), COM.2 port (RS232C) This connector is used to connect RS232C devices such as a personal computer or bar code reader using a shielding wire.
Page 26
Parts and Functions FP2 Serial Data Unit Parts and Functions 2.1.2 Operation Status Display LEDs The operation status display shows status conditions such as the communication status of the unit and errors/alarms. Display Operation Alarm (red) Lighted: Unit error (Lights on watchdog timer error) Not lighted: Goes out when there is no error COM.1...
Page 27
FP2 Serial Data Unit Parts and Functions Parts and Functions 2.1.3 COM.1 and COM.2 Ports (9 pins) This connector is used to connect RS232C devices such as a personal computer or bar code reader using a shielding wire. Pin layout Pin No.
Page 28
Parts and Functions FP2 Serial Data Unit Parts and Functions Transmission speed and transmission format settings when shipped from factory Transmission speed ..9600bps Control signals CS and CD . . . Invalid Data length .
Chapter 3 Confirming the Unit Settings and Design Contents Signals of RS232C Connector ....3 − 3 Setting the Transmission Speed and Transmission Format .
Page 30
Confirming the Unit Settings and Design Contents FP2 Serial Data Unit 3 − 2...
FG (Protective ground) With the serial data unit, this is connected to the FG terminal of the power supply unit through the FP2 backplane, along with the D sub−connector housing. SD (Sent data) This is the signal line used when data is sent to the other side. With the serial data unit, the SD (green) LED of the operation status display LED blinks when data is being sent normally.
Page 32
Confirming the Unit Settings and Design Contents FP2 Serial Data Unit Signals of RS232C Connector CD (Received line signal detector) This signal line goes on when the received signal is within a specified range. The serial data unit sends and receives data when the CD signal (received line signal detector) is on.
Page 33
With the FP2 serial data unit, the transmission speed and transmission format are set to match those of the external device using the transmission format setting switches (DIP switches), and other transmission format parameters are set automatically to values determined ahead of time.
Page 34
Confirming the Unit Settings and Design Contents FP2 Serial Data Unit Setting the Transmission Speed and Transmission Format 3.2.1 Transmission Format Settings Set Using Switches The transmission speed and data length parameters of the COM.1 and COM.2 ports can be changed using the transmission format setting switches. Values specified using these switches become effective when the power supply is turned on.
FP2 Serial Data Unit Confirming the Unit Settings and Design Contents 3.2 Setting the Transmission Speed and Transmission Format Contents of the transmission format in the shared memory Transmission format setting item Bit setting of shared memory 15 to 11 (*2) 10...
Page 36
, K0 , DT100 , K1 , K1003 1003 area (the transmission format of CH1) of the shared memory. Specifies the FP2 serial data unit in slot no. 0. The 1−word data from data register DT100 is written to the shared memory address 1003.
Page 37
FP2 Serial Data Unit Confirming the Unit Settings and Design Contents 3.2 Setting the Transmission Speed and Transmission Format Explanation of the bits If the power supply is turned on with the factory settings still in effect, the status of the bits in the transmission format address section (COM.1 1003 and COM.2 1004) in the...
For information on detailed functions of input/output contacts, refer to section 7.3. 3.3.2 Allocation of I/O Contacts Like other units, the FP2 serial data unit also allocates inputs (X) and outputs (Y). Each serial data unit has 16 inputs and 16 outputs, for a total of 32 contacts. Example:...
3.3.3.1 Confirming the I/O Number Allocations The occupied I/O areas for all of the units mounted between the CPU unit and the FP2 serial data unit should be confirmed. These are allocated as I/O areas for the serial data unit, starting from the serial number.
Confirming the Unit Settings and Design Contents FP2 Serial Data Unit Confirming the I/O Contacts and Slot Number 3.3.3.2 Confirming Slot Number When mounted on the CPU backplane Slots are numbered in sequential order, with the slot to the right of the CPU unit being No.
Page 41
FP2 Serial Data Unit Confirming the Unit Settings and Design Contents 3.3 Confirming the I/O Contacts and Slot Number When mounted on an expansion backplane The slot number of the slot to the right of the power supply unit on the expansion backplane should be counted as “16”.
Page 42
Confirming the Unit Settings and Design Contents FP2 Serial Data Unit Confirming the I/O Contacts and Slot Number 3 − 14...
Page 43
Chapter 4 Communication with External Devices Overview of Communication with External Devices 4 − 3 4.1.1 Sending Data to External Devices ..4 − 3 4.1.2 Receiving Data from External Device ..4 −...
Page 44
Communication with External Devices FP2 Serial Data Unit 4 − 2...
FP2 Serial Data Unit Communication with External Devices 4.1 Overview of Communication with External Devices Overview of Communication with External Devices Communication with external devices is handled through the shared memory provided in the serial data unit. When data is read from and written to the shared memory in the serial data unit, it is done using the F151 (WRT) and F150 (READ) instructions in a ladder program.
Page 46
, K1 The data is written to the address 1 area of the shared memory (the CH1 sent buffer). Specifies the FP2 serial data unit in slot no. 0. The 7−word contents of data register DT 0 to DT 7 is written to the shared memory addresses 1 to 7.
, K5 , DT100 251 area of the shared memory (the received buffer of CH1). Specifies the FP2 serial data unit in slot no. 0. The contents of 5−word of shared memory addresses 251 to 255 is read to the data register DT 100 to DT 104.
Page 48
Communication with External Devices FP2 Serial Data Unit Overview of Communication with External Devices Explanatory diagram Reception Completed (X1: on) Received buffer clearing (Y11: on) FP2 serial data unit FP2 CPU unit RS232C device Data receiving After the received data...
FP2 Serial Data Unit Communication with External Devices Programming When Data is Sent Programming When Data is Sent 4.2.1 How Timings and Flags (Contacts) Work How communication is controlled With the serial data unit, control based on the contact on and off signals is the most secure way of carrying out data sending and reception, regardless of the position of the slot in which the unit has been installed.
Page 50
Communication with External Devices FP2 Serial Data Unit Programming When Data is Sent Operation steps when data is sent Operation is carried out in the following steps when data is sent from the serial data unit. 1. The data to be sent is created.
Page 51
FP2 Serial Data Unit Communication with External Devices Programming When Data is Sent 4. The sending completed flag goes on. When the sending from the RS232C port has been completed, X0 (Sending Completed flag) goes on. FP2 serial data unit...
Communication with External Devices FP2 Serial Data Unit Programming When Data is Received Programming When Data is Received 4.3.1 How Timings and Flags (Contacts) Work How communication is controlled With the serial data unit, control based on the contact on and off signals is the most secure way of carrying out data sending and reception, regardless of the position of the slot in which the unit has been installed.
Page 53
FP2 Serial Data Unit Communication with External Devices 4.3 Programming When Data is Received Operation steps when data is received When data is received by the serial data unit, operation is carried out in the following steps. 1. Reception completed of data Data received from the RS232C port is stored in the received buffer of the shared memory in the serial data unit at the point when the end code is received.
Page 54
Communication with External Devices FP2 Serial Data Unit Programming When Data is Received 4. The received buffer is cleared. After the data has been read to the data register using the F150 (READ) instruction, the Y11 (Receiving Buffer Clear) contact is turned on by the user’s program, and the contents of the received buffer in the shared memory are cleared.
Page 55
FP2 Serial Data Unit Communication with External Devices 4.3 Programming When Data is Received 6. The received buffer clear contact goes off. At the timing at which the X1 (Reception completed flag) contact goes off, the Y11 (Received Buffer Clear) contact is turned off by the user’s program.
In addition to data area read and write commands, the MEWTOCOL−COM is also provided with contact area reading and writing, and many other commands. Wiring diagram Connection with the FP0 COM port FP2 serial data unit side (9 pins) FP0 COM port side (3 pins) Pin No. Signal name Abbrev.
Page 57
FP2 Serial Data Unit Communication with External Devices Sample Program Connections with the FP1 COM port FP2 serial data unit side (9 pins) FP1 COM port side (9 pins) Pin No. Signal name Abbrev. Symbol Pin No. Protective ground Sent data...
Page 58
Data read with F150 Error code Received buffer cleared (Y11: on) Shared memory cleared Reception completed (X1: off) Received buffer cleared (Y11: off) Communication setting FP2 serial data unit side Item Setting contents Dip switch setting Transmission speed 19200bps Data length (Character bit...
Page 59
FP2 Serial Data Unit Communication with External Devices Sample Program FP0, FP1 (system register setting) Setting contents System register Set value No.412 Computer link Data length (Character bit 8bits No.413 Parity check: Odd Stop bit length: 1bit End code: C Start code: None No.414...
Page 60
Sample Program Sample Program In the example shown in this program, the serial data unit is installed in slot 0 of the FP2, and the various PLCs are connected to the COM.1 port of the serial data unit. Internal relay (R0) goes on at timing of sending condition (X20).
Page 61
FP2 Serial Data Unit Communication with External Devices Sample Program Notes • Contents of the response: If K100 is stored in DT0 and K200 is stored in DT1 of the FP series PLC on the other side, “%01$RD6400C800F1C ” is returned from the FP series PLC on the other side as the response when the program is executed.
Communication with External Devices FP2 Serial Data Unit Data Sent and Received with the Serial Data Unit Data Sent and Received with the Serial Data Unit The three precautions should be observed when accessing the shared memory of the serial data unit.
Page 63
FP2 Serial Data Unit Communication with External Devices 4.5 Data Sent and Received with the Serial Data Unit 3) Data is stored two bytes at a time, first the lower byte and then the upper byte, in the data register.
Page 64
Communication with External Devices FP2 Serial Data Unit Data Sent and Received with the Serial Data Unit 4 − 22...
Page 65
Chapter 5 Precautions Regarding Serial Data Unit Operation and Programs Precautions Regarding Basic Operation of the Unit 5 − 3 5.1.1 Shared Memory Values When the Power Supply is Off ... . . 5 −...
Page 66
Precautions Regarding Serial Data Unit Operation and Programs FP2 Serial Data Unit 5 − 2...
FP2 Serial Data Unit Precautions Regarding Serial Data Unit Operation and Programs 5.1 Precautions Regarding Basic Operation of the Unit Precautions Regarding Basic Operation of the Unit 5.1.1 Shared Memory Values When the Power Supply is Off Data in the shared memory of the serial data unit is not backed up if the power supply is turned off.
Precautions Regarding Serial Data Unit Operation and Programs FP2 Serial Data Unit Precautions Concerning Communication Precautions Concerning Communication 5.2.1 Precautions When a Start Code is Valid When receiving data When operating with a valid start code, be aware that the data between the most recent start code received and the end code is processed as one frame.
FP2 Serial Data Unit Precautions Regarding Serial Data Unit Operation and Programs Precautions Concerning Communication When sending data If the system is operating with a valid start code, be aware that the data from the most recent start code to the end code will be sent as one frame.
Precautions Regarding Serial Data Unit Operation and Programs FP2 Serial Data Unit Precautions Concerning Communication 5.2.4 Precautions Concerning a Software Reset If the serial data unit need to be reset because something irregular has occurred, the reset can be done through the software, but the following precautions should be observed.
Page 71
Chapter 6 Operation If an Error Occurs Operation If an Error Occurs ..... . 6 − 3 6.1.1 If the ALARM LED on the Serial Data Unit Lights .
Page 72
Operation If an Error Occurs FP2 Serial Data Unit 6 − 2...
FP2 Serial Data Unit Operation If an Error Occurs Operation If an Error Occurs Operation If an Error Occurs 6.1.1 If the ALARM LED on the Serial Data Unit Lights What the ALARM LED does The ALARM LED on the serial data unit lights if the watchdog timer in the unit is activated, to warn of a problem.
Operation If an Error Occurs FP2 Serial Data Unit Operation If an Error Occurs 6.1.2 When the Serial Data Unit ERROR LED Lights What the ERROR LED does The ERROR LED on the serial data unit lights there is a problem with communication between the unit and the external device.
FP2 Serial Data Unit Operation If an Error Occurs What To Do If An Error Occurs What To Do If An Error Occurs 6.2.1 If the ALARM LED Lights on the Serial Data Unit Situation The watchdog timer is activated to alert the user of a problem with the serial data unit.
Operation If an Error Occurs FP2 Serial Data Unit What To Do If An Error Occurs Note The I/O numbers are used as examples when the serial data unit is installed in slot 0. The I/O numbers change depending on the...
Page 77
Chapter 7 Specifications Tables of Performance Specifications ....7 − 3 Table of Shared Memory Areas ....7 −...
Page 78
Specifications FP2 Serial Data Unit 7 − 2...
FP2 Serial Data Unit Specifications Tables of Performance Specifications Tables of Performance Specifications General specifications Item Specifications Ambient operating temperature 0°C to 55°C/32 to 131°F Ambient storage temperature −20°C to +70°C/−4 to 158°F Ambient operating humidity 30 to 85% RH (at 25°C non−condensing) Ambient storage humidity 30 to 85% RH (at 25°C non−condensing)
Page 80
End code (H0D) (* Note) Max. message length Max. 500 characters/1 frame (including end and start codes) Interface with FP2 CPU unit Shared memory method F150 (READ) and F151 (WRT) instructions used for reading and writing Number of I/O occupied...
FP2 Serial Data Unit Specifications Table of Shared Memory Areas Table of Shared Memory Areas Shared memory configuration The configuration of the shared memory in the serial data unit is shown below. Addresses are expressed as decimal numbers, so to specify address 501 in the program, “K501”...
Specifications FP2 Serial Data Unit Table of I/O Contacts Table of I/O Contacts I/O allocation Functions such as handshaking and error signals with the CPU unit are handled by the X and Y contacts allocated to the serial data unit. The I/O of 16 X and 16 Y points are allocated to the serial data unit.
Page 83
FP2 Serial Data Unit Specifications Table of I/O Contacts Output number table Output signal Name Contents COM.1 Sending directive Data set in the sent buffer is sent when this goes on. When it goes from on to off, the COM.1 sent buffer is cleared.
Specifications FP2 Serial Data Unit Transmission Format Transmission Format Transmission format when the power supply is turned on The data transmission format of the serial data unit is automatically set to the values included in the setting contents of the transmission format setting switches (DIP switches) for both COM.1 and COM.2 when the power supply is turned on.
Page 85
FP2 Serial Data Unit Specifications Transmission Format Transmission format settings based on the shared memory To change the values of the transmission format automatically set when the power supply is turned on to any other desired values, the contents of the change are set in the shared memory, and a software reset is carried out (Y1D is turned on).
Page 86
Specifications FP2 Serial Data Unit Transmission Format 7 − 10...
FP2 Serial Data Unit Sample Programs Sample Programs Sample Programs 8.1.1 Adding a BCC (block check code) 8.1.1.1 An Overview of the BCC With serial communication, erroneous data can sometimes occur because of noise or another factor. With the normal parity check, the data is checked to see if the total number of “1”...
Page 90
Sample Programs FP2 Serial Data Unit Sample Programs BCC example The BCC is normally called a horizontal parity, and the characters of the sent character string from the beginning to just before the BCC form an exclusive OR (XOR) in sequence.
, K0 , I0DT0 , I1K 0 , K1 shared memory (sent buffer of CH1). Specifies the FP2 serial data unit in slot no.0. Starting with the data register indicated by I0. The word content specified by I1 is written to the shared memory address 1.
Page 92
Sample Programs FP2 Serial Data Unit Sample Programs When reception and reading of the data have been completed, Y11 goes on, and the received buffer is ( ED cleared. (SUB R9010 F0 MV , DT 0 , I0 The command store address is stored in I0.
, K1005 , K1 , DT49 Data is read from address 1005 of the shared memory (number of bytes Specifies the FP2 serial data unit in received on CH1) at the timing of the slot no.0. reception completed flag(X1) (includ- ing the end code).
Page 94
, I0K0 , DT100 Data indicating number of received words is read from address 251 of the shared memory (received buffer of Specifies the FP2 serial data unit in CH1). slot no.0. The contents of the word indicated by I0 of the shared memory address 251 is read to the data register DT100.
FP2 Serial Data Unit Sample Programs Sample Programs 8.1.2 Time Out and Retry 8.1.2.1 An Overview of the Time Out and Retry Functions When a command is sent to another device and there is no response, this function can be used to send the command once again.
Page 96
, K0 , DT20 , K3 , K1 the shared memory (the sent buffer of CH1). Specifies the FP2 serial data unit in slot no.0. The contents of 3−word of data register DT20 to DT22 is written to the shared memory address 1 to 3.
FP2 Serial Data Unit Record of changes Record of changes Manual No. Date Description of changes ARCT1F310E/ MAR.2000 First edition ACG-M310E ARCT1F310E-1/ NOV.2006 Second edition ACG-M310E-1 ARCT1F310E-2/ NOV.2008 Third edition ACG-M310E-2 - Change in Corporate name ARCT1F310E-3 AUG.2011 Fourth edition...
Page 100
Record of changes FP2 Serial Data Unit R − 2...