Tuesday, May 25, 2010

Calling and Initializing Function Block of PLC135 WB

Function Blocks (FBs, FXs) are present only once in memory. They can be called once or more by a block and different parameters can be used for each call. Function blocks are programmed are called by specifying a block number (FB 0 to 255 or FX 0 to 255). A function block call can be programmed in an organization, sequence or program block or in another function block. A call comprises the call statement

JU FBn, DO FXn is unconditional call.
JC FBn, DOC FXn is conditional call.
Unconditional call is the function block executed without regard to the RLO.
Conditional call is the function block executed only if the previous result of logic operation is zero (RLO=1).

The parameter list may content no more than 40 variables. The variables from the parameter list replace the formal parameters when the function block is executed. The programmer monitors the order in which the variables are entered in the parameter list.

The programmer automatically generates, but does not display, the jump statement that follows the FB call. The FB call reserves two words in program memory, and each parameter one additional word. The identifiers for the function block’s inputs and outputs and the name of function block are displayed on the programmer when the user programs the function block.

It is therefore necessary that all required function blocks either be resident as function macros in the PLC basic programming.

Newer Post Older Post Home

You may also like these ebook:

Get Free PLC eBook directly sent to your email,
and email subscription to program-plc.blogspot.com

We hate SPAM. Your information is never sold or shared with anyone.

Your Email Will Be 100% Secured !