Host Engineering Forum
General Category => DirectSOFT => Topic started by: BGlaw 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
-
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
-
By HMI, do you mean the touchscreen?
-
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
-
Thanks,
Up and running.
-
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.
-
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
-
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"