beautypg.com

Real to integer (rtoi), Inputs, Outputs – Watlow LogicPro User Manual

Page 171: Square root (srt), Real to integer (rtoi) square root (srt), Figure 10.35— real to integer function block

background image

LogicPro User’s Guide

Chapter 10: Function Blocks

Doc.# 28002-00 Rev 3.00

Watlow Anafaze

155

ROUT is the Integer To Real function block real-number
output. This is the value of the integer passed to the IN
changed to real-number format.

Real to Integer (RTOI)

The Real To Integer (RTOI) function block, shown in Figure
10.35
, converts values of type real to type integer. The
converted real value is then stored in the real Variable
assigned to the output.

Figure 10.35 Real to Integer Function Block

Inputs

EN is the Real to Integer enable bit. A True condition of this
bit causes the integer inputted to RIN to be converted to a real
number. In a program using Ladder logic, the value of EN is
determined by the Boolean evaluation of elements placed
between the left power rail and EN in the function block. In
FBD programs, the value of EN is determined by the Variable
connected to EN. If no contacts are placed on the rung before
EN in a Ladder Diagrams program, the value of EN is always
True. In FBD, all inputs must be connected to a Variable.

RIN is the Real To Integer function block real-number input to
be converted when EN is True.

Outputs

Q is the Real To Integer function block output bit. This bit is
enabled and passes power while a True condition of the enable
bit occurs.

OUTP is the Real To Integer function block integer output.
This is the value of the real-number passed to the RIN changed
to integer format.

Square Root (SRT)

The Square Root (SQRT) function block, shown in Figure
10.36 on page 156
,
calculates the square root of the real value
entered at its input RIN.

SQRT places the result in the Variable assigned to ROUT when
the enable bit (EN) is True. The values of RIN can be preset to