Presentation is loading. Please wait.

Presentation is loading. Please wait.

Date: 12.06.2016 File:PRO1_08E.1 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Digital Operations CMP ==I.

Similar presentations


Presentation on theme: "Date: 12.06.2016 File:PRO1_08E.1 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Digital Operations CMP ==I."— Presentation transcript:

1 Date: 12.06.2016 File:PRO1_08E.1 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Digital Operations CMP ==I IN1 IN2 IW0 IW2 M0.0 Q 9.7 T4 S_ODT TV S Q BCD BI R I 0.7 I 0.5 S5T#35s Q8.5 MW0 QW12

2 Date: 12.06.2016 File:PRO1_08E.2 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Number Formats (16 Bits) BCD INTEGER BCD 2 8 = 256 + 0000000100101000 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 2 5 = 32 + 2 3 = 8 = 296 0000001010010110 296Sign (+) 1111010000010011 413Sign (-) W#16#F413 2 7 = 128 + 1111111001100011 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 2 3 = 8+2 = 4 = 412 2 8 = 256+ 2 4 = 16+ - (412 + 1) = - 413 Negative Numbers INTEGER Positive Numbers W#16#296 +296 -413 PGCPU

3 Date: 12.06.2016 File:PRO1_08E.3 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Number Formats (32 Bits) Real No = +1,5 * 2 126-127 = 0,75 DW#16#296 +296 +0.75 or +7.5 E-1 00000001001010000000000000000000 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 031 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 2 8 = 256 + 2 5 = 32 + 2 3 = 8 = 296 Integer (32 Bit) = 00000000000000000001111110100000 Sign of Real No 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 031 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 e = Exponent (8 Bit) f = Mantissa (23 Bit) General Format of a Real Number = (Sign) (1.f) (2 e-127 ) 2020 21212 2323 2424 2525 2626 2727 2 -23 2 -1 2 -2 2- 4.....2 -3 0000 000Sign (+) 0000001010010110 2960 000000000000 BCD DINT REAL

4 Date: 12.06.2016 File:PRO1_08E.4 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Examples of Load Loading and Transferring Data (1) L +5//16-bit constant (Integer) L L#523123//32-bit constant (Double Integer) L B#16#EF//byte in hexadecimal form. L 2#0010 0110 1110 0011//16-bit binary value L 3.14//32-bit constant (Real) MOVE EN IN OUT ENO MB5 5 FBD L+5 TMB5 STL MOVE EN OUT ENO MB5 LAD IN5

5 Date: 12.06.2016 File:PRO1_08E.5 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Loading and Transferring Data (2) 0000000000000000 : L W#16#CAFE L W#16#AFFE : XXXXXXXXCAFEAFFE Content of ACCU2 Content of ACCU1 Programm YYYYYYYY XXXXXXXX 0000CAFE

6 Date: 12.06.2016 File:PRO1_08E.6 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Loading and Transferring Data (3) 31231570 000000000000000000000000MB0 31231570 0000000000000000MB1MB0 31231570 MB3MB2MB0MB1 Load L MB 0 Program T QD 4 QD 4 QW 4 QB 4 Transfer Contents of ACCU1 L MW 0 L MD 0 T QW 4 T QB 4

7 Date: 12.06.2016 File:PRO1_08E.7 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives S5 Counters in STEP 7 STL AI0.4 CUC5 AI0.5 CDC5 AI0.3 LC#20 SC5 AI0.7 RC5 LC5 TMW4 LCC5 TQW12 AC5 =Q8.3 LAD FBD Q I 0.4 I 0.5 CU I 0.7 C#20 S_CUD CD S I 0.3 PV R Q 8.3 CV CV_BCD MW 4 QW 12 C5 Q Q I 0.4 I 0.5 CU I 0.7 C#20 S_CUD CD SI 0.3 PV R Q 8.3 CV CV_BCD MW 4 QW 12 C5 = Q

8 Date: 12.06.2016 File:PRO1_08E.8 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Counters: Function Diagram CU CD S R Q Count 5 4 3 2 1 0

9 Date: 12.06.2016 File:PRO1_08E.9 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Counters: Bit Instructions STL AI 0.0 LC#20 SC5 AI 0.1 CUC5 AI 0.2 CDC5 AC5 = Q 4.0 LAD I 0.0C5 SC C#20 Network 1: C5 Network 2: I 0.1 CU Network 3: I 0.2C5 CD Network 4: C5Q 4.0 FBD SC C5 I 0.0 C#20CV CU C5 I 0.1 CD C5 I 0.2 = Q 4.0 C5

10 Date: 12.06.2016 File:PRO1_08E.10 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Exercise: Counting the Transported Parts (FC 18) V 0 8 1 5 AI1AI2AO1AO2 AI2 AI1 -15V...+15V AI1 AI2 AO1 AO2 V DI I 0.0 I 0.1 I 0.2 I 0.3 I 0.4 I 0.5 I 0.6 I 0.7 DO.0.1.2.3.4.5.6.7 AUTO / MANUAL System_ON Accept System MANUAL AUTO System_OFF Q 8.... Q 4.... Jog_RIGHT Jog_LEFT QW 12 / QW 6 ACTUAL number of parts

11 Date: 12.06.2016 File:PRO1_08E.11 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Timers: ON Delay (SD) LAD T4 S_ODT TV S Q BCD BI R I 0.7 I 0.5 S5T#35s Q8.5 MW0 QW12 FBD S_ODT TV Q BI R I 0.7 I 0.5 S5T#35s MW0 QW12 T4 BCD = Q8.5 S STL AI 0.7 LS5T#35s SDT4 AI 0.5 RT4 LT4 TMW0 LCT4 TQW12 AT4 =Q8.5 Example RLO at S RLO at R Timer operation Q Time value: 0... 999 0.01s <-- 0.1s <-- 1s <-- 10s <-- 00 01 10 11 Data type “S5TIME”

12 Date: 12.06.2016 File:PRO1_08E.12 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Timers: Time Formats for S5 Timers in STEP 7 Format for time specifications Timer cell in system data memory ACCU contents after “LC T...”ACCU contents after “L T...” Time base 10 2 10 1 10 0 Time value (BCD code)Time baseTime value (Binary number)Time base 10 2 10 1 10 0 Time value (BCD code)Time value (Binary number) XXXXXXXXXXXXXX

13 Date: 12.06.2016 File:PRO1_08E.13 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Timers: Stored ON Delay (SS) STL AI 0.7 LS5T#35s SST4 AI 0.5 RT4 LT4 TMW0 LCT4 TQW12 AT4 =Q8.5 LAD T4 S_ODTS TV S Q BCD BI R I 0.7 I 0.5 S5T#35s Q8.5 MW0 QW12 FBD S_ODTS TV Q BI R I 0.7 I 0.5 S5T#35s MW0 QW12 T4 BCD = Q8.5 S Example RLO at S RLO at R Timer operation Q

14 Date: 12.06.2016 File:PRO1_08E.14 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Timers: Pulse (SP) FBD S_PULSE TV Q BI R I 0.7 I 0.5 S5T#35s MW0 QW12 T4 BCD = Q8.5 S RLO at S RLO at R Timer operation Q Example STL AI 0.7 LS5T#35s SPT4 AI 0.5 RT4 LT4 TMW0 LCT4 TQW12 AT4 =Q8.5 MW0 LAD T4 S_PULSE TV S Q BCD BI R I 0.7 I 0.5 S5T#35s Q8.5 QW12

15 Date: 12.06.2016 File:PRO1_08E.15 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Timers: Extended Pulse (SE) LAD T4 S_PEXT TV S Q BCD BI R I 0.7 I 0.5 S5T#35s Q8.5 MW0 QW12 FBD S_PEXT TV Q BI R I 0.7 I 0.5 S5T#35s MW0 QW12 T4 BCD = A8.5 S RLO at S RLO at R Timer Operation Q Example STL AI 0.7 LS5T#35s SET4 AI 0.5 RT4 LT4 TMW0 LCT4 TQW12 AT4 =Q8.5

16 Date: 12.06.2016 File:PRO1_08E.16 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Timers: OFF Delay (SF) STL AI 0.7 LS5T#35s SFT4 AI 0.5 RT4 LT4 TMW0 LCT4 TQW12 AT4 =Q8.5 LAD T4 S_OFFDT TV S Q BCD BI R I 0.7 I 0.5 S5T#35s Q8.5 MW0 QW12 FBD S_OFFDT TV Q BI R I 0.7 I 0.5 S5T#35s MW0 QW12 T4 BCD = Q8.5 S Example RLO at S RLO at R Timer operation Q

17 Date: 12.06.2016 File:PRO1_08E.17 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Timers: Bit Instructions I 0.0T4 SD S5T#5s T4Q 8.0 I 0.1T4 R Network 1: Network 2: Network 3: LAD & SD T4 I 0.0 S5T#5s &= Q 8.0 T4 & I 0.1 TV R T4 FBD AI 0.0 LS5T#5s SDT4 AT4 = Q 8.0 AI 0.1 RT4 STL

18 Date: 12.06.2016 File:PRO1_08E.18 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Exercise: Monitoring of the Transport Functions (FC 17) V 0 8 1 5 AI1AI2AO1AO2 AI2 AI1 -15V...+15V AI1 AI2 AO1 AO2 V DI I 0.0 I 0.1 I 0.2 I 0.3 I 0.4 I 0.5 I 0.6 I 0.7 DO.0.1.2.3.4.5.6.7 AUTO / MANUAL System_ON Accept System MANUAL AUTO System_OFF Q 8.... Q 4.... Jog_RIGHT Jog_LEFT QW 12 / QW 6 ACTUAL number of parts Ack_Dist Disturbance Weight I 1.0

19 Date: 12.06.2016 File:PRO1_08E.19 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Conversion Operations BCD Integer IN BCD_I EN ENO OUT IN I W4 MW20 IN I_BCD EN ENO OUT IN MW10 QW12 FBD LI W4 BTI TMW20 LMW10 ITB TQW12 STL 0 8 1 5 Number entered in BCD Number displayed in BCD Conversion BCD->Integer Task Conversion BCD<-Integer User program with integer math operations 0 24 8 IN BCD_I EN ENO OUT IN I W4 MW20 I_BCD IN ENENO OUT MW10 QW12 LAD

20 Date: 12.06.2016 File:PRO1_08E.20 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Comparison Operations STL AM0.0 A ( LI W0 LI W2 ==I ) =Q9.7 LAD CMP ==I IN1 IN2 I W0 I W2 M0.0 Q 9.7 FBD IN1 IN2 M0.0 I W0 I W2 & = Q9.7 CMP ==I

21 Date: 12.06.2016 File:PRO1_08E.21 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives LADFBDSTL Basic Mathematical Functions Subtrac- tion Multipli- cation Division Addition LMW4 LMW10 + I TMW6 MW10 ADD_I IN2 EN ENO OUT IN1 MW4 MW6 MW10 ADD_I IN2 EN ENO OUT IN1 MW4 MW6 SUB_I IN2 EN ENO IN1 MW5 MW11 MW7 OUT MW11 SUB_I IN2 EN ENO OUT IN1 MW5 MW7 LMW5 LMW11 - I TMW7 MD6 MD12 MUL_R EN ENO IN1 MD66 IN2 MD12 MUL_R IN2 EN ENO OUT IN1 MD6 MD66 LMD6 LMD12 * R TMD66 MD40 MD4 EN ENO IN1 IN2 MD32 OUT DIV_R MD4 DIV_R IN2 EN ENO OUT IN1 MD40 MD32 LMD40 LMD4 / R TMD32

22 Date: 12.06.2016 File:PRO1_08E.22 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Exercise: Counting the Transported Parts (FC 18) V 0 8 1 5 AI1AI2AO1AO2 AI2 AI1 -15V...+15V AI1 AI2 AO1 AO2 V DI I 0.0 I 0.1 I 0.2 I 0.3 I 0.4 I 0.5 I 0.6 I 0.7 DO.0.1.2.3.4.5.6.7 AUTO / MANUAL System_ON Accept System MANUAL AUTO System_OFF Q 8.... Q 4.... Jog_RIGHT Jog_LEFT QW 12 / QW 6 ACTUAL number of parts Ack_Dist Disturbance SETPOINT number of parts Weight IW 4 / IW 2 I 1.0

23 Date: 12.06.2016 File:PRO1_08E.23 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Conversion Operations I -> DI -> REAL AWL LMW12 ITD DTR TMD26 IN I_DI EN ENO OUT IN MW12 MD14 IN DI_R EN ENO OUT IN MD14 MD26 FBDFBD Math program with real numbers Conversion from double integer to real number Conversion from integer to double integer Task Data in integer format (16 bits) LAD IN DI_R ENENO OUT MD14 MD26 IN I_DI ENENO OUT MW12MD14 IN

24 Date: 12.06.2016 File:PRO1_08E.24 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Digital Logic Operations LIW 0 LW#16#5F2A AW / OW / XOW TMW10 015 IW0 = W#16#5F2A = WAND_W WXOR_W WOR_W EN ENO IN2 OUT W#16#5F2A MW10 IN1IW0 0111100000000000 0111100000011111 XOR MW10 nach “XOW” 1111111000000000 OR MW10 after “OW” 0111000001111111 AND MW10 after “AW” 0111000000000000


Download ppt "Date: 12.06.2016 File:PRO1_08E.1 SIMATIC S7 Siemens AG 2000. All rights reserved. SITRAIN Training for Automation and Drives Digital Operations CMP ==I."

Similar presentations


Ads by Google