The leader in industrial automation and control solutions

Instruction Parameters

Supported PLC Series

PLC-AESPLC-FBPLC-ES

Supported Data Registers

MXYKLFTCSZRQD@DConstant
S
D

Supported Flags

FlagBitSupport
ErrorF11.0
ZeroF11.1
CarryF11.2

Number of Steps

Steps
3

Operands

OperandDescription
SThe first operand.
Entries are 8-digit binary-coded decimal (BCD) data registers or constants.
This is the value to square root.

The value range is H0000 ~ H9999.
DThe second operand.
Entries are only 8-digit binary-coded decimal (BCD) data registers.
This is where the square root is saved.

Notice

Error Flag (F11.0) Notice

The error flag, F11.0, will be ON for one scan when the address of the data register assigned by @D exceeds the range of the data register, D. The range of the data register, D, is dependent on the CPU type. F11.0 turns ON when the value of the data for the calculation exceeds the data register assigned to S or D. When the value assigned to S exceeds its range, the value, Infinity (1.#INF00), is stored in the data register D.

Instruction Behavior

The BDSQR and BDSQRP instructions behave as follows:

  • The value of S can only be a positive number.
    • Bit 31 of S must always be 0.
  • The square root result is rounded off from the fifth decimal place.

Ladder Diagram Examples

BDSQR

The BDSQR instruction calculates the square root of the 8-digit binary coded decimal (BCD) value, S, and saves the result in an assigned 8-digit binar

The BDSQR instruction calculates the square root of the 8-digit binary coded decimal (BCD) value, S, and saves the result in an assigned 8-digit binary coded decimal (BCD) data register, D.

When the contact, M1.5, is ON (1), the instruction takes the square root of the value, H00547813, into the resulting radian value, H14390740.

When the contact, M1.5, is ON (1), the instruction takes the square root of the value, H00547813, into the resulting radian value, H14390740.

Ladder Diagram Example for MapleLogic BDSQR/BDSQRP instruction.

Memory Monitor

Memory Monitor for MapleLogic BDSQR/BDSQRP instruction.

BDSQRP

The BDSQRP one-shot instruction calculates the square root of the 8-digit binary coded decimal (BCD) value, S, and saves the result in an assigned 8-d

The BDSQRP one-shot instruction calculates the square root of the 8-digit binary coded decimal (BCD) value, S, and saves the result in an assigned 8-digit binary coded decimal (BCD) data register, D. Every time this instruction executes, it energizes the output only once.

When the contact, M1.6, is ON (1), the instruction takes the square root of the value, H09784312, into the resulting radian value, H98843127.

When the contact, M1.6, is ON (1), the instruction takes the square root of the value, H09784312, into the resulting radian value, H98843127.

Ladder Diagram Example for MapleLogic BDSQR/BDSQRP instruction.

Memory Monitor

Memory Monitor for MapleLogic BDSQR/BDSQRP instruction.