Omron CX-programmer 5
|
|
Bookmark Omron CX-programmer 5 |
About Omron CX-programmer 5Here you can find all about Omron CX-programmer 5 like manual and other informations. For example: review.
Omron CX-programmer 5 manual (user guide) is ready to download for free.
On the bottom of page users can write a review. If you own a Omron CX-programmer 5 please write about it to help other people. [ Report abuse or wrong photo | Share your Omron CX-programmer 5 photo ]
Manual
Download
(English)
|
Omron CX-programmer 5
User reviews and opinions
| Weroilog |
9:14pm on Thursday, October 7th, 2010 ![]() |
| This laptop is very well made. It has a battery life of about 7 hours under normal use. The product is good that was why i bought it Fast, Powerful, Quality Display, Lightweight, Long Battery Life, Quiet, Comfortable Keyboard | |
| emforner |
1:31pm on Saturday, September 25th, 2010 ![]() |
| We purchased a MacBook Pro laptop computer, Time Capsule, Snow Leopard and a Magic Mouse from Vanns in Helena. Picked up a 13 Macbook Pro directly from the Bozeman retail store to avoid the shipping wait. Item was in perfect condition. | |
| richarduys |
6:23pm on Wednesday, July 14th, 2010 ![]() |
| "If you are buying this for just e-mail and internet it is not the best machine for you. using it for the added graphics for video editing, gaming. | |
| chrisles |
4:09am on Saturday, July 10th, 2010 ![]() |
| Overall this is one of the better laptops I h... The screen brightness, lit keyboard, trackpad. There is no comparison with the PC/Windows and a MacPro they are different in many respects, and perhaps similar with some. The Mac is fast. | |
| hrsewoman |
11:55am on Tuesday, May 4th, 2010 ![]() |
| skies_of_blue did a bait and switch I worked through Amazon to find a laptop computer for an elderly relative and found one at a decent price with thi... Great Desktop Replacement This is a great machine to get as a desktop replacement. simply wow everything u would hope from Apple... Simplicity ....perfection..elegance... quiet pleased with the buy... | |
| zazen |
6:26am on Monday, March 29th, 2010 ![]() |
| In January 2009 listing, targeting high-end commercial graphic design, fashion design. My whole life I was a PC user. I never had many complaints. Then a few months ago I had to start using the MacBook Pro for work. I love it. | |
| smj100 |
10:44pm on Friday, March 12th, 2010 ![]() |
| There is no comparison with the PC/Windows and a MacPro they are different in many respects, and perhaps similar with some. The Mac is fast. Great Computer. would not own anything else.... well maybe the new G series!! Fast, simple, elegant, eco-friendly, you name it. | |
Comments posted on www.ps2netdrivers.net are solely the views and opinions of the people posting them and do not necessarily reflect the views or opinions of us.
Documents
OMRON FB Library
1. What is a Function Block? 1. What is
Function Blocks are predefined programs (or functions) contained within a single program element that may be used in the ladder diagram. A contact element is required to start the function, but inputs and outputs are editable through parameters used in the ladder arrangement. The functions can be reused as the same element (same memory) or occur as a new element with its own memory assigned.
Partial Ladder program for machine A Defining Inputs and Outputs Input Input
Process (algorithm) Control Device n
Output Output
Control Device 1
A1 B1 X1 An An Bn Bn
Xn Xn Xn TIM n #0100
TIM 1 #0100 T1 Y1 Tn
Yn Yn Yn
Zn Zn Zn
Produce template
Partial Ladder program for machine A Function Block definition
Control Device 1 Device Control
Device Control
EN A B
ENO X Y Z
X1 Y1 Z1
Allocate to Ladder program
Function Block Instance (invocation)
Control Device 2 parameters
Sets input / output
X2 Y2 Z2
Function Block definition This contains the defined logic (algorithm) and I/O interface. The memory addresses are not allocated in the Function Block Definition Function Block instance (invocation) This is the instruction that will call the function block instance when used by the ladder program, using the memory allocated to the instance
2. An Example of a Function Block 2. An Example of a Function
The following figures describe an example of a function block for a time limit circuit, to be used in the ladder. It is possible to edit the set point of the TIM instruction to reallocate the set time for turning off the output in the ladder rung. Using the function block as shown below, it is possible to make the time limit of the circuit arbitrary by only changing one specific parameter. By enabling the input parameter to be editable, it is possible to allow an arbitrary time limit circuit.
Ladder diagram
000.00 TIM0000
TIM 0000 #0020 P_On PULSE EN 000.00 001.00 #0020 Start Time ENO Q 001.00
001.00
Timing chart
Start 000.00 T_FB TIM T_FB Time Q 2.0 sec Q
3. Overview of the OMRON FB Library 3. Overview of the OMRON
The OMRON FB Library is a collection of predefined Function Block files provided by Omron. These files are intended to be used as an aid to simplify programs, containing standard functionality for programming PLCs and Omron FA component functions.
3-1. Benefits of the OMRON FB Library
The OMRON FB Library is a collection of function block examples that aim to improve the connectivity of the units for PLCs and FA components made by Omron. Here is a list of the benefits to be gained from using the OMRON FB Library: (1) No need to create ladder diagrams using basic functions of the PLC units and FA components More time can be spent on bespoke programs for the external devices, rather than creating basic ladder diagrams, as these are already available. (2) Easy to use A functioning program is achieved by loading the function block file to perform the target functionality, then by inputting an instance (function block call instruction: invocation) to the ladder diagram program and setting addresses (parameters) for the inputs and outputs. (3) Testing of program operation is unnecessary Omron has tested the Function Block library. Debugging the programs for operating the unit and FA components for the PLCs is unnecessary for the user. (4) Easy to understand The function block has a clearly displayed name for its body and instances. A fixed name can be applied to the process. The instance (function block call instruction: invocation) has input and output parameters. As the temporary relay and processing data is not displayed, the values of the inputs and outputs are more visible. Furthermore, as the modification of the parameters is localised, fine control during debugging etc. is easier. Finally, as the internal processing of the function block is not displayed when the instance is used in the ladder diagram, the ladder diagram program looks simpler to the end user. (5) Extendibility in the future Omron will not change the interface between the ladder diagram and the function blocks. Units will operate by replacing the function block to the corresponding FB for the new unit in the event of PLC and the FA component upgrades, for higher performance or enhancements, in the future.
Click [OK] to decide the selected CPU type.
3. Main Window functions 3. Main
The main window functionality is explained here.
Title bar
Tool bar
Project Tree Project Tree
Section Section
Function Block Definition Function Block Definition
Status bar
Project Workspace Project Workspace
Ladder Window Ladder Window
Contents / Function
Title Bar Menus Toolbars Section Project Workspace Project Tree Ladder Window Function Block Definition
Shows the file name of saved data created in CX-Programmer. Enables you to select menu items. Enables you to select functions by clicking icons. Select [View] -> [Toolbars], display toolbars. Dragging toolbars enables you to change the display positions. Enables you to divide a program into several blocks. Each can be created and displayed separately. Controls programs and data. Enables you to copy element data by executing Drag and Drop between different projects or from within a project. A screen for creating and editing a ladder program. Shows Function Block definition. By selecting the icons, you can copy or delete the selected Function Block definition. is shown if the file is a OMRON FB Part file. - In the case of a User-defined Function Block, is shown if Ladder, is shown if ST. Shows information such as a PLC name, online/offline state, location of the active cell.
Status Bar
Explanation of Explanation of target Program target Program Opening a Opening a new project new project Import FB Library Import FB Library Creating a Creating a program program Program Check Program Check
4. Import the OMRON FB Part file 4. Import the OMRON FB Part file
Select Function Block definition icon from the project tree using the mouse cursor, right click. Select Insert Function Block, then select a Library file using mouse to navigate.
Click mouse right button Insert Function Block Library File
Double click mouse left button. [OmronLib] [Programmable Controller] [CPU] Select each of the above in series.
EN ON OFF OnTime(*100ms) ENO ON OFF OffTime(*100ms) INV_ENO ON OFF
1-2. Changing the contents of the OMRON FB Part file
To satisfy the requirement described above, the following changes must be made to OMRON FB Part file Make ON Time/OFF Time Clock Pulse in BCD 1. Add an output parameter INV_ENO. 2. Add ladder program to output the ENO for inverting the signal.
Caution Caution
OMRON cannot guarantee the operation of a customized OMRON FB parts. Please be sure to check the process of OMRON cannot guarantee the operation of a customized OMRON FB parts. Please be sure to check the process of your FB part sufficiently before customization and confirm the operation of each FB parts thoroughly after that. your FB part sufficiently before customization and confirm the operation of each FB parts thoroughly after that.
2. Copy the OMRON FB Part file
Import the Make ON Time/OFF Time Clock Pulse in BCD Function Block Part file as explained in Chapter 1 (FB definition name: _CPU007_MakeClockPulse_BCD)
Select the OMRON FB Part icon then right click the mouse. Copy
Select Function Block Definition icon and right click the mouse. Paste
The OMRON FB Part file is pasted.
Change the FB definition name.
Select pasted Function Block icon and click mouse right button. Rename [MakeClockPulse_BCD_INV]
Note: Note: The user cant create Function Block Definitions The user cant create Function Block Definitions With name starting _ (underscore). With name starting _ (underscore). Please use names not starting with _. Please use names not starting with _.
Enable editing of the internal FB Program code.
Select pasted Function Block icon and right click the mouse button. Property Or
Tick the check box using the left mouse click. Tick the check box using the left mouse click.
3. Add a variable to the Function Block
Variable Table Variable Table Open the Function Block Ladder Editor.
Opens the Function Opens the Function Block Ladder Block Ladder Editor. Editor.
Select the Function Block icon using the mouse cursor and double click the left mouse button.
The original OMRON FB Part file is also able to display The original OMRON FB Part file is also able to display its ladder program, but cannot be edited. its ladder program, but cannot be edited. Ladder Editor Ladder Editor Variable table
Select Output tab in Variable Table using the mouse cursor And click the left mouse button.
Enter a new variable name. Enter a new variable name.
Click the left mouse button and select Insert Variable(I).
Select BOOL for bit data. Select BOOL for bit data.
Confirm the entered variable is correct.
4. Changing the Function Block Ladder
Add the required ladder diagram on Function Block Ladder edit field. Move the cursor to the left column of the next rung.
4-1. Entering a Contact
INV_ENO
4-2. Checking Usage Status of Variables
As with main ladder program, you can use cross reference pop-up to check usage conditions of variables.
Dis play c ros s re fe re n c e pop-up.
4 Move the cursor. Move the cursor.
Se l e c t L D N O T f r o m c r o s s reference pop-up by the mouse cursor. You can see that variable ENO is used in an output coil in the step No.20 as well.
The cursor in the FB Ladder Editor moves to the output coil in the step No.20.
Explanation of Explanation of target Program target Program Create new Create new FB Definition FB Definition Entering Entering Variables Variables Creating Creating ST Program ST Program Creating Ladder Creating Ladder Program and check Program and check
1. What is the ST Language?
The ST (Structured Text) language is a high-level language code for industrial controls (mainly PLCs) defined by the IEC 61131-3 standard. It has many control statements, including IF-THEN-ELSE-END_IF, FOR / WHILE loop, and many mathematical functions such as SIN / LOG. it is suitable for mathematical processing. The ST language supported by CXProgrammer is in conformance with IEC 61131-3 standard. The arithmetic functions in CX-Programmer Ver.5/6 are as follows: sine (SIN), cosine (COS), tangent (TAN), arc-sine (ASIN), arc-cosine (ACOS), arc-tangent (ATAN), square root (SQRT), absolute value (ABS), logarithm (LOG), natural-logarithm (LN), naturalexponential (EXP), exponentiation (EXPT) Reference: The IEC 61131 standard is an international standard for programming Programmable Logic Controllers (PLC), defined by the International Electro-technical Commission (IEC). The standard consists of 7 parts, with part 3 defining the programming of PLCs.
2. Explanation of the target program
This example describes how to create an ST program in a Function Block to calculate the average value of a measured thickness.
The data type should be set to REAL to store the data. The data type should be set to REAL to store the data. REAL type allows values with 32 bits of length, see range below:REAL type allows values with 32 bits of length, see range below:-3.38 ~ -1.-38, ,, 0, -3.38 ~ -1.-38, 0, +1.-38 ~ +3.38 +1.-38 ~ +3.38
FB definition name FB definition name Input symbols Input symbols
AverageCalc_3Value AverageCalc_3Value
x(REAL type), y(REAL type), z(REAL type) x(REAL type), y(REAL type), z(REAL type) score(REAL type) Output symbol score(REAL type) Output symbol ST Program definition score := (x + y + z) // 3.0; ST Program definition score := (x + y + z) 3.0;
Substitute a value to a symbol is expressed by :=. Substitute a value to a symbol is expressed by :=.
Enter ;; (semicolon) to Enter (semicolon) to complete the code. complete the code.
3. Create a Function Block using ST
Create a Function Block using Structured Text.
Select the Function Block icon using a mouse cursor, and click the right mouse button. Insert Function Block(I) Structured Text(S)
A New Function Block definition is created.
Change the Function Block definition name Change the Function Block definition name
Select the Function Block definition icon using the mouse cursor and right click the mouse button. Select Paste. Rename Enter [AverageCalc_3value] Open Function Block ST Editor Open Function Block ST Editor Select Function Block definition Icon by mouse cursor and double click the left mouse button.
Note: Note: The user cant create Function Block Definitions The user cant create Function Block Definitions with names starting _ (underscore). with names starting _ (underscore). Please use names not starting with _. Please use names not starting with _.
Variable Table Variable Table
ST Edit Field ST Edit Field
4. Entering Variables into Function Blocks
Select Variable Table.
Select the Input tab using the mouse cursor.
Select Insert from the Pop-up menu.
Enter a variable name Enter a variable name
Enter data for the following. Name Data type Comment
Select REAL Select REAL
Enter and applicable Enter and applicable comment comment
Enter input symbol x, output symbols y,z by repeating the process above. Enter input symbol x, output symbols y,z by repeating the process above.
Input Variables Input Variables
Output Variables Output Variables
Reference: The copy and paste operation is available in FB Header. Reference: The copy and paste operation is available in FB Header. Reference: The order of the variables in the FB table becomes the order of parameters on FB Reference: The order of the variables in the FB table becomes the order of parameters on FB instance (invocation) in the normal ladder view. instance (invocation) in the normal ladder view. To change the order, it is possible to drag & drop variables within the table. To change the order, it is possible to drag & drop variables within the table.
Online Operation
Transfer Program Transfer Program Monitoring Monitoring
7. Program Transfer
Go online to the PLC with CX-Simulator and transfer the program.
Refer to page 2-10 for steps to go online and Refer to page 2-10 for steps to go online and transfer the program. transfer the program.
Change the PLC Change the PLC (Simulator) to Monitor (Simulator) to Monitor mode. mode. Click
Click [Yes]
Confirm that the PLC is Monitor mode.
8. Monitoring the Function Block execution
Monitors the present value of parameters in the FB instance using the Watch Window.
Display the Watch Window.
Open the Edit dialog.
Click Browse button using the mouse left button.
Select REAL(32bit floating point) Select REAL(32bit floating point)
Click the button using the left mouse button, then select the following: [Symbols of type] [Name or address]
Select ThicknessAvarage.x Select ThicknessAvarage.x
Click [OK] button using the left mouse button.
When monitoring internal variables at debug phase, collective registration is available in addition to the individual registration on the Watch Window through the operation shown here. For the details, refer 5-8 Batch Registration to Watch Window. When the function block is a ladder, conducting monitoring is available. For the details, refer 5-5 Operation Check- 1
Reference: Example of an ST program using IF-THEN-ELSE-END_IF
The following ST program checks the average value calculated by the example of page 4-7 against a range (upper limit or lower limit).
FB Definition: OutputOfDecisionResult Input symbols: score(REAL type), setover(REAL type), setunder REAL type) Output symbols: OK (BOOL type), overNG(BOOL type), underNG(BOOL type)
ST program: IF score > setover THEN underNG := FALSE; OK := FALSE; overNG := TRUE; ELSIF score < setunder THEN overNG := FALSE; OK := FALSE; underNG := TRUE; ELSE underNG := FALSE; overNG := FALSE; OK := TRUE; END_IF; (* If score > setover, *) (* Turn off underNG *) (* Turn off OK *) (* Turn on o erNG *) (* if score =< setover and score < setunder (* Turn on overNG *) (* Turn off OK *) (* Turn on underNG *) (* if setover > score > setunder then*) (* Turn off underNG *) (* Turn off overNG *) (* Turn off OK *) (* end of IF section*) then *)
4-3 Detailing Specifications and Extracting Similar Processes
By detailing the specifications, there you will find similar processes or ones that can be used universally. Actuator control (Example of similar process) In this example, you can regard cylinder control for assortment of good and bad products and actuator control for paper box assortment as the same. Shown below are extracted requirements for these processes. The process has 2 actuators for bilateral movement which operate under input condition for each. Operation of each direction must be interlocked. The process has an input signal to reset its operation. Average_Threshold Check (Example of universal process) A process should be extracted that will be used universally even if the process itself is used only once for this application. In this example, a process is extracted that calculates average of measured 3 thickness data of DVD and checks if it is within the threshold. Shown below are extracted requirements for this process. Average of 3 measurements must be calculated. Average value must be checked if it is within upper and lower limits of the threshold. These requirements are used as the base for components. Names of components are defined as ActuatorControl FB and AvgValue_ThresholdCheck FB.
4-3-1 Creating Specifications for Components
Reuse of components can improve productivity of program development. To make reuse easily available, it is important to create specifications and insert comments for easier understanding specifications of input/output or operation without looking into the component. It is advisable to describe library reference for OMRON FB Library.
4-3-2 Example of FB Component Creation
ActuatorControl FB It should be described in a ladder sequence because it is a process for sequence control.
[Input Variables]
[Output Variables]
[Internal Variables] None.
Line comments for operational overview and input and output variables allow for easier understanding.
AvgValue_ThresholdCheck FB It should be described in ST because it is a process for numeric calculation and comparison.
[Internal Variables]
Note: Use general names as long as possible for names of FB and variables in ladder diagram and ST, Note: Use general names as long as possible for names of FB and variables in ladder diagram and ST, instead of specific names for the function at creation. instead of specific names for the function at creation.
4-4. Integrating FBs
Detailed process components are extracted by now. Components for application will be created by combining them in the following sections.
4-4-1. Combining Existing Components - DVD_ThickSelectControl
Req. 2. Thickness of DVD should be measured at 3 points. Average thickness of measurements should be calculated. If it is within its threshold range, DVD should be assorted into a stocker for good products, or a stocker for bad products if not. can be regarded as a process that combines AvgValue_ThresholdCheck and ActuatorControl investigated in the previous section. Combining these components allows creation of integrated component DVD_ThickSelectControl FB. Shown below is an example of an FB to be created.
This FB has its specific name and variable This FB has its specific name and variable names that include DVD or Cylinder names that include DVD or Cylinder because it is specifically created for because it is specifically created for application. application.
Input Input Variables Variables
Internal Internal Variables Variables
Output Output Variables Variables
A function block can be called from within another function block. This is called nesting. A function block can be called from within another function block. This is called nesting. To nest, declare a variable of FUNCTION BLOCK(FB) type as its internal variable to use the To nest, declare a variable of FUNCTION BLOCK(FB) type as its internal variable to use the variable name as an instance. variable name as an instance.
4-4-2. Adding Functions to Existing Components - WorkMoveControl_LSONcount
Req. 5. Paper boxes should be classified into 2 types. Switching frequency should be counted to evaluate a life of limit switch adjacent to actuator of selection part. can be materialized by counting OFF->ON switching of a limit switch as an input for ActuatorControl. This component is called WorkMoveControl_LSONcount FB. Shown below is an example of an FB to be created.
Ladder FB is called from ST. Ladder FB is called from ST.
How to call FB (function block) from ST How to call FB (function block) from ST FB to be called: MyFB FB to be called: MyFB I/O variable of FB to be called: I/O variable of FB to be called: Input: Input1, Input2 Input: Input1, Input2 Output: Output1, Output2 Output: Output1, Output2
Instance of MyFB declared in ST: MyInstance Instance of MyFB declared in ST: MyInstance I/O variable to be passed to FB in ST: I/O variable to be passed to FB in ST: Input: STInput1, STInput2 Input: STInput1, STInput2 Output: STOutput1, STOutput2 Output: STOutput1, STOutput2
In this example, calling of FB instance from ST must be described as In this example, calling of FB instance from ST must be described as MyInstance(Input1 := STInput1, Input2 := STInput2, Output1 => STOutput1, Output2 => STOutput2); MyInstance(Input1 := STInput1, Input2 := STInput2, Output1 => STOutput1, Output2 => STOutput2); When all input/output variables are described, description of variables and assignment operators in one to be When all input/output variables are described, description of variables and assignment operators in one to be called can be omitted. called can be omitted. MyInstance(STInput1, STInput2, STOutput1, STOutput2); MyInstance(STInput1, STInput2, STOutput1, STOutput2); By describing variables and assignment operators in one to be called, you can describe only a part of By describing variables and assignment operators in one to be called, you can describe only a part of input/output variables. input/output variables. MyInstance(Input1 := STInput1, Output2 => STOutput2); MyInstance(Input1 := STInput1, Output2 => STOutput2);
Move the mouse cursor to a copied function block icon then right-click. Select Rename Enter [ActuatorControl].
Variables Table Variables Table
Open FB ladder editor. Open FB ladder editor.
Ladder Input Screen Ladder Input Screen
Move the mouse cursor to a function block icon , then double-click to open the function block ST editor.
Select the variables table and register variables in the function block. All variables of ActuatorControl FB of page 5-4 must be registered. Note: Order of variables must be the same as FB instance order. Note: Order of variables must be the same as FB instance order. To change order of variables, select a variable name then drag and drop it. To change order of variables, select a variable name then drag and drop it.
Select ladder input screen, then enter a ladder program. All variables of ActuatorControl FB of page 5-4 must be registered. Note: Although you can enter a circuit in the FB ladder editor similar to the main Note: Although you can enter a circuit in the FB ladder editor similar to the main ladder editor, entering of address in the FB is invalid. ladder editor, entering of address in the FB is invalid.
Note: To enter variable list in a line comment, you can select a variable from Note: To enter variable list in a line comment, you can select a variable from variables table then copy it. You can use it for more efficient input. variables table then copy it. You can use it for more efficient input.
5-4. Transferring Program
Connect to CX-Simulator online, transfer a program, then set PLC (simulator) to monitor mode. For how to connect online and transfer a For how to connect online and transfer a program, see page 2-10. program, see page 2-10.
5-5. Operation Check-1
Change current parameter value of FB invocation on the main ladder, then check the operation of ActuatorControl FB. Monitor the instance of ActuatorControl FB first.
Move the cursor to FB invocation, then double-click or click button.
FB ladder instance (under condition of address assigned) is monitored.
Display the main ladder and FB instance (FB ladder invoked by the main ladder) at the same time, then check the operation while changing current parameter value of FB invocation in the main ladder.
5-6. Operation Check-2
Enter following parameter values of FB invocation and check if expected output should be provided. In this example only (1) is shown, but all combination of conditions must be verified. (1) Initial State: Turn 0.03 ON. => 0.04 and 0.05 must be OFF. FB instance ladder monitor screen must be under state that corresponds to the value. (2) Actuator forward direction operation-1: Turn 0.00 ON => 0.04 must be turned ON. FB instance ladder monitor screen must be under state that corresponds to the value. (3) Actuator forward direction operation-2: Turn 0.03 OFF => 0.04 must be ON and 0.05 must be OFF. FB instance ladder monitor screen must be under state that corresponds to the value. (4) Actuator forward direction operation-3: Turn 0.02 ON => 0.04 must be OFF and 0.05 must be OFF. FB instance ladder monitor screen must be under state that corresponds to the value.
Example 2 IF a THEN b := 0; END_IF; Example 3 IF a > 0 THEN b := TRUE; ELSE b := FALSE; END_IF;
Example 4 IF a < 10 THEN b := TRUE; c := 100; ELSIF a > 20 THEN b := TRUE; c := 200; ELSE b := FALSE; c := 300; END_IF;
IF Statement Examples Example 5 IF a THEN b := TRUE; ELSE IF c>0 THEN d := 0; ELSE d := 100; END_IF; d := 400; END_IF;
In this example (an example of a nested IF. THEN statement), if the variable "a" is true (1), then the variable "b" will be assigned the value of true (1), and control will be passed to the program steps following the associated END_IF clause. If "a" is false (0), then no action is performed upon the variable "b" and control is passed to the statement following the ELSE clause (in this example, another IF. THEN statement, which is executed as described in Example 3, although it should be noted that any of the supported IEC61131-3 statements may be used). After the described IF. THEN statement is executed, the variable "d" will be assigned the value of 400. Control is then passed to the program steps following the END_IF clause.
WHILE Statement Examples WHILE expression DO statement-list; END_WHILE; The WHILE expression must evaluate to a boolean value. The statement-list is a list of several simple statements. The WHILE keyword repeatedly executes the statement-list while the expression is true. When the expression becomes false, control passes to the next statement after the END_WHILE. Example 1 WHILE a < 10 DO a := a + 1; b := b * 2.0; END_WHILE;
In this example, the WHILE expression will be evaluated and if true (i.e. variable "a" is less than 10) then the statement-list (a:=a+1; and b:=b*2.0;) will be executed. After execution of the statement-list, control will pass back to the start of the WHILE expression. This process is repeated while variable "a" is less than 10. When the variable "a" is greater than or equal to 10, then the statement-list will not be executed and control will pass to the program steps following the END_WHILE clause. In this example, the WHILE expression will be evaluated and if true (i.e. variable "a" is true), then the statement-list (b:=b+1; and the IF. THEN statement) will be executed. After execution of the statement-list, control will pass back to the start of the WHILE expression. This process is repeated while variable "a" is true. When variable "a" is false, the statementlist will not be executed and control will pass to the program steps following the END_WHILE clause.
Example 2 CASE a + 2 OF -2 : b := 1; 5 : c := 1.0; ELSE d := 1.0; END_CASE;
CASE Statement Examples Example 3 CASE a + 3 * b OF 1, 3 : b := 2; 7, 11 : c := 3.0; ELSE d := 4.0; END_CASE;
In this example, the CASE statement will be evaluated and then compared with each of the CASE statement comparison values (i.e. 1 or 3 and 7 or 11 in this example). If the value of variable "a" plus 3 multiplied by variable "b" is 1 or 3, then that statement-list will be executed (i.e. b:=2;). Control will then pass to the program steps following the END_CASE clause. If the value of variable "a" plus 3 multiplied by variable "b" is 7 or 11, then that statement-list will be executed (i.e. c:=3.0;). Control will then pass to the program steps following the END_CASE clause. If the value of variable "a" plus 3 multiplied by variable "b" is not 1, 3, 7 or 11, then the statement-list in the ELSE condition (i.e. d:=4.0;) will be executed. Control will then pass to the program steps following the END_CASE clause.
Example 4 CASE a OF -2, 2, 4 : b := 2; c := 1.0; 6.11, 13 : c := 2.0; 1, 3, 5 : c := 3.0; ELSE b := 1; c := 4.0; END_CASE;
In this example, the CASE statement will be evaluated and then compared with each of the CASE statement comparison values, i.e. (2, 2 or 4) and (6 to 11 or 13) and (1, 3 or 5) in this example. If the value of variable "a" equals -2, 2 or 4, then that statement-list will be executed (i.e. b:=2; and c:=1.0;). Control will then pass to the program steps following the END_CASE clause. If the value of variable "a" equals 6, 7, 8, 9, 10, 11 or 13 then, that statement-list will be executed (i.e. c:=2.0;). Control will then pass to the program steps following the END_CASE clause. If the value of variable "a" is 1, 3 or 5, then that statement-list will be executed (i.e. c:=3.0;). Control will then pass to the program steps following the END_CASE clause. If the value of variable "a" is none of those above, then the statementlist in the ELSE condition (i.e. b:=1; and c:=4.0;) will be executed. Control will then pass to the program steps following the END_CASE clause.
EXIT Statement Examples WHILE expression DO statement-list1; EXIT; END_WHILE; statement-list2; REPEAT statement-list1; EXIT; UNTIL expression END_REPEAT; statement-list2; FOR control variable := integer expression1 TO integer expression2 [ BY integer expression3 ] DO statement-list1; EXIT; END_FOR; statement-list2; The statement-list is a list of several simple statements. The EXIT keyword discontinues the repetitive loop execution to go to the next statement, and can only be used in repetitive statements (WHILE, REPEAT, FOR statements). When the EXIT keyword is executed after statementlist1 in the repetitive loop, the control passes to statement-list2 immediately. Example 1 WHILE a DO IF c = TRUE THEN b:=0;EXIT; END_IF; IF b > 10 THEN a:= FALSE; END_IF; END_WHILE; d:=1; Example 2 a:=FALSE; FOR i:=1 TO 20 DO FOR j:=0 TO 9 DO IF i>=10 THEN n:=i*10+j; a:=TRUE;EXIT; END_IF; END_FOR; IF a THEN EXIT; END_IF; END_FOR; d:=1;
If the first IF expression is true (i.e. variable "c" is true), the statement-list (b:=0; and EXIT;) is executed during the execution of the WHILE loop. After the execution of the EXIT keyword, the WHILE loop is discontinued and the control passes to the next statement (d:=1;) after the END_WHILE clause.
If the first IF expression is true (i.e. i>=10 is true) in the inside FOR loop, the statement-list (n:=i*10+j; and a:=TRUE; and EXIT;) is executed during the execution of the FOR loop. After the execution of the EXIT keyword, the inside FOR loop is discontinued and the control passes to the next IF statement after the END_FOR clause. If this IF expression is true (i.e. the variable "a" is true), EXIT keyword is executed , the outside FOR loop is discontinued after END_FOR clause, and the control passes to the next statement (d:=1;).
RETURN Statement Examples statement-list1; RETURN; statement-list2; The statement-list is a list of several simple statements. The RETURN keyword breaks off the execution of the inside of the Function Block after statement-list1, and then the control returns to the program which calls the Function Block without executing statement-list2. Example 1 IF a_1*b>100 THEN c:=TRUE;RETURN; END_IF; IF a_2*(b+10)>100 THEN c:=TRUE;RETURN; END_IF; IF a_3*(b+20)>100 THEN c:=TRUE; END_IF; Array Examples variable name [subscript index] An array is a collection of like variables. The size of an array can be defined in the Function Block variable table. An individual variable can be accessed using the array subscript operator [ ]. The subscript index allows a specific variable within an array to be accessed. The subscript index must be either a positive literal value, an integer expression or an integer variable. The subscript index is zero based. A subscript index value of zero would access the first variable, a subscript index value of one would access the second variable and so on. Warning If the subscript index is either an integer expression or integer variable, you must ensure that the resulting subscript index value is within the valid index range of the array. Accessing an array with an invalid index must be avoided. Refer to Example 5 for details of how to write safer code when using variable array offsets. Example 1 a[0] := 1; a[1] := -2; a[2] : = 1+2; a[3] : = b; a[4] : = b+1; Example 2 c[0] := FALSE; c[1] := 2>3; In this example variable "a" is an array of 5 elements and has an INT data type. Variable "b" also has an INT data type. When executed, the first element in the array will be set to the value 1, the second element will be set to -2, the third element will be set to 3 (i.e. 1+2), the forth element will be set to the value of variable "b" and the fifth element will be set to the value of variable "b" plus 1.
Certain Precautions on Specifications and Use
1. Suitability of Use. Seller shall not be responsible for conformity with any standards, codes or regulations which apply to the combination of the Good in the Buyer's application or use of the Good. At Buyer's request, Seller will provide applicable third party certification documents identifying ratings and limitations of use which apply to the Good. This information by itself is not sufficient for a complete determination of the suitability of the Good in combination with the end product, machine, system, or other application or use. The following are some examples of applications for which particular attention must be given. This is not intended to be an exhaustive list of all possible uses of this Good, nor is it intended to imply that the uses listed may be suitable for this Good: (i) Outdoor use, uses involving potential chemical contamination or electrical interference, or conditions or uses not described in this document. (ii) Energy control systems, combustion systems, railroad systems, aviation systems, medical equipment, amusement machines, vehicles, safety equipment, and installations subject to separate industry or government regulations. (iii) Systems, machines and equipment that could present a risk to life or property. Please know and observe all prohibitions of use applicable to this Good. NEVER USE THE PRODUCT FOR AN APPLICATION INVOLVING SERIOUS RISK TO LIFE OR PROPERTY WITHOUT ENSURING THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO ADDRESS THE RISKS, AND THAT THE SELLER'S PRODUCT IS PROPERLY RATED AND INSTALLED FOR THE INTENDED USE WITHIN THE OVERALL EQUIPMENT OR SYSTEM. 2. Programmable Products. Seller shall not be responsible for the user's programming of a programmable Good, or any consequence thereof. 3. Performance Data. Performance data given in this catalog is provided as a guide for the user in determining suitability and does not constitute a warranty. It may represent the result of Seller's test conditions, and the user must correlate it to actual application requirements. Actual performance is subject to the Seller's Warranty and Limitations of Liability. 4. Change in Specifications. Product specifications and accessories may be changed at any time based on improvements and other reasons. It is our practice to change part numbers when published ratings or features are changed, or when significant construction changes are made. However, some specifications of the Good may be changed without any notice. When in doubt, special part numbers may be assigned to fix or establish key specifications for your application. Please consult with your Seller's representative at any time to confirm actual specifications of purchased Good. 5. Errors and Omissions. The information in this catalog has been carefully checked and is believed to be accurate; however, no responsibility is assumed for clerical, typographical or proofreading errors, or omissions.
Tags
KDL-32V5610 MCD-HM200 LN32C540 EW280 Player Fisheasy 2 BL-C111 Alcatel-lucent 360 Black Machines NRL-LS MP230 SA5285 02 Seria 2X5 HD160HJ Samsung J600 MW89MST EMP-S1H KH 5001 RM4400L AJ3600 L246WP Review DEH-6100BT EMS2487X 110 Plus Dell D600 SRU9600 Htz151dvd GT-B3410W DCR-PC7 Power864 St 1200 Pspbl CD-BA1300H DT125RE SS-WAL700 EM 203 LH-W760IA Pilots TC-WE305 Polaroid A330 GR-DV3 Kxtg6511E GO 700 HX-D2 RTH7400D D100E AW2126F PMA-710AE SGH-R225 Ho-2007 PRO 4000 PRA-1500 HP-101E KDL-32V4730 DX8450 DV-RW100 - E AJ3650 WM12-96 Optio M40 KX-FT936PD V750 PRO STR-DE975 AEG-electrolux Z78 EWW1210 HT503 CX-R188 KLV-30MR1 YP-K3JQB Garmin A50 0 Tecumseh TAG FBX2400 SQ-1170 DCR-SX60 XT660-2005 AJ260 37B Soundchart KDC-W4537U Guide MK79G1394 Executive Camera KH 451 QW14790 DCR-TRV238E SKW-320X EW1067F R-202 P4BGL-ED Vision R-771 A55-S326 SP2504C PK 101 KX-TG2214W Software Pack XS Server
manuel d'instructions, Guide de l'utilisateur | Manual de instrucciones, Instrucciones de uso | Bedienungsanleitung, Bedienungsanleitung | Manual de Instruções, guia do usuário | инструкция | návod na použitie, Užívateľská príručka, návod k použití | bruksanvisningen | instrukcja, podręcznik użytkownika | kullanım kılavuzu, Kullanım | kézikönyv, használati útmutató | manuale di istruzioni, istruzioni d'uso | handleiding, gebruikershandleiding
Sitemap
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101










