beautypg.com

Bcd to integer (bcd_to), C.9.9 bcd to integer (bcd_to) – Nematron Pointe Controller User Manual

Page 438

background image

Appendix C: Ladder Diagram Block Reference

Pointe Controller User Guide

436

Configuration Reference

The parameters of this block are described in the following table:

Param

Name

Config

Var Type

Description

EN

Enable

no

-

The state of the rung (off/on)
received from the left.

ENO

Enable
Out

no

-

The state of the rung (off/on)
passed to the right.

IN

Input
Value

req

unsigned*

The input value.

OUT

Output
Value

req

any integer**

The result of converting the input
value into a binary coded decimal
(BCD). NOTE: Although the variable
type is an integer, the value stored
in the variable is still a BCD.

* Any unsigned (UB, UW, UD) Input or Memory tag. For more information, see “

Defining Input,

Output, Memory tags

” on page 114

.

** Any Memory or Output tag except 32-bit Real (F) or Bit (X). For more information, see “

Defining

Input, Output, Memory tags

” on page 114

.

NOTE: This function does not check for bit register overflow. You can assign any
variables you wish, but if the size of the resulting BCD exceeds the available space
in the output variable, then the high-order nibbles are discarded.

C.9.9 BCD to Integer (BCD_TO)

When used in a Ladder Diagram, the BCD_TO block converts a binary coded
decimal (BCD) into an equivalent integer value.

Select the

tool (from the

Miscellaneous Blocks

toolbar) and click on a ladder

rung to insert the following block:

Once the block is inserted, you can double-click on it to

configure

it.

Functional Description

This block always passes the Enable input state (EN) through to the Enable Out
output state (ENO) without change; when EN becomes on, ENO is turned on, and
when EN becomes off, ENO is turned off.