
adccommunitymod (AutomationDirect) asked a question.
Created Date: January 28,2016
Created By: NATEM
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I have a liquid filling machine application for which I am using a Click PLC and a Cmore EA9 HMI. The fill heads use a count down timer to give us our desired fill weight. The problem I have is the maximum time I can put in the DS data register for timers is 32767 ms because it is a 16 bit register. If I want to go higher than that, I have to set the units to seconds. That is not good because we need finer time adjustments than whole seconds. I am wondering if there is any kind of work around to get more than 32.767 seconds on the timer.
Created Date: January 28,2016
Created by: kewakl
You could cascade a timer an a counter.
Have a timer time for (?) 10 mS and expire. Then have a counter count the expirations of the timer. Reset the timer and go again.
Or the expiration could trigger a math box to count the expirations in a DD location.
Then your code could do whatever you need to relate the counting of 10 mS intervals to the timing you require.
Created Date: January 28,2016
Created by: NATEM
Thank you for the reply kewakl.
It should be a fun challenge to work that one out. I don't have a lot of experience programming. It will be cool if I can pull it off though.
Created Date: January 28,2016
Created by: kewakl
If 1/2 second resolution is good enough, make the timer 500mS.
Created Date: January 29,2016
Created by: Tinker
Once one is using a counter (which use long integers so range won't be much of a problem, one could count more than three weeks at 1ms) there are system bits for various time intervals, SC5 is 100ms, might be a good option. There is also SC4 at 10ms, but as that is 5ms on and 5ms off I'd be a bit worried about scan time.
I hesitate to mention this since you said; "It should be a fun challenge to work that one out. I don't have a lot of experience programming "
But, the CLICK does have timed interrupts, one could increment a DD register, in a 10ms interrupt without any problem. I once did that at 1ms for a tachometer application, while it did seem to work, I think 1ms might be pushing ones luck a bit, and that was only incrementing a register in the interrupt program, to actually do anything at a millisecond resolution ones handler might be too long for that rate (in my tachometer I used a hardware interrupt triggered by a prox. sensor to make a copy of the time, which I then processed in the regular "main " program.)
Created Date: February 19,2016
Created by: NATEM
100 ms timer
Tinker
The 100 ms clock pulse works.
Now I just have to build it into the rest of my program.
Thanks
Created Date: January 28,2016
Created by: NATEM
I have a liquid filling machine application for which I am using a Click PLC and a Cmore EA9 HMI.
The fill heads use a count down timer to give us our desired fill weight.
The problem I have is the maximum time I can put in the DS data register for timers is 32767 ms because it is a 16 bit register. If I want to go higher than that, I have to set the units to seconds. That is not good because we need finer time adjustments than whole seconds.
I am wondering if there is any kind of work around to get more than 32.767 seconds on the timer.