Software Tools

Description

  • This program converts 16-bit unsigned Integer Value register 40001 into 16-bit unsigned (Binary Coded Decimal) BCDValueU register 40035.
  • To accomplish this, the following steps are executed:

Using Integer Value = +7498 as an example;

1) Split Integer Value into four independent digits:
+7498 gives:

Digit 1 = +7
Digit 2 = +4
Digit 3 = +9
Digit 4 = +8

2) Convert each integer digit into its binary equivalent.

7 = 0111
4 = 0100
9 = 1001
8 = 1000

3) Combine the four groups of bits into one 16-bit BCD word as follows:

0111 0100 1001 1000

4) Convert this 16-bit word to its integer equivalent = 29848 = BCDValue

  • The Register Editor dialog has been pre-configured to display all pertinent registers used in this program.
  • The controller type has been pre-selected as SCADAPack.
  • Refer to the "Ladder Logic Function Reference | Ladder Logic Function Reference | Ladder Logic Functions" section of the "TelePACE User and Reference Manual" for information on the unsigned math functions: ADDU, SUBU, DIVU and MULU.

Instructions

To use this sample program:

  • Select the following link: INTTOBCD.ZIP
  • Select the Open button. (Winzip is opened)
  • Select the Use Evaluation Version button. (The Winzip program list is displayed)
  • From Winzip, select both files in the display list and then extract both files to a target folder on your computer.
  • Exit Winzip.
  • Open the TelePACE application.
  • Select File | Open to display the Open File dialog box.
  • Browse to the appropriate directory where the files are located and select the .LAD file.
  • Select the OK button to open the file