Internet PLC Forum

General => Technical support => Topic started by: kenobe on July 20, 2008, 12:09:35 AM

Title: reversible counter
Post by: kenobe on July 20, 2008, 12:09:35 AM
Hi ::)
I need to set up a reversible counter to count some events
I am using T100m 888
I read the referene manual.pdf , but could not quite figure it out.
can someone pls tell me how to do it.


Thanks
Title: Re:reversible counter
Post by: support on July 20, 2008, 10:27:06 AM
   Ctup        C1
|--||-------[UpCtr]

   CtDn        C2
|--||-------[DNCtr]


[UpCtr] and [DnCtr] functions are available from the special function menu ----[Fn]9
Title: Re:reversible counter
Post by: kenobe on July 21, 2008, 01:52:12 AM
Thanks for your reply.
but  can I not then use one counter eg:C1 as reversible up/down counter.
My program is as follow:



  CtUp    C1
|--||---( Upctr)
  CtDn    C1
|--||---( Dnctr)

so that I can use ctup and ctDn to count up/down of Counter C1?

how do I compare the counter value with some value say '4'?
ie: how do I know that the counter has counted 4 which is not the set value

Thanks

Title: Re:reversible counter
Post by: support on July 21, 2008, 02:21:01 AM
Sorry, my typo error. Yes, I meant that both functions operates on counter C1 so your circuit is correct.

If you use a TBASIC custom function, you can easily check the value of the counter:

IF CTRPV[1] = 4 THEN
   ...
ELSE
   ...
ENDIF


Title: Re:reversible counter
Post by: kenobe on July 22, 2008, 10:51:33 PM
Thank you very much , sincerely