Panasonic FP2 User Manual

Serial data unit
Hide thumbs Also See for FP2:
Table of Contents

Advertisement

Advertisement

Table of Contents
loading

Summary of Contents for Panasonic FP2

  • 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.
  • Page 3: Table Of Contents

    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 6 Table of Contents FP2 Serial Data Unit...
  • 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.
  • Page 17: Features And Parts Number Of Serial Data Unit

    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.
  • Page 20: Function Of Serial Data Unit

    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.
  • Page 21: Restrictions On Units Combination

    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...
  • Page 23: Parts And Functions

    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 .
  • Page 29: Signals Of Rs232C Connector

    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...
  • Page 31: Signals Of Rs232C Connector

    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.
  • Page 35: 3.2 Setting The Transmission Speed And Transmission Format

    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...
  • Page 38: Confirming The I/O Contacts And Slot Number

    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:...
  • Page 39: Confirming The I/O Allocation And Slot Number

    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.
  • Page 40: Confirming Slot 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...
  • Page 45: Overview Of Communication With External Devices

    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.
  • Page 47: Receiving Data From External Device

    , 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...
  • Page 49: Programming When Data Is Sent

    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...
  • Page 52: Programming When Data Is Received

    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.
  • Page 56: Sample 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.
  • Page 62: Data Sent And Received With The Serial Data Unit

    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...
  • Page 67: Precautions Regarding Basic Operation Of The Unit

    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.
  • Page 68: Precautions Concerning Communication

    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.
  • Page 69: End Codes For Communication

    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.
  • Page 70: Precautions Concerning A Software Reset

    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...
  • Page 73: Operation If An Error Occurs

    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.
  • Page 74: When The Serial Data Unit Error Led Lights

    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.
  • Page 75: What To Do If An Error Occurs

    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.
  • Page 76: If Data Cannot Be Sent Or Received 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...
  • Page 79: Tables Of Performance Specifications

    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...
  • Page 81: Table Of Shared Memory Areas

    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”...
  • Page 82: Table Of I/O Contacts

    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.
  • Page 84: Transmission Format

    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...
  • Page 87 Chapter 8 Sample Programs Sample Programs ....... 8 − 3 8.1.1 Adding a BCC (block check code) .
  • Page 88 Sample Programs FP2 Serial Data Unit 8 − 2...
  • Page 89: Adding A Bcc (Block Check Code)

    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.
  • Page 91: Bcc Automatic Addition Sent Program

    , 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.
  • Page 93: Received Program With Bcc Check

    , 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.
  • Page 95: Time Out And Retry

    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.
  • Page 97: Table Of Ascii Codes

    FP2 Serial Data Unit Sample Programs Table of ASCII Codes Table of ASCII Codes SPACE ‘ ” & ’ < ¥ − > — 8 − 11...
  • Page 98 Sample Programs FP2 Serial Data Unit Table of ASCII Codes 8 − 12...
  • Page 99: Record Of Changes

    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...

Table of Contents