ImageVerifierCode 换一换
格式:DOCX , 页数:10 ,大小:48.11KB ,
资源ID:6229117      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-6229117.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Functions and FBWord格式.docx)为本站会员(b****4)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

Functions and FBWord格式.docx

1、Lesson 1 - Using Functions and Function Blocks11.2.1 DescriptionThis lesson describes how to use Functions and Function Blocks in the different languages.11.2.2 ObjectivesOn completion of this lesson you will be able to: Use Functions and Function Blocks in the different languages.11.2.3 The differe

2、nce between Functions and Function Blocks11.2.3.1 Function Have a value. Can be used in expressions. Do not retain their old values and do always give the same value when the input parameters have the same value.11.2.3.2 Function block Have both input and output parameters. Can give several output v

3、alues using parameters. Retain their values, from the last call, when called the second time. Can give different output values even if the input values are the same. Have to be made into an instance.11.2.4 Inserting librariesRight click on the Libraries icon and select Insert Library to insert a lib

4、rary to your project.11.2.5 Some standard functions and function blocksThe library SystemLib contains a number of predefined Functions and Function Blocks.11.2.5.1 Data type conversionThe are a number of predefined data converters in the library SystemLib. For example bool_to_dint, and real_to _dint

5、.11.2.5.2 Mathematical functionsThe are a number of predefined mathematical functions in the library SystemLib. For example sin, cos, add, ln, sqrt.11.2.5.3 Counters and timersThe are a number of predefined counters and timers in the library SystemLib. For example CTU (Counter Up), CTD (Counter Down

6、), TOn (Timer on delay), Tof (Timer off delay).11.2.6 Using Functions in different languages11.2.6.1 ST and SFCA function call in ST is done by writing the name of the function in the editor or by using the button, pressing or selecting (Insert Function). An example with the function Add in ST:11.2.

7、6.2 FBDUse the toolbar button , or select (InsertFunction/Function block.) or press to display the dialog box containing the available functions and function blocks. If the function or function block is extensible, i.e. can be called with a varying number of inputs, you can enter the number in the P

8、roperties Size field. An example with the function Add in FBD:11.2.6.3 ILA function call in IL is done by writing the name of the function in the instruction field or using the button, press or select (Insert Function).An example with the function Add in IL:11.2.6.4 LDUse one of the toolbar buttons

9、Left, Right, Parallel Function/Function block.) to display the dialog box containing the available functions and function blocks. If the function or function block is extensible, i.e. can be called with a varying number of inputs, you can enter the number in the Properties Size field.An example with

10、 the function Add in LD:11.2.7 Instantiating / Using FB Instances in different languages11.2.7.1 ST and SFCYou must create an instance of the function block before it is used in the ST or SFC editor. The instance is created like this: Click on the Function blocks tab of the Program, Control Module T

11、ype or Function block type. Write the name of the function block you intend to use in the Function Block Type field or press . Give the function block a suitable name in the Name field. Write a description in the Description field. Call for the function block by writing like this in the code block w

12、ere you intend to use it: TimerCloseDoor( A new window like the one below will be visible. Write suitable variables in the Actual Parameter field.11.2.7.2 FBDSam as using functions in FBD. It is not necessary to declare a function or function block before using it in the FBD editor.11.2.7.3 ILYou mu

13、st create an instance of the function block before it is used in the IL editor. The instance is created like this:Ctrl J Call for the function block by writing like this in the code block.11.2.7.4 LDIt is not necessary to declare a function or function block before using it in the FBD editor. Use th

14、e toolbar buttonsLeft, Right, Parallel Function/Function block.), to display the dialog box containing the available functions and function blocks. The Insert Function / Function Block command displays a dialog box showing functions and function blocks available for insertion. The dialog box is the

15、same as the one in the FBD editor (above). Declare suitable variables with correct data types to the parameters of the function block. Connect the pins of the function block with the variables.11.3 Exercise 11.1 Using Function BlocksPlease do exercise 11.111.4 Lesson 2 - Creating Function Blocks11.4

16、.1 DescriptionThis lesson describes how to declare user defined Function Blocks in libraries.11.4.2 Objectives11.4.3 Creating a user libraryRight click on the Libraries icon and select New Library to insert a library to your project.11.4.3.1 Why using libraries?It is recommended to create own librar

17、ies when you work in a larger project, because then you get a better structure of the project. Another major advantages of creating own libraries are that it is possible to reuse the Data types, Function Block types and Control Module types in other projects.11.4.4 Creating a Function block typeRigh

18、t click on the Function Block Types icon and select New Function Block Type to create a new Function Block Type. This could be done in an application or a library.11.4.4.1 Why creating Function Block Types?It is recommended to create own Function block types, because then you make it possible to reu

19、se the code later.11.4.4.2 Function Block Type EditorThe content of the function block type is displayed in an editor. You can define function block types, which can be used in other POU:s. Parameters, variables and function blocks that are used must be declared in the declaration pane. Code is ente

20、red in the code pane. A function block type typically uses the following elements, which are declared in separate tabs in the declaration pane: Parameters Variables that passes values in or out from the program. The options are: in, out and in_out. It is not allowed to set an initial value on a para

21、meter Local Variables used in the function block. External variables Globally defined variables in the application editor must be specified as external variables to be accessed by the function block. Function blocks. You must explicitly declare function blocks to use them (not necessary in the FBD a

22、nd LD editors).11.4.5 Move FB between librariesIt is possible to move functions or function blocks between libraries or applications, by using the copy and paste function.11.5 Exercise 11.2 Creating Function BlocksPlease do exercise 11.2Du kan tag bort denna osynliga text men ltnedanstende Page Brea

23、k ligga kvar !Lt ven den efterfljande sidan ligga kvar !This page is intentionally left blankOsynlig text:Nsta sida mste brja p UDDA sidnummerLmna EN eller TV tomma sidor hr OVANFR.Nedanstende Section Break fr INTE tas bort !Komplettera tom sida vid behov med nedanstende textTABLE OF CONTENTSChapter

24、 11 Function and Function Blocks 111.1 General Information 111.1.1 Description 111.1.2 Objectives 111.1.3 Reference Documentation 111.2 Lesson 1 - Using Functions and Function Blocks 211.2.1 Description 211.2.2 Objectives 211.2.3 The difference between Functions and Function Blocks 211.2.3.1 Functio

25、n 211.2.3.2 Function block 211.2.4 Inserting libraries 211.2.5 Some standard functions and function blocks 311.2.5.1 Data type conversion 311.2.5.2 Mathematical functions 311.2.5.3 Counters and timers 311.2.6 Using Functions in different languages 311.2.6.1 ST and SFC 311.2.6.2 FBD 311.2.6.3 IL 411.

26、2.6.4 LD 411.2.7 Instantiating / Using FB Instances in different languages 411.2.7.1 ST and SFC 411.2.7.2 FBD 511.2.7.3 IL 511.2.7.4 LD 611.3 Exercise 11.1 Using Function Blocks 611.4 Lesson 2 - Creating Function Blocks 711.4.1 Description 711.4.2 Objectives 711.4.3 Creating a user library 7 711.4.4 Creating a Function block type 711.4.4.2 Function Block Type Editor 811.4.5 Move FB

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2