A timer preset that loads as the wrong number is a data format mismatch. Read the timer instruction on the rung, set the keypad object to BCD INT 16 for TMR and TMRF or BCD INT 32 for TMRA and TMRAF, point the object at the preset register the instruction reads, and prove the write with a test preset of 100 counts.
A timer preset that loads as the wrong number is almost never a broken keypad. It is a data format mismatch: the keypad object encodes your entry one way and the PLC timer instruction decodes the same word another way. The fix is to read the timer instruction on the rung first, then set the object's data format to match: BCD INT 16 for a TMR or TMRF preset, BCD INT 32 for TMRA or TMRAF. Then point the object at the preset register that instruction actually reads and prove the write with one test value before the machine runs again.
Symptoms and what each points to
- Timer finishes early by a strange ratio. A preset of 100 runs 6.4 seconds instead of 10.0 on a 0.1 second base. The object wrote your number as a binary integer and the PLC decoded the word as BCD: 100 in binary is 0x0064, and a BCD decoder reads that word as 64.
- The PLC raises a number-format fault on the preset. The word contains hex digits above 9, which a BCD register cannot represent. Typing 250 into a decimal object puts 0x00FA on the wire, and neither F nor A is a BCD digit. A walk-through of TMRA preset BCD conversion errors shows what that looks like on one platform.
- The value you need is above 9999 and the timer rejects it. A 16-bit BCD preset holds four digits, maximum 9999. Larger presets belong to the 32-bit family, whose BCD word holds eight digits, up to 99,999,999.
- The keypad echoes your entry but the stored preset differs. The object is pointed at the wrong register or set to the wrong format. Compare the word at the preset register with your entry before changing anything else.
- The preset writes and then falls back to zero, or the timer ignores the write. That is a different fault with its own checks: see fix an HMI timer preset that resets to zero in the PLC.
Match the format to the timer instruction
Open the PLC program and read the instruction that drives the timer on the rung. The instruction name decides the preset format, and the two families are not interchangeable:
| Timer instruction on the rung | Keypad object data format |
|---|---|
| TMR, TMRF | BCD INT 16 |
| TMRA, TMRAF | BCD INT 32 |
BCD stores each decimal digit in its own 4-bit group. Sixteen bits therefore carry four digits and a maximum of 9999; thirty-two bits carry eight digits and a maximum of 99,999,999. A plain binary integer uses all sixteen bits as one number, so the same word means different decimal values to the keypad and to the timer. That is the odd-ratio symptom above. The four instructions and their differences are laid out in a reference on TMR, TMRA, TMRF and TMRAF timer types. If the rung runs some other timer instruction, read that instruction's preset format in the PLC instruction manual before you configure the object.
Check the keypad object's format and destination
Open the keypad object's settings and find the field the editor calls display format or data type. That is the field to change, and the table above gives its value. Two checks go with it:
- Destination. The object must write to the preset register address the timer instruction reads. Take the address from the rung itself, not from the instruction's name. A clean write to the wrong register leaves the real preset untouched.
- Width. If the preset you need is above 9999, the rung must be on the 32-bit family too. A 16-bit object pointed at a 16-bit BCD register cannot store a fifth digit.
If many keypad objects carry the wrong format, changing the tag data type once is quicker than editing each object: see change an HMI tag data type without rebuilding every object.
Example: a 100-count preset on a 0.1 second timer
Inputs:
- Instruction on the rung: TMR, read from the program. Required object format: BCD INT 16.
- Time base: 0.1 s per count. This timer family takes its preset as the run time in tenths of a second.
- Wanted run time: 10.0 s, a cooling fan run-on after the drive stops.
- Preset to enter: 10.0 s ÷ 0.1 s = 100 counts.
Rule: with the object set to signed decimal (a binary integer), the keypad writes the typed number in binary and the PLC decodes the same 16-bit word as BCD.
Wrong setting, the arithmetic:
- 100 in binary: 100 = 6 × 16 + 4, so the word is 0x0064, or 0000 0000 0110 0100.
- The PLC reads the nibbles as BCD digits 0, 0, 6, 4: a preset of 64 counts.
- Run time: 64 × 0.1 s = 6.4 s. That is 3.6 s short of the 10.0 s wanted.
Correct setting (BCD INT 16), the arithmetic:
- 100 as BCD: digits 0, 1, 0, 0, the word 0x0100, or 0000 0001 0000 0000.
- The PLC decodes 100 counts: 100 × 0.1 s = 10.0 s. The timed cycle matches the entry.
Decision: with TMR or TMRF on the rung, BCD INT 16 is the only setting that makes the typed number and the stored number agree. The same arithmetic sets the ceiling for the 32-bit side: 1 hour at 0.1 s per count is 36,000 counts, which needs five digits, so it cannot live in BCD INT 16 at all and the rung must be TMRA or TMRAF with BCD INT 32.
Set the format and prove the write
- Back up the HMI project and note the keypad object's current format and destination address.
- Read the rung: the timer instruction, and the preset register address it reads.
- Set the object's data format to BCD INT 16 for TMR and TMRF, BCD INT 32 for TMRA and TMRAF.
- Set the destination to the preset register address from step 2.
- Download or apply the project with your site's usual procedure.
- Put the machine in a safe test state, guards active, and enter a permitted test preset: 100 counts on a 0.1 second family.
- Compare three readings: the value on the keypad, the word stored at the preset register, and the seconds one timed cycle takes. All three must agree: 100, 100, 10.0 s.
- Restore the production preset and watch one complete cycle, start, done, reset, before releasing the machine.
Keep the guard circuit live for the whole test: a timer under test is a machine under test.
Recommendation: Read the rung before you touch the keypad object. Set BCD INT 16 for TMR and TMRF, BCD INT 32 for TMRA and TMRAF, point the object at the preset register address the instruction reads, and accept the change only after a test preset of 100 counts shows 100 on the keypad, 100 in the PLC word, and 10.0 s on the clock.
If the format is right and the timing is still wrong
If the keypad, the PLC word and the instruction family all agree and the timing is still off, stop changing formats. Two suspects remain, and each has its own check. The time base: 10.0 seconds is 100 counts only at 0.1 s per count, and converting minutes and seconds into counts is its own step, covered in enter minutes and seconds into an HMI timer preset. The logic around the timer: a done bit that latches, a reset that fires early, or a preset register the program rewrites every scan. On the PLC side, a conversion that stores nothing at all is a separate fault, covered in fix a PLC real to BCD conversion that writes nothing. And when a displayed value decodes a BCD register badly, that is the read-side twin of this fault: an HMI panel that shows nonsense numbers from a PLC BCD analog register.
Questions
Why does the keypad show the right number while the PLC stores a different one?
The keypad object keeps the decimal value you typed and echoes it on screen, so the entry looks right even when the word on the wire is wrong. The truth sits at the preset register. With the wrong format, typing 100 puts 0x0064 on the wire, which a BCD decoder reads as 64.
Can I keep the wrong format and type a corrected value instead?
No. The mismatch is in the encoding, so the result lines up only for a few lucky values. Typing 100 into a decimal object puts 0x0064 on the wire and the timer sees 64; typing 250 puts 0x00FA on the wire, and digits A and F are not valid BCD, so the PLC sees an invalid preset. Set the format once, then type true values.
Why does my preset stop at 9999 when the entry field allows more?
A 16-bit BCD word stores four decimal digits, so the largest preset it can hold is 9999. The object's own entry limit may look larger, but the PLC register cannot represent the value.
What if my PLC program uses a timer instruction outside these four?
This mapping covers TMR, TMRF, TMRA and TMRAF only. Other timer families store presets in their own documented formats: some BCD, some binary, and some pack three BCD digits into 12 bits with a time-base code in the spare bits. Read your instruction's preset format in the PLC instruction manual, then set the keypad object and its destination the same way this article shows.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.