User manual OMRON CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION

DON'T FORGET : ALWAYS READ THE USER GUIDE BEFORE BUYING !!!

If this document matches the user guide, instructions manual or user manual, feature sets, schematics you are looking for, download it now. Diplodocs provides you a fast and easy access to the user manual OMRON CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION. We hope that this OMRON CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION user guide will be useful to you.


OMRON CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION : Download the complete user guide (3125 Ko)

Manual abstract: user guide OMRON CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION

Detailed instructions for use are in the User's Guide.

[. . . ] W438-E1-01 SYSMAC WS02-CXPC1-E-V50 CS1-H, CJ1-H, CJ1M CPU Units CX-Programmer Ver. 5. 0 OPERATION MANUAL Function Blocks CX-Programmer Ver. 5. 0 WS02-CXPC1-E-V50 CS1-H, CJ1-H, CJ1M CPU Units Operation Manual Function Blocks Produced July 2004 iv Notice: OMRON products are manufactured for use according to proper procedures by a qualified operator and only for the purposes described in this manual. The following conventions are used to indicate and classify precautions in this manual. Failure to heed precautions can result in injury to people or damage to property. !DANGER !WARNING Indicates an imminently hazardous situation which, if not avoided, will result in death or serious injury. [. . . ] The remainder must be calculated as follows: Remainder = Dividend - (Divisor × Quotient) Note 2-4-5 Specifying Addresses Allocated to Special I/O Units Use Index Registers IR0 to IR15 (indirectly specified constant offset) to specify addresses allocated to Special I/O Units based on the value passed for the unit number as an input parameter within the function block definition as shown in the following examples. Note For details on using Index Registers in function blocks, refer to 2-4-6 Using Index Registers. Examples Example 1: Specifying the CIO Area within a Function Block (Same for DM Area) Special I/O Units Variables: Use the unit number as an input variable, and specifying the first allocation address as an internal variable with the AT set to CIO 2000. Multiply the unit number (input variable) by &10, and create the unit number offset (internal variable, DINT data type). Use the MOVR(560) (MOVE TO REGISTER) instruction to store the real I/ O memory address for the first allocation address (internal variable, AT = CIO 2000) in the Index Register (e. g. , IR0). 45 Function Block Applications Guidelines Section 2-4 3. Add the unit number offset to the real I/O memory address within the Index Register (e. g. , IR0). Example 2: Specifying the Designated Bit in the CIO Area (e. g. , CIO Word n+a, Bit b) Programs: Use either of the following methods. · Word addresses: Specify the constant offset of the Index Register using an indirect specification (e. g. , +a, IR0). · Bit addresses: Specify an instruction that can specify a bit address within a word (e. g. , &b in second operand of SETB instruction when writing and TST instruction when reading). Example: Special I/O Units Instance for function block definition A. 1) Specify the first CIO Area word n (n = CIO 2000 + unit number × 10) Used constants: Unit number (input variable, INT data type) Offset (internal variable, DINT data type) Relay (internal variable, WORD data type, 400 array elements, AT setting = 2000) &3 Unit No. &10 Unit No. Offset Multiplies unit number by &10 and stores in offset. MOVR Relay IR0 Stores the real I/O memory address for the relay in IR0. +L IR0 Offset IR0 Adds offset to IR0. 2) Specify the designated bit in the CIO Area (e. g. , CIO word n+1, bit 02) SETB +1, IR0 &2 Turns ON CIO word n+1, bit 02. 2-4-6 Using Index Registers Index Registers IR0 to IR15 function as pointers for specifying I/O memory addresses. These Index Registers can be used within function blocks to directly specify addresses using IR0 to IR15 and not the variable names (Index Register direct specification: IR0 to IR15; Index Register indirect specification: , IR0 to , IR15) Note After storing the real I/O memory addresses in the Index Registers using the MOVR(560) instruction, Index Registers can be indirectly specified using general instructions. This enables all I/O memory areas to be specified dynamically. 46 Function Block Applications Guidelines Pointer All I/O memory areas Section 2-4 MOVR(560) IR@ Index Register Example: Specifying +5, IR0 using Specify address constant offset specification, not in IR0 variable name Function block Indirect +5 offset specifiInstruction cation Specify ad+5, IR0 dress at +5 a IR0 offset from IR0. I/O memory Note (1) When Index Registers IR0 to IR15 are used within function blocks, using the same Index Register within other function blocks or in the program outside of function blocks will create competition between the two instances and the program will not execute properly. Therefore, when using Index Registers (IR0 to IR15), always save the value of the Index Register at the point when the function block starts (or before the Index Register is used), and when the function block is completed (or after the Index Register has been used), incorporate processing in the program to return the Index Register to the saved value. Example: Starting function block (or before using Index Register): 1. Save the value of IR (e. g. , A). Value A Value A IR0 Within function block: 2. Use IR. Value B IR0 At start of function block (or before Index Register is used): 3. Return IR to saved valuev(e. g. , A) Value A Value A IR0 (2) Always set the value before using Index Registers. Operation will not be stable if Index Registers are used without the values being set. 47 Function Block Applications Guidelines Application Examples Section 2-4 The following examples are for using Index Registers IR0 to IR15 within function blocks. Details When Index Registers are used within this function block, processing to save the Index Register value is performed when the function starts (or before the Index Register is used) to enable the value to be returned to the original Index Register value after the function block is completed (or after the Index Register is used). Example: Save the contents of Index Register IR0 by storing it in SaveIR[0] (internal variable, data type DINT, 1 array element). Example: The real I/O memory address for the first word of CIO 1500 + unit number × 25 allocated in the CPU Bus Unit allocation area based on the CPU Bus Unit's unit number (&0 to &15) passed from the function block is stored in IR0. Procedure: Assumes that unit numbers &0 to &15 have already been input (from outside the function block) in UnitNo (input variables, INT data type). Multiple UnitNo by &25, and store in Offset (internal variable, DINT data type) 2. Store the real I/O memory address for SCPU_Relay (internal variable, WORD data type, (if required, specify the array as 400 elements (see note), AT setting = 1500)) in Index Register IR0. [. . . ] Example Appendix B X:=Array; (*Array is an array variable*) Missing ] X:=Array[2; (*Array is an array variable*) Missing constant NOT operation not supported on a literal number Negation not supported by %s data type The NOT operator was used for a numeric value. A minus symbol was used before a variable with a data type that does not support negative values (UINT, UDINT, ULINT). There is no line of valid code (excluding comments). CASE A OF 2. . : X:=1; 2, : X:=2; END_CASE; Result:=NOT 1; Y:=-X; (*X is an UINT type variable, Y is an INT type variable*) There must be one line of valid code (excluding comments) Too many variables specified for Function Undefined identifier '%s' Unexpected syntax '%s' Usage mismatch in Function variable Value out of range Too many parameter settings Y:=SIN(X1, X2); are specified for the function. A keyword (reserved word) or FOR I:=1 TO 100 DO BY -1 (*The DO position is illegal*) variable has been used illeX:=X+1; gally. [. . . ]

DISCLAIMER TO DOWNLOAD THE USER GUIDE OMRON CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION




Click on "Download the user Manual" at the end of this Contract if you accept its terms, the downloading of the manual OMRON CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION will begin.

 

Copyright © 2015 - manualRetreiver - All Rights Reserved.
Designated trademarks and brands are the property of their respective owners.