DL06 with C-More screen BCD timer

Rsflipflop256

Lifetime Supporting Member
Join Date
Sep 2022
Location
Rung 256
Posts
68
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 https://www.plctalk.net/qanda/showthread.php?p=924337#

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!
 
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.
 
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)


 

Similar Topics

I have written one program with FDB. Thought I could therefor write code for an automation direct DL-06. Huge learning curve. I believe I have...
Replies
3
Views
1,735
What I think happened: Direct Logic DL06 in a coffee roaster which had a loose +24v connection (the +24 ran into a analog IO module), the +24v...
Replies
2
Views
1,744
can anyone offet help setting the real time clock on a dl06 plc from cmore . writing directly to the vmemory locations does not seem to work ?
Replies
1
Views
1,949
Hello all, This is my first post to the forum, although I've been reading and gleaning info from other's posts here for years. The amount of...
Replies
5
Views
7,259
Hi, Mostly AB guy here with a little Koyo experience, but all of its digital. I get handed three analog I/O cards and asked to prove that they...
Replies
6
Views
479
Back
Top Bottom