You are not registered yet. Please click here to register!

plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!

Go Back - Interactive Q & A > - Interactive Q & A > LIVE PLC Questions And Answers

Thread Tools Display Modes
Old September 20th, 2022, 08:35 AM   #1
United States

Rsflipflop256 is offline
Join Date: Sep 2022
Location: Rung 256
Posts: 22
DL06 with C-More screen BCD timer

I have a Cmore screen which is communicating to the DL06 in BCD and need to create a timer that works in real numbers for a test, I simply need to make the timer hold open an output for 8 hours.

Ive read a bunch and this thread

seems applicable, but being new at Direcsoft I might need a few pointers.

Need to Load 2 consecutive segment BCD into the PLC and have it do the conversion into a REAL for timer and then shoot it back to the screen to display it?

Would appreciate any help, thanks!
  Reply With Quote
Old September 20th, 2022, 11:41 AM   #2
United Kingdom

parky is offline
parky's Avatar
Join Date: Oct 2004
Location: Midlands
Posts: 5,248
Didn't know timers use real numbers are you sure ? I would have thought it would be in ms (depending on timer) i.e. 10ms, 100ms or IEC type which is a timer type variable i.e. T#5m30s.
  Reply With Quote
Old September 20th, 2022, 11:51 AM   #3
Lifetime Supporting Member
United States

drbitboy is offline
drbitboy's Avatar
Join Date: Dec 2019
Location: Rochester, NY
Posts: 7,005
You don't provide a lot of detail (how do BCD values get from HMI to PLC; where are BCD values in PLC; do the BCD values affect how long the timer runs, or does the timer run for 8h, or does it run for the time that is in the BCD values after conversion to real; are the two 16-bit BCD (4-BCD-digit) values supposed to be combined to a single 8-BCD-digit value; etc.?), and I am no DL06 expert, but it's all just bits, and @bernie_carlton's posts in that thread provide the gist of what I think you are trying to do e.g.

LDD something ### Move BCD value from somewhere into accumulator
BIN ### Convert BCD in accum. to binary (integer) in accum.
BTOR ### Convert binary in accumulator to floating-point real in accumulator
MULR R10.0 ### Multiply real in accum., result in accum.; converts seconds to tenths of a second
RTOB ### Truncate real in accum. to binary integer in accum. (tenths of a second)
BCD ### Convert binary in accum. to BCD in accum. (tenths of a second)
OUTD tmr_preset

Cf. here; see item (i) below. You could also multiply the BCD value by 10 directly in the BCD domain, without converting BCD->binary=>real=>binary=>BCD.

You will need to know when you are moving and/or using 16-bit vs. 32-bit values, but that is in the bookkeeping.

Another example, say the two BCD values are the seconds and tens-of-thousand of seconds for the timer (i.e. 8800bcd for 8800s and 0002bcd for 20ks, so 00028800bcd is 28,800s or 8h).

LDD V2000 ### Assume 8800bcd is in V2000, and 0002bcd is in V2001, this puts 00028800 into 32-bit accumulator
MULD K10 ### Convert 28,800s to 288,000 tenths-of-a-second
OUTD tmra_preset ### Move BCD in accum. (tenths of a second) to timer preset (TMRA)

Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (but no longer ∞ ).
vi) Hakuna matata.
vii) Bookkeeping.
  Reply With Quote
Old September 22nd, 2022, 02:53 PM   #4
United States

Rsflipflop256 is offline
Join Date: Sep 2022
Location: Rung 256
Posts: 22

I appreciate the insight
  Reply With Quote
Jump to Live PLC Question and Answer Forum

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
SLC Timer Glitch CanSpellPLC LIVE PLC Questions And Answers 21 January 25th, 2021 09:59 AM
Migration Panel View Kristian LIVE PLC Questions And Answers 2 August 8th, 2014 12:32 PM
PV Standard Screen Control naegely LIVE PLC Questions And Answers 4 October 3rd, 2012 02:25 PM
PLC directed Screen Changes in C-more Tharon LIVE PLC Questions And Answers 12 August 14th, 2007 09:51 AM
Ton Timer ICAPALDO LIVE PLC Questions And Answers 41 December 21st, 2004 05:43 PM

All times are GMT -4. The time now is 04:52 PM.