Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual ยท part 9 of 18

Simatic S5 to RSLogix 5000 Application Conversion Guide: Chapter 3: Software Conversions Instructions, pages 62 to 70

Pages 62 to 70 of 140, from Simatic S5 to RSLogix 5000 Application Conversion Guide

The original document is the PDF (3.5 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 Siemens 6ES5-431-8MA11, Siemens 6ES5-451-8MA11 and Siemens 6ES5-452-8MR11

Page 62

Chapter 3

Software Conversions Instructions

SIMATIC S5 - Ladder

RSLogix 5000 - Ladder where timer T5 is defined as data type TIMER in the program tags as follows.

62

Publication LOGIX-AP010B-EN-P - May 2010

Page 63

Software Conversions Instructions

Chapter 3

Counter - UP The following example shows how a COUNTUP function in SIMATIC S5 can be converted into a similar function in RSLogix 5000 for Statement List and Ladder formats. The RSLogix 5000-equivalent bit/word for each bit/word used in the S5 in the following example is shown below. Function Counter Preset Counter Reset Count Up Output

S5 Statement List A L S A R A CU A =

I4.0 DW20 C1 I4.1 C1 I4.2 C1 C1 Q4.0

Publication LOGIX-AP010B-EN-P - May 2010

S5 DW20 I4.1 I4.2 Q2.0

RSLogix 5000 data_word1 data_bit2 data_bit1 out_bit1

RSLogix 5000 Structured Text C1.Pre := data_word1; C1.Reset := data_bit2; C1.CUEnable := data_bit1; CTUD(C1); out_bit1 := C1.DN; where timer C1 is defined as data type FBD_COUNTER in the program tags as follows.

63

Page 64

Chapter 3

Software Conversions Instructions

SIMATIC S5 - Ladder

RSLogix 5000 - Ladder where timer COUNTER is defined as data type COUNTER in the program tags as follows.

64

Publication LOGIX-AP010B-EN-P - May 2010

Page 65

Software Conversions Instructions

Chapter 3

Counter - DOWN The following example shows how a COUNTDOWN function in SIMATIC S5 can be converted into a similar function in RSLogix 5000 for Statement List and Ladder formats. The RSLogix 5000-equivalent bit/word for each bit/word used in the S5 in the following example is shown below. Function Counter Preset Counter Reset Count Down Output S5 Statement List A L S A R A CD A =

I4.0 DW20 C1 I4.1 C1 I4.2 C1 C1 Q2.0

Publication LOGIX-AP010B-EN-P - May 2010

S5 DW20 I4.1 I4.2 Q2.0

RSLogix 5000 data_word1 data_bit2 data_bit1 out_bit1 RSLogix 5000 Structured Text C1.Pre := data_word1; => space before := C1.Reset := data_bit2; C1.CDEnable := data_bit1; CTUD(C1); out_bit1 := C1.DN; where counter C1 is defined as data type FBD_COUNTER is the program tags as follows.

65

Page 66

Chapter 3

Software Conversions Instructions

SIMATIC S5 - Ladder

RSLogix 5000 - Ladder where counter COUNTDOWN is defined as data type COUNTER is the program tags as follows.

66

Publication LOGIX-AP010B-EN-P - May 2010

Page 67

Software Conversions Instructions

Chapter 3

Comparison - Equal In the following comparison function the two operands are compared and if found to be equal then the output is set to 1. The RSLogix 5000-equivalent bit/word for each bit/word used in the S5 in the following example is shown below: Function Operand1 Operand2 Output S5 Statement List L IB19 L IB20 !=F = Q3.0

S5 IB19 IB20 Q3.0

RSLogix 5000 data_word1 data_word2 out_bit1 RSLogix 5000 Structured Text If data_word1 = data_word2 THEN out_bit1 := 1; else out_bit1 := 0; END_IF; SIMATIC S5 - Ladder

RSLogix 5000 - Ladder

Publication LOGIX-AP010B-EN-P - May 2010

67

Page 68

Chapter 3

Software Conversions Instructions

Comparison - Greater Than In the following comparison function the Operand 1 is compared to Operand 2 and if Operand 1 > Operand 2 then the output is set to 1. The RSLogix 5000 equivalent bit/word for each bit/word used in the S5 in the following example is shown below: Function Operand 1 Operand 2 Output S5 Statement List L IB19 L IB20 >F = Q3.0

S5 IB19 IB20 Q3.0

RSLogix 5000 data_word1 data_word2 out_bit1 RSLogix 5000 Structured Text If data_word1 > data_word2 THEN out_bit1 := 1; else out_bit1 := 0; END_IF; SIMATIC S5 - Ladder

RSLogix 5000 - Ladder

68

Publication LOGIX-AP010B-EN-P - May 2010

Page 69

Software Conversions Instructions

Chapter 3

Comparison - Less Than In the following comparison function the Operand 1 is compared to Operand 2 and if Operand 1 < Operand 2 then the output is set to 1. The RSLogix 5000 equivalent bit/word for each bit/word used in the S5 in the following example is shown below: Function Operand 1 Operand 2 Output S5 Statement List L IB19 L IB20 <F = Q3.0

S5 IB19 IB20 Q3.0

RSLogix 5000 data_word1 data_word2 out_bit1 RSLogix 5000 Structured Text If data_word1 < data_word2 THEN out_bit1 := 1; else out_bit1 := 0; END_IF; SIMATIC S5 - Ladder

RSLogix 5000 - Ladder

Publication LOGIX-AP010B-EN-P - May 2010

69

Page 70

Chapter 3

Software Conversions Instructions

Comparison - Not Equal In the following comparison function the two operands are compared and if found to be NOT equal then the output is set to 1. The RSLogix 5000 equivalent bit/word for each bit/word used in the S5 in the following example is shown below: Function Operand1 Operand2 Output S5 Statement List L IB19 L IB20 >< F = Q3.0

S5 IB19 IB20 Q3.0

RSLogix 5000 data_word1 data_word2 out_bit1 RSLogix 5000 Structured Text If data_word1 <> data_word2 THEN out_bit1 := 1; else out_bit1 := 0; END_IF; SIMATIC S5 - Ladder

RSLogix 5000 - Ladder

70

Publication LOGIX-AP010B-EN-P - May 2010