SIEMENS 块的组成部分 FPi LAD/STL/FBD-Iprog2_la\prog2\.\FC4.<Offline 口区 ile Edit Insert PLC Debug vie x 变量声明表 Address Decl Initial Value comme Network 1: Plant oN/oFP 代码部分 4.1 SIMATIC S7 Date nformation and Training Center SSP2 01C.6 Know ledge for Automation
Date: 2021/2/24 File: SSP2_01C.6 SIMATIC S7 Siemens AG 2000. All rights reserved. Information and Training Center Know ledge for Automation 块的组成部分 变量声明表 代码部分
SIEMENS 块的结构 块的首部 (36字节) 块体 变量声明部分 和 程序部分 或 数据 压缩的接口描述 SIMATIC S7 Date nformation and Training Center SSP2 01C.7 Know ledge for Automation
Date: 2021/2/24 File: SSP2_01C.7 SIMATIC S7 Siemens AG 2000. All rights reserved. Information and Training Center Know ledge for Automation 块的首部 (36字节) 块体 变量声明部分 和 程序部分 或 数据 压缩的接口描述 块的结构
SIEMENS 结构化编程 oB 1 FC 1 电机1 FC 1 电机2 FC 1 电机3 SIMATIC S7 Date nformation and Training Center SSP2 01C.8 Know ledge for Automation
Date: 2021/2/24 File: SSP2_01C.8 SIMATIC S7 Siemens AG 2000. All rights reserved. Information and Training Center Know ledge for Automation 结构化编程 OB 1 电机 1 FC 1 电机 2 FC 1 电机 3 FC 1
SIEMENS 利用局部数据进行控制 OB1 Fc1(数学功能) 0.5 0.0 in Input1 int sample measure 1 Input2 constant 4.0 in offset Input1 Output_AQW12 result Input2 8.0 temp TEMP1 int intermediate MW10 M50 M5.1 ADD I SUB I 0.5 OH#TEMP1 #INPUT1-IN1 #TEMP1-ⅣN1 oF #Output_A FC1 #INPUT2 -IN2 #INPUT3 Input 1 tput A QW20 6869 Input2 MW16 SIMATIC S7 Date nformation and Training Center SSP2 01C. 9 Know ledge for Automation
Date: 2021/2/24 File: SSP2_01C.9 SIMATIC S7 Siemens AG 2000. All rights reserved. Information and Training Center Know ledge for Automation 利用局部数据进行控制 FC1 (数学功能) OB1 FC1 Input1 Input2 Input3 Output_A FC1 Input1 Input2 Input3 Output_A MW5 3369 MW10 QW12 MW2 QW20 6869 MW16 I0.5 I0.5 SUB_I IN1 IN2 ( ) M5.1 O ADD_I IN1 IN2 M5.0 O #TEMP1 #INPUT1 #INPUT2 #TEMP1 #INPUT3 #Output_A 0.0 2.0 4.0 6.0 8.0 Input1 Input2 Input3 Output_A TEMP1 in in in out temp int int int int int sample measure 1 constant offset result intermediate
SIEMENS 局部变量 全局变量/数据 局部变量/数据 (在全部程序中有效) (只在一个块中有效) PIl/PIQ 临时变量 静态变量 ·当相关块执行完毕后被清除·当相关块执行完毕后仍然 保留 ·M/T/C 临时存储在 L stack中 ·可在下列块中使用 永久存储在DBs中 · DB areas OBS/FCS/FBs ·只能在FBs中使用 绝对地址 符号地址 访问方式 SIMATIC S7 Date nformation and Training Center Fe: SSP2 01C.10 Know ledge for Automation
Date: 2021/2/24 File: SSP2_01C.10 SIMATIC S7 Siemens AG 2000. All rights reserved. Information and Training Center Know ledge for Automation 局部变量 临时变量 • 当相关块执行完毕后被清除 • 临时存储在 L stack中 • 可在下列块中使用 OBs / FCs / FBs 静态变量 •当相关块执行完毕后仍然 保留 • 永久存储在DBs中 • 只能在FBs中使用 局部变量 / 数据 (只在一个块中有效) 全局变量/数据 (在全部程序中有效) • PII / PIQ • I/ O • M / T / C • DB areas 绝对地址 符号地址 访问方式