Panasonic FP2 Series Скачать руководство пользователя страница 35

Confirming the Unit Settings and Design Contents

FP2 Serial Data Unit

3

7

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

9

8

7

6

5

4

3

2

1

0

Transmission speed

19200bps

0

0

1

9600bps

0

1

0

4800bps

0

1

1

2400bps

1

0

0

1200bps

1

0

1

600bps

1

1

0

300bps

1

1

1

Data length

7 bits

0

8 bits

1

Parity check

Invalid

0

0

Odd parity

0

1

Even parity

1

1

Stop bit length

1 bit

0

2 bits

1

Control signals CS

and CD

Invalid

0

and CD

Valid

1

End code

Any code (

*

1)

0

0

C

R

(H0D)

0

1

C

R

(H0D) and LF (H0A)

1

0

ETX (H03)

1

1

Start code

Invalid

0

STX (H02)

Valid

1

Notes

1) The desired end code (any code) should be registered in

addresses 1001 (COM.1) and 1002 (COM.2) of the shared

memory. For information on the shared memory, see section

7.2.

2) Bit position 11 to 15 of addresses 1003 (COM.1) and 1004

(COM.2) must always be set to “0”.

Содержание FP2 Series

Страница 1: ......

Страница 2: ...t are assured in these specifications Do not dismantle or remodel the product It could cause excessive exothermic heat or smoke generation Do not touch the terminal while turning on electricity It could lead to an electric shock Use the external devices to function the emergency stop and interlock circuit Connect the wires or connectors securely The loose connection could cause excessive exothermi...

Страница 3: ...s 2 3 2 1 1 Name of Parts 2 3 2 1 2 Operation Status Display LEDs 2 4 2 1 3 COM 1 and COM 2 Ports 9 pins 2 5 2 1 4 Transmission Format Setting Switch 2 5 Chapter 3 Confirming the Unit Settings and Design Contents 3 1 Signals of RS232C Connector 3 3 3 2 Setting the Transmission Speed and Transmission Format 3 5 3 2 1 Transmission Format Settings Set Using Switches 3 6 3 2 2 Transmission Format Sett...

Страница 4: ...tions Regarding Basic Operation of the Unit 5 3 5 1 1 Shared Memory Values When the Power Supply is Off 5 3 5 2 Precautions Concerning Communication 5 4 5 2 1 Precautions When a Start Code is Valid 5 4 5 2 2 End Codes for Communication 5 5 5 2 3 Operation If a Communication Error Occurs 5 5 5 2 4 Precautions Concerning a Software Reset 5 6 5 2 5 Precautions When Setting the Control Signals CS and ...

Страница 5: ...at 7 8 Chapter 8 Sample Programs 8 1 Sample Programs 8 3 8 1 1 Adding a BCC block check code 8 3 8 1 1 1 An Overview of the BCC 8 3 8 1 1 2 BCC Automatic Addition Sent Program 8 5 8 1 1 3 Received Program with BCC Check 8 7 8 1 2 Time Out and Retry 8 9 8 1 2 1 An Overview of the Time Out and Retry Functions 8 9 8 1 2 2 Time Out and Retry Program 8 9 8 2 Table of ASCII Codes 8 11 Record of changes ...

Страница 6: ...FP2 Serial Data Unit Table of Contents iv ...

Страница 7: ...l signal CS CD effective valid settings are fixed in the initial status but can be changed by writing different values to the shared memory There is no external reset switch The FP2 Serial Data Unit has no reset switch Both are connected to serial devices in the same way The specifications for the RS232C interface on the FP2 Serial Data Unit are the same as those of the FP3 Software compatibility ...

Страница 8: ...0 bps 1200 bps 600 bps 300 bps Data length 7 bits 8 bits Parity None Odd parity Even parity Stop bit 1 bit 2 bits Control signal CS CD Invalid CS CD Valid End code Any code CR 0DH CR 0DH and LF 0AH ETX 03H Start code Invalid Valid External reset switch No Yes 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...

Страница 9: ...2 External device The number of bits sent and received in one second is expressed as the communication speed 1 second SDU SD RD ERR SD RD ERR AL COM 1 COM 2 COM 1 RS232C COM 2 RS232C With the serial data unit the following transmission speeds can be selected 300 bps 600 bps 1200 bps 2400 bps 4800 bps 9600 bps and 19200 bps Data length Character bit With serial communication data characters are bro...

Страница 10: ...cter 0 1 Stop bit 1 1 Start bit 0 0 1 0 0 0 1 0 One data element character 0 1 1 Start bit 0 0 1 0 0 0 1 0 One data element character 0 1 Stop bit 1 Stop bit 1 With the serial data unit the start bits and stop bits are inserted automatically Stop bit length With serial communication one bit is normally used for the stop bit but if there is a lot of noise on the communication circuit or if the tran...

Страница 11: ...f Odd Parity is set the parity bit is set so that the total number of 1 bits in the data is an odd number 1 Start bit 0 0 1 0 1 0 1 One data element character 0 1 When the parity check is set to Even When the parity check is set to Odd Parity bit The bit is set to 1 so that the number of bits in the data is an even number 1 2 3 Number of 1 bits in the data is 3 Stop bit 1 Start bit 0 0 1 0 1 0 0 O...

Страница 12: ...ommunication if the receiving side cannot keep up with the sending side a request is made to temporarily stop the flow of data and then to restart it This is called flow control With the serial data unit the type of flow control used is a hardware flow in which CS Clear to send CD Received line signal detector and other control signals are used When flow control is carried out the control signals ...

Страница 13: ...ing the control signals CS and CD to Valid the CS of external device should be always on If the CS is off the communication service of the other channel will stop End code With the serial data unit up to 500 characters can be sent or received at one time The series of consecutive data elements characters being sent at one time is called a frame An end code indicates the end of this frame If there ...

Страница 14: ...de valid in the transmission format settings the data received between the STX and the next end code is considered to be one frame 1 frame Data Data FP2 External device End code ETX One frame extends from the start code to the end code Start code STX SDU SD RD ERR SD RD ERR AL COM 1 COM 2 COM 1 RS232C COM 2 RS232C With the serial data unit the start code can be set to either Invalid or Valid ...

Страница 15: ...ere using two typical examples of wiring shown below 3 line connection no RS or ER control with no flow control 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 1 Pin No Abbrev Pin No Symbol FP2 serial data unit side 9 pins RS232C device side 2 3 4 5 6 7 8 9 FG SD RD RS CS ...

Страница 16: ...R Protective ground Sent data Received data Request to send Clear to send Signal ground Received line signal detector Data terminal ready Signal name DR Shielding wire Not used With the serial data unit the signal lines of RS and ER are normally on Notes When using flow control with the serial data unit the Control Signals CS and CD setting in the transmission format settings should be set to Vali...

Страница 17: ...rts Number of Serial Data Unit 1 3 1 1 1 Features 1 3 1 1 2 Part Number of Unit 1 3 1 2 Function of Serial Data Unit 1 4 1 3 Restrictions on Units Combination 1 5 1 3 1 Restrictions on Current Consumption 1 5 1 3 2 Restrictions on Unit Installation Position 1 5 ...

Страница 18: ...FP2 Serial Data Unit Functions of Serial Data Unit 1 2 ...

Страница 19: ...D Data is written with the high level instruction F151 WRT Data input output processing takes place between the shared memory in the CPU of the unit and input output devices Data is read and written using the ladder program in the FP2 CPU unit Data is read from and written to an external device connected to the RS232C port through the shared memory installed in the serial data unit Two RS232C port...

Страница 20: ... shared memory in the serial data unit using the F150 READ and F151 WRT instructions Data sending and reception Data sending to and from external devices con nected to the RS232C port is handled through the shared memory in the serial data unit FP2 serial data unit Shared memory Data reception Data is read using the F150 READ instruction Reception completed flag contact goes on FP2 CPU unit FP2 se...

Страница 21: ...a unit FP2 SDU 60mA For information on the internal current consumption of other units see the FP2 FP2SH User s Manual and the manuals provided with the other units 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 res...

Страница 22: ...FP2 Serial Data Unit Functions of Serial Data Unit 1 6 1 3 Restrictions on Units Combination ...

Страница 23: ...apter 2 Parts and Functions 2 1 Parts and Functions 2 3 2 1 1 Name of Parts 2 3 2 1 2 Operation Status Display LEDs 2 4 2 1 3 COM 1 and COM 2 Ports 9 pins 2 5 2 1 4 Transmission Format Setting Switch 2 5 ...

Страница 24: ...FP2 Serial Data Unit Parts and Functions 2 2 ...

Страница 25: ...3 Transmission format setting switch This switch is used to specify the transmission speed and the data length parameters for the COM 1 port and COM 2 port The values set using this switch are automatically reflected in the settings when the power supply is turned on For other information on transmission format settings refer to section 3 2 4 Backplane connector This connector is used to connect t...

Страница 26: ... data monitoring RD g ee Blinks during reception RD green Goes out when there is no reception data Communication error ERR ed Lights when communication error occurs ERR red Goes out when normal frame is received COM 2 Sent data monitoring SD g ee Blinks during sending SD green Goes out when there is no sent data Received data monitoring RD g ee Blinks during reception RD green Goes out when there ...

Страница 27: ...Setting Switch This switch is used to specify the transmission speed and the data length parameters for the COM 1 port and COM 2 port The values set using this switch are automatically reflected in the settings when the power supply is turned on For other information on transmission format settings refer to section 3 2 For COM 1 port For COM 2 port Port Data bit position Function 1 2 3 4 5 6 7 8 C...

Страница 28: ... format in addition to using the transmission format setting switch DIP switch settings can also be entered by setting the data from the ladder program in the Transmission format setting area of the shared memory See section 3 2 2 Items which can be set using the transmission format settting switch Items which can be set in the shared memory transmission format settting switch DIP switch memory Tr...

Страница 29: ...ormat Settings Set Using Switches 3 6 3 2 2 Transmission Format Settings Using the Shared Memory 3 6 3 3 Confirming the I O Contacts and Slot Number 3 10 3 3 1 The Role of Input Output Contacts 3 10 3 3 2 Allocation of I O Contacts 3 10 3 3 3 Confirming the I O Allocation and Slot Number 3 11 3 3 3 1 Confirming the I O Number Allocations 3 11 3 3 3 2 Confirming Slot Number 3 12 ...

Страница 30: ...FP2 Serial Data Unit Confirming the Unit Settings and Design Contents 3 2 ...

Страница 31: ...it 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 RD Received data This is the signal line used when data is received from ...

Страница 32: ...ceived line signal detector is on Please be aware that if no on signal is received from the other device the serial data unit does not receive data and no data is taken into the received buffer If this signal line is not connected to the other device it should be connected to the ER Data Terminal Ready of the serial data unit ER Data terminal ready This signal line indicates that the mated serial ...

Страница 33: ...mission format parameters are set automatically to values determined ahead of time To change the values of these automatically set transmission format items set the changes in the shared memory and then turn the software reset Y1D function on and then off to make the changes effective Changing the transmission speed and transmission format Item Settings when shipped from factory Contents set by sw...

Страница 34: ...ion Format Settings Using the Shared Memory Transmission format values which are set automatically in advance when the power supply is turned on can be changed by changing the contents specified in the shared memory and turning the software reset Y1D on and then off again Procedure FP2 CPU unit FP2 serial data unit Shared memory 1003 1004 1003 1004 1003 1004 1003 1004 Y1D on X1E on Y1D on Transmis...

Страница 35: ...ps 1 0 1 600bps 1 1 0 300bps 1 1 1 Data length 7 bits 0 8 bits 1 Parity check Invalid 0 0 Odd parity 0 1 Even parity 1 1 Stop bit length 1 bit 0 2 bits 1 Control signals CS and CD Invalid 0 and CD Valid 1 End code Any code 1 0 0 CR H0D 0 1 CR H0D and LF H0A 1 0 ETX H03 1 1 Start code Invalid 0 STX H02 Valid 1 Notes 1 The desired end code any code should be registered in addresses 1001 COM 1 and 10...

Страница 36: ...nsmission format settings entered at the factory In the example shown in the following program the serial data unit is installed in slot 0 Transmission format settings when the unit is shipped from the factory Transmission speed 9600bps Control signals CS and CD Invalid Data length 8 bits End code CR Parity check odd Start code Invalid Stop bit 1 bit DF K0 DT100 K1 K1003 R9014 F151 WRT R9013 H 19A...

Страница 37: ...the factory settings 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 Bit No Setting contents 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 BCD H code 0 1 1 A To set the control signals CS and CD valid from the factory setting state first turn bit 7 on and then set the bit status to 0000 0001 1001 1010 This writes H 019A in the program above to the shared memory Bit status when control signals CS and CD are valid Start co...

Страница 38: ...X Output contact Y sends operation directives from the CPU unit to the serial data unit Sending directives Received buffer clear Software reset Input contact X Notifies the CPU unit of the serial data unit status Sending completed flag Reception completed flag Framing errors Parity errors Buffer full errors Reception message length error Sending message length error Software reset completed flag F...

Страница 39: ...is an example of FP2 serial data unit being mounted in succession following three 16 point I O units SDU SD RD ERR SD RD ERR AL COM 1 COM 2 COM 1 RS232C COM 2 RS232C FP2 CPU unit FP2 serial data unit X0 XF WX0 Y10 Y1F WY1 Y20 Y2F WY2 X30 to X2F WX3 Y40 to Y4F WY4 0 1 2 3 4 Slot No to to to 16 point output unit 16 point output unit 16 point output unit 16 point input unit Notes If there are any emp...

Страница 40: ...4 FP2 serial data unit Slot No Notes If the CPU unit being used is a 2 module type the slot number of the units incorporated in the CPU unit should be counted as 0 SDU SD RD ERR SD RD ERR AL COM 1 COM 2 COM 1 RS232C COM 2 RS232C 0 1 2 3 4 FP2 serial data unit Slot No 2 module type CPU unit If the CPU unit being used is a CPU unit with S LINK the slot number of the unit incorporated in the CPU unit...

Страница 41: ...e 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 16 17 18 19 20 21 FP2 serial data unit Slot No Expansion backplane CPU backplane COM 1 RS232C COM 2 RS232C ...

Страница 42: ...FP2 Serial Data Unit Confirming the Unit Settings and Design Contents 3 14 3 3 Confirming the I O Contacts and Slot Number ...

Страница 43: ...2 Receiving Data from External Device 4 5 4 2 Programming When Data is Sent 4 7 4 2 1 How Timings and Flags Contacts Work 4 7 4 3 Programming When Data is Received 4 10 4 3 1 How Timings and Flags Contacts Work 4 10 4 4 Sample Program 4 14 4 4 1 Sample Program FP series PLC MEWNETCOL COM 4 14 4 5 Data Sent and Received with the Serial Data Unit 4 20 ...

Страница 44: ...FP2 Serial Data Unit Communication with External Devices 4 2 ...

Страница 45: ...the F151 WRT and F150 READ instructions in a ladder program Sending and reception timing is handled by X and Y contacts allocated to the serial data unit 4 1 1 Sending Data to External Devices Overview of data sending FP2 CPU unit FP2 serial data unit Shared memory Data sending RS232C device Data writing using F151 WRT instruction Sending directive contact goes on After the data to be sent has bee...

Страница 46: ...n completed The 7 word contents of data register DT 0 to DT 7 is written to the shared memory addresses 1 to 7 The program described above is executed in the following sequence 1 ABC123DEF456 is converted to an ASCII code 2 Data with an end code H0D added is stored in a data register 3 The data is written to the sent buffer of the shared memory in the serial data unit 4 The Sending directive Y10 c...

Страница 47: ...5 DT100 R10 X1 Y11 F150 READ 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 The internal relay R10 is turned on at the Reception Completed X1 timing The data is read from the address 251 area of the shared memory the received buffer of CH1 When reception and reading of the data have been com...

Страница 48: ...32C device 2 Reception Completed X1 on After the received data has been stored in the data register the re ceived buffer is cleared Notes About the F95 ASC instruction This instruction converts the specified character 12 characters in length to an ASCII code and stores it in a 6 word area starting with the specified address About the end code If there is no end code in the data being sent data can...

Страница 49: ... slot in which the unit has been installed Communication is carried out using two contacts when data is sent and two contacts when it is received for each port Time chart when data is sent Sent data of RS232C port Operation steps Executed by serial data unit Executed by CPU unit 1 Sent data is created 2 Data is written to shared memory 3 Data is sent Sending directive flag goes on 4 Sending comple...

Страница 50: ...51 WRT R10 M ABC123DEF456 DT0 F95 ASC H 000D DT7 F0 MV 2 The data to be sent is written to the shared memory Using the F151 WRT instruction of the ladder program the data to be sent is written to the sent buffer of the shared memory in the serial data unit installed in slot 0 FP2 CPU unit FP2 serial data unit Shared memory Sent buffer Data writing using F151 WRT instruction RS232C device Data regi...

Страница 51: ...f and the contents of the sent buffer in the shared memory are cleared FP2 serial data unit Shared memory RS232C device Data register DT0 Sent buffer Sending directive Y10 off Sending completed flag X0 on FP2 CPU unit 6 The sending completed flag goes off When clearing of the sent buffer in the shared memory has been completed X0 Sending completed flag goes off FP2 serial data unit Shared memory R...

Страница 52: ...in which the unit has been installed Communication is carried out using two contacts when data is sent and two contacts when it is received for each port Time chart when data is received Received data of RS232C port Operation steps Executed by serial data unit Executed by CPU unit Shared memory of serial data unit Reception com pleted flag X1 Data register of CPU unit Received buffer cleared Y11 1...

Страница 53: ...ata unit 2 The reception completed flag goes on If the data is received with no problems the X1 Reception completed flag contact of the serial data unit goes on to notify the CPU unit that reception has been completed Shared memory RS232C device FP2 CPU unit FP2 serial data unit Reception completed X1 on Received buffer 3 The data is read from the shared memory At the timing at which the X1 Recept...

Страница 54: ...e shared memory are cleared FP2 CPU unit FP2 serial data unit Shared memory RS232C device Data register DT100 Reception completed X1 on Received buffer cleared Y11 on Received buffer 5 The reception completed flag goes off When the received buffer has been cleared the X1 Reception completed flag contact which went on when data was received from the RS232C port goes off FP2 CPU unit FP2 serial data...

Страница 55: ...ter the end code has been received the data is sent to the received buffer of the shared memory When consecutive data items are received Between operation steps 2 and 6 data sent from the RS232C device is stored in the port buffer At the point when operation step 6 has been completed if there is a frame in the port buffer that includes an end code it is sent to the received buffer of the shared me...

Страница 56: ...a register of the PLC connected to the system are sent as a response For example if the value K100 is stored in DT0 and the value K200 is stored in DT1 of the PLC 01 RD6400C800F1CR is sent as a response to the command If there is an error 01 OO CR is returned OO is the error code In addition to data area read and write commands the MEWTOCOL COM is also provided with contact area reading and writin...

Страница 57: ...Pin No Abbrev Pin No Symbol FP2 serial data unit side 9 pins FP1 COM port side 9 pins 2 3 4 5 6 7 8 9 FG SD RD RS CS SG CD ER 1 2 3 4 5 6 7 8 9 FG SD RD RS CS SG Protective ground Sent data Received data Request to send Clear to send Signal ground Received line signal detector Data terminal ready Signal name Not used ...

Страница 58: ...ted X1 on Data area read command and end code set in data register Data written with F151 Sending directive Y10 on Data area read command 01 RDD00000 00001 CR sent Sending completed X0 on Value of PLC data register on other side received If normal 01 RD6400C800 F1 CR If erroneous 01 OO ϕ ϕ CR Error code Data read with F150 BCC Communication setting For COM 1 port Setting contents Valid odd Invalid...

Страница 59: ...4 4 Sample Program Setting contents Data length Character bit 8bits Parity check Odd Stop bit length 1bit Start code None System register End code CR No 412 No 413 No 414 Set value K1 K3 K0 Computer link Transmission speed 19200bps FP0 FP1 system register setting ...

Страница 60: ...g of sending condition X20 01 RDD00000 is converted to ASCII code and written to DT100 to DT105 00001 is converted to ASCII code and written to DT106 to DT111 End code CR H0D sent to DT109 using digit move instruction F6 DGT so that it is inserted directly after the command Data written to address 1 area sent buffer of CH1 in shared memory After sending has started the send ing directive continues...

Страница 61: ...r side H46 Value of DT1 in the PLC on the other side F 1 BCC Extracting the data register values from the PLC on the other side In the program the data segment of the response from the PLC on the other side is converted to hexadecimal data using the F72 AHEX hexadecimal ASCII HEX conversion instruction and stored in DT50 and DT51 only if the character 1 stored in DT1 detected as a comparison instr...

Страница 62: ...the beginning of the data being sent The end code specified in the transmission format must always be added at the end of the data being sent When sending data The data written to the sent buffer of the shared memory is sent just as it is Also data is written to the shared memory in 1 byte units starting from the lowest byte of the word data Example When the data 12345 is sent as an ASCII code to ...

Страница 63: ...34 4 H35 5 H0D CR DT1 DT2 Upper byte Lower byte Upper byte Lower byte Upper byte Lower byte When receiving data The data of received area being read is ASCII code data Example When the data 12345CR is sent from an RS232C device When the received data is read from the shared memory to a data register it is stored as follows DT10 H31 1 H32 2 H33 3 H34 4 H35 5 H0D CR DT11 DT12 Upper byte Lower byte U...

Страница 64: ...FP2 Serial Data Unit Communication with External Devices 4 22 4 5 Data Sent and Received with the Serial Data Unit ...

Страница 65: ...y Values When the Power Supply is Off 5 3 5 2 Precautions Concerning Communication 5 4 5 2 1 Precautions When a Start Code is Valid 5 4 5 2 2 End Codes for Communication 5 5 5 2 3 Operation If a Communication Error Occurs 5 5 5 2 4 Precautions Concerning a Software Reset 5 6 5 2 5 Precautions When Setting the Control Signals CS and CD to Valid 5 6 ...

Страница 66: ...FP2 Serial Data Unit Precautions Regarding Serial Data Unit Operation and Programs 5 2 ...

Страница 67: ...mory that transmission format must be written to the shared memory after the power supply has been turned on again before communication can be carried out SDU SD RD ERR SD RD ERR AL COM 1COM 2 COM 1 RS232C COM 2 RS232C SDU SD RD ERR SD RD ERR AL COM 1COM 2 COM 1 RS232C COM 2 RS232C H 3231 H 3433 H 0D35 H 0 H 03 H 011A H 03 H 0 H 0 H 0 H 0 H 0 H 0 H 0 on off on Shared memory Shared memory Power sup...

Страница 68: ...reason the serial data unit waits for an end code to be received To prevent the system from waiting endlessly Send the data again from the RS232C device on the other side If the RS232C device on the other side is not capable of resend processing the sequence program should be set up so that time out and retry processing are carried out and a request is sent to the device on the other side to send ...

Страница 69: ...nt The data being sent should always be written so that it begins with a start code For sample time out and retry programs refer to section 8 1 2 5 2 2 End Codes for Communication When sending data If there is no end code in the data being sent a Sent message length error will occur and it will not be possible to send data from the serial data unit When receiving data If data is received without a...

Страница 70: ... initialization to be completed After initialization has been completed XE goes on When a software reset is carried out please be aware that both channels channel 1 and channel 2 are reset If an error occurs on one channel but communication is being carried out normally on the other a software reset will also clear the flags and buffers of the other channel so please use the software reset functio...

Страница 71: ... Serial Data Unit Lights 6 3 6 1 2 When the Serial Data Unit ERROR LED Lights 6 4 6 2 What To Do If An Error Occurs 6 5 6 2 1 If the ALARM LED Lights on the Serial Data Unit 6 5 6 2 2 If the ERROR LED on the Serial Data Unit Lights 6 5 6 2 3 If Data cannot be Sent or Received with the Serial Data Unit 6 6 ...

Страница 72: ...FP2 Serial Data Unit Operation If an Error Occurs 6 2 ...

Страница 73: ...ALARM LED on the serial data unit lights if the watchdog timer in the unit is activated to warn of a problem CPU unit operation when the ALARM LED lights The ERROR LED on the CPU unit lights and operation stops The error code to be checked using programming tools or other means is 41 intelligent unit error If it is necessary to interrupt operation change the setting of the CPU unit system register...

Страница 74: ...ROR LED Serial data unit operation when the ERROR LED lights Operation of the unit continues even if the ERROR LED lights If an error occurs during reception the frame currently being received is cleared and the ERROR LED lights If the next frame is received normally however that frame is processed as a received frame and the ERROR LED goes out CPU unit operation when the ERROR LED lights Operatio...

Страница 75: ...ntents of error and flags Applicable port Contents and solution COM1 COM2 X4 X9 A framing error has occurred This occurs when the data length or stop bit of the received data is different from the settings that have been entered Check the data length and stop bit settings X5 XA A parity error has occurred This occurs when the parity of the received data is different from the setting that has been ...

Страница 76: ...se a tester to check for conductivity If the serial data unit and cables have already been used successfully for communication and data cannot be sent or received try the following solutions to correct the problem Solution 2 Is the CPU unit in the RUN mode If not switch the operation mode of the CPU unit Solution 3 Do the communication speed and transmission format match those of the external devi...

Страница 77: ...Chapter 7 Specifications 7 1 Tables of Performance Specifications 7 3 7 2 Table of Shared Memory Areas 7 5 7 3 Table of I O Contacts 7 6 7 4 Transmission Format 7 8 ...

Страница 78: ...FP2 Serial Data Unit Specifications 7 2 ...

Страница 79: ...idity 30 to 85 RH at 25 C non condensing Ambient storage humidity 30 to 85 RH at 25 C non condensing Vibration resistance 10 to 55Hz 1cycle 1min double amplitude of 0 75mm 0 030in 10min Each in the X Y Z directions Shock resistance 98m s2 4 times in the X Y Z directions Noise immunity 1 000V p p with pulse widths 1μ sec 50n sec based on in house measurements Operating environment Free of corrosive...

Страница 80: ...rs Transmission unit In unit of messages to end code length can be changed Start code Invalid Note End code CR 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 32 points 16SX 16SY allocation Notes For the transmission speed 300...

Страница 81: ...d from the RS232C device is stored 1001 COM 1 End code setting area If Any code is specified only in the trans mission format any desired end code h ld b ifi d i h l b f hi 1002 COM 2 End code setting area ss o o at a y des ed e d code should be specified in the lower byte of this address 1003 COM 1 Transmission format setting area To change the transmission format set any desired transmission for...

Страница 82: ...he parity of the received data is different from the setting X6 Buffer full error Goes on if the received buffer is full X7 Received message length error Goes on if the frame length of the received data exceeds 500 bytes X8 Sent message length error Goes on if the frame length of the sent data exceeds 500 bytes X9 COM 2 Note 1 Framing error Goes on if the data length or stop bit of the received da...

Страница 83: ...s on Note 2 It should be turned off after the buffer has been cleared Y14 to Y1C Not used This should always be off Y1D Software reset Note 3 The software reset begins when this is turned on The I O contacts and ERROR LED go off This takes approximately 100 ms It should be turned off immediately after the software reset has begun XE has gone from on to off Y1E Not used This should always be off Y1...

Страница 84: ...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 Item Specifications Transmission speed 4800 9600 19200bps selecting possible using dip switch Data length Character bit 7 bits 8 bits selecting possible using dip switch Parity check Valid odd Stop bit length 1 bit Control signals CS and CD Invalid E...

Страница 85: ...anged The transmission format setting area is addresses 1003 COM 1 and 1004 COM 2 of the shared memory Transmission format setting item Bit setting of shared memory 15 to 11 10 9 8 7 6 5 4 3 2 1 0 Transmission speed 19200bps 0 0 1 9600bps 0 1 0 4800bps 0 1 1 2400bps 1 0 0 1200bps 1 0 1 600bps 1 1 0 300bps 1 1 1 Data length 7 bits 0 8 bits 1 Parity check Invalid 0 0 Odd parity 0 1 Even parity 1 1 S...

Страница 86: ...FP2 Serial Data Unit Specifications 7 10 7 4 Transmission Format ...

Страница 87: ...8 3 8 1 1 1 An Overview of the BCC 8 3 8 1 1 2 BCC Automatic Addition Sent Program 8 5 8 1 1 3 Received Program with BCC Check 8 7 8 1 2 Time Out and Retry 8 9 8 1 2 1 An Overview of the Time Out and Retry Functions 8 9 8 1 2 2 Time Out and Retry Program 8 9 8 2 Table of ASCII Codes 8 11 ...

Страница 88: ...FP2 Serial Data Unit Sample Programs 8 2 ...

Страница 89: ...ement is an even or an odd number but the BCC block check code can be used for a more sophisticated check FP2 Data sending Received data BCC FP1 Sent data BCC Sending side Receiving side Received data and BCC are compared and contents checked BCC is added based on contents of sent data SDU SD RD ERR SD RD ERR AL COM 1 COM 2 COM 1 RS232C COM 2 RS232C On the sending side this code is inserted just b...

Страница 90: ...a is converted to a 2 character ASCII code which is the BCC H30 ASCII H1B H31 H47 H30 H37 H41 H31 0 ESC 1 G 0 7 A 1 BCC CR H32 H41 Conversion of ASCII code 0001 1011 H1B 0011 0000 H30 0010 1011 0011 0001 H31 0001 1010 0100 0111 H47 0101 1101 0011 0000 H30 0110 1101 0011 0111 H37 0101 1010 0100 0001 H41 0001 1011 0011 0001 H31 0010 1010 H2A 2 A Command Exclusive OR XOR Exclusive OR XOR Exclusive OR...

Страница 91: ...K 100 DT0 F0 MV R0 CALL 0 DF Specifies the FP2 serial data unit in slot no 0 Internal relay R0 is turned on at timing of send condition X20 Commands are stored Command storage address Number of command bytes BCC creation routine call Data is written to address 1 of shared memory sent buffer of CH1 After sending has begun the send ing directive continues until sending has been completed Data is rea...

Страница 92: ...T 1 DT 13 F66 WOR I0DT 1 DT 2 K 2 F22 I1 R9010 DT 0 I0 F0 MV SUB 0 RET When reception and reading of the data have been completed Y11 goes on and the received buffer is cleared The command store address is stored in I0 The BCC is calculated The BCC is converted to an ASCII code A CR is added The number of data bytes is judged to be even or odd If odd the data is shifted one byte to the left The BC...

Страница 93: ...49 Auxiliary relay R0 is turned on at the timing of the reception com pleted flag X1 Data is read from address 1005 of the shared memory number of bytes received on CH1 at the timing of the reception completed flag X1 includ ing the end code BCC monitoring routine call When data has been received and read Y11 is turned on and the re ceived buffer is cleared BCC OK display BCC NG display Display is...

Страница 94: ... received words is read from address 251 of the shared memory received buffer of CH1 Block check code is calculated Number of bytes received is calcu lated not including BCC Block check code is calculated Result is converted from HEX to hexadecimal ASCII code BCC segment is extracted from re ceived data Number of received data bytes is judged to be even or odd Number of received data bytes is odd ...

Страница 95: ...32C COM 2 RS232C 8 1 2 2 Time Out and Retry Program With the program the command is sent again retried if more than 500 ms passes with no response returned from the other side Up to 5 retries can be carried out For this program the serial data unit should be installed in slot 0 X21 DF R100 R9013 M ABCD DT 20 F95 ASC H D DT 22 F0 MV TMX 0 K 5 C1000 R102 R100 X1 T0 R100 DF R101 T0 DF R102 The comman...

Страница 96: ...he shared memory the sent buffer of CH1 When reception and reading of the data have been completed Y11 is turned on and the received buffer is cleared After sending has begun the send ing directive continues until sending has been completed K0 K251 K8 DT200 F150 READ DF Data is read from address 251 of the shared memory received buffer of CH1 at the timing of the reception completed flag X1 Specif...

Страница 97: ...C1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US 0 1 0 2 SPACE 0 1 1 3 0 1 2 3 4 5 6 7 8 9 1 0 0 4 A B C D E F G H I J K L M N O 1 0 1 5 P Q R S T U V W X Y Z 1 1 0 6 a b c d e f g h i j k l m n o 1 1 1 7 p q r s t u v w x y z DEL 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 b7 b6 b5 b4 b3 b2 b1 b0 C R b7 b6 b5...

Страница 98: ...FP2 Serial Data Unit Sample Programs 8 12 8 2 Table of ASCII Codes ...

Страница 99: ...anual No Date Description of changes ARCT1F310E ACG M310E ARCT1F310E 1 ACG M310E 1 ARCT1F310E 2 ACG M310E 2 ARCT1F310E 3 MAR 2000 NOV 2006 NOV 2008 AUG 2011 First edition Second edition Third edition Change in Corporate name Fourth edition Change in Corporate name ...

Страница 100: ...Record of changes FP2 Serial Data Unit R 2 ...

Страница 101: ......

Страница 102: ......

Отзывы: