Date:30.09.2014 File:PRO1 07E.1 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Числовые операции.

Презентация:



Advertisements
Похожие презентации
D:\Daten\Bilder\SITRAIN-Pfeil\Sitrainpfeil Entwurf2.tif
Advertisements

Date: File:PRO1_08r.1 SIMATIC ® S7 Siemens AG Все права защищены. SITRAIN Training for Automation and Drives Числовые операции 2 CMP ==I.
Datum: 9/30/2014 Datei:SYH_K9D.1 SIMATIC S7 Siemens AG All rights reserved. Informations- und Trainings-Center Wissen for Automatisierung Команды.
Date: File:PRO2_03E.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Инструкции для.
Date: File:PRO1_05E.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Редактирование.
Date: File:PRO2_02E.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Функции с аккумуляторами.
Date: File:Micro 06D.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Логические.
Date: File: PRO1_17E.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Решения (Вариант.
Date: File:PRO2_01E.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Инструкции, зависимые.
Date: File:PRO1_09E.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Функции тестирования.
Date: File:UPPROG_05E.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Редактирование.
Date: File:PRO1_08E.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Символика.
Date: File:MICRO_12D.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Специальные.
Date: File:PRO1_07r.1 SIMATIC ® S7 Siemens AG Все права защищены. SITRAIN Training for Automation and Drives Двоичные операции I 0.0I 0.1.
Date: File:UPPROG_08E.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Функции тестирования.
Date: File:MICRO_04D.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Конфигурация.
Date: File:MICRO_05D.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Редактирование.
Date: File: PRO1_17E.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Решения (Вариант.
Date: File:UPPROGE.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Символьные обозначения.
Date: File:PRO1_02E.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation SIMATIC Manager.
Транксрипт:

Date: File:PRO1_07E.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Числовые операции CMP ==I IN1 IN2 IW0 IW2 M0.0 Q 9.7 T4 S_ODT TV S Q BCD BI R I0.7 I0.5 S5T#35s Q8.5 MW0 QW12

Date: File:PRO1_07E.2 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Форматы чисел (16 бит) BCD INTEGER BCD 2 8 = = = 8 = Sign (+) Sign (-) W#16#F = = 8+2 = 4 = = = ( ) = Отрицат. числа INTEGER Положит. числа W#16# PGCPU

Date: File:PRO1_07E.3 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Форматы чисел (32 бит) Число real = +1,5 * = 0,75 DW#16# или +7.5 E = = = 8 = 296 Integer (32 Bit) = Знак числа real e = Экспонента (8 бит) f = Мантисса (23 бит) Общий формат для числа real = (Знак) (1.f) (2 e-127 ) Sign (+) BCD DINT REAL

Date: File:PRO1_07E.4 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Примеры загрузки: Загрузка и передача данных (1) L +5// 16-бит константа L L# // 32-бит константа L B#16#EF// Байт в 16-ичном формате L 2# // 16-бит двоичное значение L TOD#1:10:3.3// 32-бит константа time of day MOVE EN IN OUT ENO MB5 5 FBD L+5 TMB5 STL MOVE EN OUT ENO MB5 LAD IN5

Date: File:PRO1_07E.5 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Загрузка и передача данных (2) : L W#16#CAFE L W#16#AFFE : XXXXXXXXCAFEAFFE Содержимое ACCU2 Содержимое ACCU1 Программа YYYYYYYY XXXXXXXX 0000CAFE

Date: File:PRO1_07E.6 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Загрузка и передача данных (3) MB MB1MB MB3MB2MB0MB1 Загрузка L MB 0 Программа T QD 4 QD 4 QW 4 QB 4 Передача Содержимое ACCU1 L MW 0 L MD 0 T QW 4 T QB 4

Date: File:PRO1_07E.7 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Таймеры: формат таймера для S5 Timer в STEP 7 Формат задания времени Ячейка таймера в системной памяти Содержимое ACCU после LC T...Содержимое ACCU после L T... База времени Значение времени (BCD код)База времени Значение времени (Двоичный код) База времени Значение времени (BCD код) Значение времени (Двоичный код) XXXXXXXXXXXXXX

Date: File:PRO1_07E.8 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Таймеры: ON Delay (SD) - задержка включения LAD T4 S_ODT TV S Q BCD BI R I0.7 I0.5 S5T#35s Q8.5 MW0 QW12 FBD S_ODT TV Q BI R I0.7 I0.5 S5T#35s MW0 QW12 T4 BCD = Q8.5 S STL AI0.7 LS5T#35s SDT4 AI0.5 RT4 LT4 TMW0 LCT4 TQW12 AT4 =Q8.5 Пример RLO на входе S RLO на входе R Содержимое таймера Q Значение времени: ,01s

Date: File:PRO1_07E.9 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Таймеры: Stored ON Delay (SS) - задержка включения с запоминанием STL AI0.7 LS5T#35s SST4 AI0.5 RT4 LT4 TMW0 LCT4 TQW12 AT4 =Q8.5 LAD T4 S_ODTS TV S Q BCD BI R I0.7 I0.5 S5T#35s Q8.5 MW0 QW12 FBD S_ODTS TV Q BI R I0.7 I0.5 S5T#35s MW0 QW12 T4 BCD = Q8.5 S Пример RLO на S RLO на R Содержимое таймера Q

Date: File:PRO1_07E.10 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Таймеры: OFF Delay (SF) - задержка выключения STL AI0.7 LS5T#35s SFT4 AI0.5 RT4 LT4 TMW0 LCT4 TQW12 AT4 =Q8.5 LAD T4 S_OFFDT TV S Q BCD BI R I0.7 I0.5 S5T#35s Q8.5 MW0 QW12 FBD S_OFFDT TV Q BI R I0.7 I0.5 S5T#35s MW0 QW12 T4 BCD = Q8.5 S Пример RLO на S RLO на R Содержимое таймера Q

Date: File:PRO1_07E.11 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Таймеры: Pulse (SP) - импульс FBD S_PULSE TV Q BI R I0.7 I0.5 S5T#35s MW0 QW12 T4 BCD = Q8.5 S RLO на S RLO на R Содержимое таймера Q Пример STL AI0.7 LS5T#35s SPT4 AI0.5 RT4 LT4 TMW0 LCT4 TQW12 AT4 =Q8.5 MW0 LAD T4 S_PULSE TV S Q BCD BI R I0.7 I0.5 S5T#35s Q8.5 QW12

Date: File:PRO1_07E.12 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Таймеры: Extended Pulse (SE) - удлиненный импульс LAD T4 S_PEXT TV S Q BCD BI R I0.7 I0.5 S5T#35s Q8.5 MW0 QW12 FBD S_PEXT TV Q BI R I0.7 I0.5 S5T#35s MW0 QW12 T4 BCD = A8.5 S RLO на S RLO на R Содержимое таймера Q Пример STL AI0.7 LS5T#35s SET4 AI0.5 RT4 LT4 TMW0 LCT4 TQW12 AT4 =Q8.5

Date: File:PRO1_07E.13 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Таймеры: битовые команды I0.0T4 SD S5T#5s T4Q 8.0 I0.1T4 R Network 1: Network 2: Network 3: LAD & SD T4 I0.0 S5T#5s &= Q 8.0 T4 & I0.1 TV R T4 FBD AI0.0 LS5T#5s SDT4 AT4 = Q 8.0 AI0.1 RT4 STL

Date: File:PRO1_07E.14 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Упражнение T4 S_PEXT S TV R BI BCD Q I 0.7 S5T#5s I 0.5 Q 8.0 I 0.7 I 0.5 Q8.0 T4 S_PULSE S TV R BI BCD Q I 0.7 S5T#5s I 0.5 Q 8.0 I 0.7 I 0.5 Q8.0 5s T4 S_ODT S TV R BI BCD Q I 0.7 S5T#5s I 0.5 Q 8.0 I 0.7 I 0.5 Q8.0 T4 S_ODTS S TV R BI BCD Q I 0.7 S5T#5s I 0.5 Q 8.0 I 0.7 I 0.5 Q8.0 I 0.7 I 0.5 Q8.0 T4 S_OFFDT S TV R BI BCD Q I 0.7 S5T#5s I 0.5 Q 8.0

Date: File:PRO1_07E.15 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation S5 счетчики в 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 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

Date: File:PRO1_07E.16 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Счетчики: битовые инструкции STL AI0.0 LC#20 SC5 AI0.1 CUC5 AI0.2 CDC5 AC5 = Q 4.0 LAD I0.0C5 SC C#20 Network 1: C5 Network 2: I0.1 CU Network 3: I0.2C5 CD Network 4: C5Q 4.0 FBD SC C5 I0.0 C#20CV CU C5 I0.1 CD C5 I0.2 = Q 4.0 C5

Date: File:PRO1_07E.17 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Счетчики: диаграмма работы CU CD S R Q Count

Date: File:PRO1_07E.18 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Главный контейнер Q 9.0 (Q 5.0) Заполнение Датчик бутылки I 16.6 (I 8.6) Датчик бутылки I 16.5 (I 8.5) Датчик бутылки I 16.7 (I 8.7) Упражнение: Программа для установки розлива бутылок (Цикл заполнения и подсчет бутылок) Q 20.5 (Q 8.5) Конвейер вперед Q 20.6 (Q 8.6) Конвейер назад I 0.0 = Start (NO контакт) I 0.1 = Stop (NC контакт) Конвейер ON/OFF: I 0.4 = Ручной /Автоматический I 0.5 = подтверждение режима Ручной/автоматический режим I 0.2 = лента вперед I 0.3 = лента назад M

Date: File:PRO1_07E.19 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Операции преобразования, BCD Integer IN BCD_I EN ENO OUT IN IW4 MW20 IN I_BCD EN ENO OUT IN MW10 QW12 FBD LIW4 BTI TMW20 LMW10 ITB TQW12 STL Число, введенное в BCD-коде Число, отображаемое в BCD-коде Преобразование BCD->Integer Задание Преобразование BCD

Date: File:PRO1_07E.20 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Операции преобразования, 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 Программа с математическими операциями над числами с формате real Преобразование из double integer в число real Преобразование из integer в double integer Задание Данные в формате integer (16 бит) LAD IN DI_R ENENO OUT MD14 MD26 IN I_DI ENENO OUT MW12MD14 IN

Date: File:PRO1_07E.21 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Операции сравнения STL AM0.0 A ( LIW0 LIW2 ==I ) =Q9.7 LAD CMP ==I IN1 IN2 IW0 IW2 M0.0 Q 9.7 FBD IN1 IN2 M0.0 IW0 IW2 & = Q9.7 CMP ==I

Date: File:PRO1_07E.22 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Операции цифровой логики LIW 0 LW#16#5F2A AW / OW / XOW TMW IW0 = W#16#5F2A = WAND_W WXOR_W WOR_W EN ENO IN2 OUT W#16#5F2A MW10 IN1IW XOR MW10 после XOW OR MW10 после OW AND MW10 после AW

Date: File:PRO1_07E.23 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation LADFBDSTL Основные математические функции Вычита- ние Умноже- ние Деление Сложение 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

Date: File:PRO1_07E.24 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Упражнение: Продолжение (данные продукции) Заполненные бутылки Пустые бутылки Бракованные бутылки MW 100 MW 102 MW 104

Date: File:PRO1_07E.25 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Упражнение: продолжение (количество упакованных блоков) Программа, введенная в STL Программа, преобразованная в STL Программа, введенная в LAD (QW 6)

Date: File:PRO1_07E.26 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Операции сдвига (слово / двойное слово) LMW8 LMW4 SLW TMW12 SHL_W EN N OUT ENO MW12 INMW4 MW8 = +2 LMW4 SLW 2 TMW12 or: OUT IN Сдвиг слова влево: 00 OUT IN Сдвиг слова вправо: EN0 =1 EN0 = 0

Date: File:PRO1_07E.27 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Сдвиг вправо числа со знаком SHR_I EN N OUT EN0 MW12 INMW4 MW8 = +3 LMW8 LMW4 SSI TMW12 LMW4 SSI 3 TMW12 or: Сдвиг вправо числа со знаком: OUT IN EN0 = OUT IN EN0 = 1

Date: File:PRO1_07E.28 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Операции циклического сдвига для двойного слова OUT ROL_DW EN N OUT ENO MD12 IN MD2 MW6 = +4 LMW6 LMD2 RLD TMD12 LMD2 RLD 4 TMD12 or: Циклический сдвиг на 4 разряда влево: IN: OUT: