News:

  • June 09, 2026, 09:38:53 AM

Login with username, password and session length

Author Topic: Timer data  (Read 32885 times)

BGlaw

  • Newbie
  • *
  • Posts: 4
Timer data
« on: January 28, 2008, 10:12:09 AM »
Hello,

I am using a Cmore EA7-S6C-R touch screen and a DL06 PLC.  I am using the recipe function on the touchscreen to set up some testing times (seconds) ands ending them to the PLC via a tag.  The problem is the number i put in does not equal the time i need, 60 does not = 60 seconds.  I am using adress V1700, signed int 16 on the touch screen and on the PLC but it is not working.  I have to put in a false number amd time it to get the time that i need (1500 = 60 seconds).  I am no means an expert so any help would be appreciated. 

Thanks,
Bill

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Timer data
« Reply #1 on: January 28, 2008, 10:15:09 AM »
Timers (and counters) in the ADC PLCs use BCD.  Change the format in your HMI to BCD and it should work.

Note that I said "should"  ;D

BGlaw

  • Newbie
  • *
  • Posts: 4
Re: Timer data
« Reply #2 on: January 28, 2008, 10:18:34 AM »
By HMI, do you mean the touchscreen?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Timer data
« Reply #3 on: January 28, 2008, 10:22:42 AM »
Yes, HMI is an old acronym for Human-Machine-Interface (it came from MMI, Man-Machine-Interface, but because Man could be interpreted as being exclusively the Male of the species, it change to HMI, then OI Operator Interface because I guess some places hire non-humans?, then OP Operator Panel, because, well I don't know why)   ;D

BGlaw

  • Newbie
  • *
  • Posts: 4
Re: Timer data
« Reply #4 on: January 28, 2008, 04:59:51 PM »
Thanks,

Up and running.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Timer data
« Reply #5 on: January 28, 2008, 05:06:29 PM »
Did you see my post on the ADC forum discussing your possible other usage of V1700?  Just a caveat, but it doesn't hurt to make sure you aren't doing any "decimal" math in the PLC when it's actually BCD.

BGlaw

  • Newbie
  • *
  • Posts: 4
Re: Timer data
« Reply #6 on: January 30, 2008, 09:51:32 AM »
Yes. Thanks. Got it working. I am just using the recipe function to turn some valves on and off for a specified amount of time. No math on this portion. I am also counting the Pass and Fails and counting both pass & fail (for a total count) and displaying it on the screen. Is there a way to add the pass and fail instead of counting both for a total? I am using 3 counters now?
Thanks,
Bill

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Timer data
« Reply #7 on: January 31, 2008, 10:50:27 AM »
Yes, add the two current values together using LD ADD OUT, or use the MATHBCD IBox
I'll assume you are using CT0 and CT1
LD CTA0
ADD CTA1
OUT V2000  // V2000 will contain the BCD value of the two added together

CTA0 is an alias for V1000.  It is CounTer Accumulator for counter 0.  (TA0 is the Timer Accumulator for timer 0, and represents V0)

The MATHBCD IBox allows you to enter it like an Excel forumula
MATHBCD V2000 "CTA0 + CTA1"