You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old October 16th, 2013, 02:31 PM   #1
lolproe
Member
Canada

lolproe is offline
 
Join Date: May 2013
Location: Canada
Posts: 11
Micro850 Counter Driver

Hey guys, I'm trying to build a basic counter on an AB Micro 850. I want it to count from 0 to 3, and then reset it back to 0 and repeat the process forever. The counter should increment once roughly once every 230ms.

The image below is how it's implemented now:



From my understanding, this setup should work, assuming that fast_flash has a rising edge every 230ms. Once the counter reaches 4, reset will be set to TRUE. The next time this block is evaluated, it will see that reset is true and set the counter back to zero. I don't see any issues with this, but if anyone sees any problems it would be appreciated.

My real concern is generating the pulses to drive the counter. I can't find any elegant way to generate periodic pulses on the Micro850, so I was hoping that someone could give me some advice. This is how I have it now:



I pretty much have two timers, one for each of the on/off durations, which cause a chain of events that make them start/reset each other forever. This seems extremely convoluted to me, and I'm not really confident that this is a dependable setup.

The reason I'm asking this is that when I run this program, everything works fine...for a while. When I did short-term testing of the program (less than a few hours) I never ran into problems, but after I left the PLC running full-time for a few days, I noticed a problem that can only really be explained by the counter not working. I'm not sure if it's due to the counter being constantly reset, the counter running towards an overflow or the square-wave driving the counter falling out of sync and causing it to freeze the counter.

I'm not sure what could be causing this problem, so I was hoping that someone could look at my PLC functions and see if there's a better way to implement the counter, or if I'm doing something that might lead to problems.
  Reply With Quote
Old October 16th, 2013, 03:13 PM   #2
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 6,243
I haven't programmed these but the solution looks fairly straightforward.

CTU1 - change input contact 'fast_flash' to 'A_temp2'

TON_1 - change input from 'fast_flash' to 'NOT A_temp2' (I don't know how the NC of a bool is shown. I'll leave that up to you.)

TON_2 - change 'A_flash_Off' to 'A_temp1'

Remove the four rungs that have 'Set' and 'Reset'
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Old October 16th, 2013, 03:50 PM   #3
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 6,243
Or even simpler, after completing my previous post ...

Delete TON_1

TON_2 - change 'A_temp1' input to 'NOT A_temp2'
then change the PT value to 'T#230ms'
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
1747-PIC/AIC Driver on SP3 w/ patch Tim James LIVE PLC Questions And Answers 13 July 20th, 2013 09:25 PM
Digital Counter "jumping" rguimond LIVE PLC Questions And Answers 4 March 3rd, 2010 03:17 PM
Interact PS10 HMI SLC5 Driver 8H Error Request Timeout [2] JLDrescher LIVE PLC Questions And Answers 4 July 22nd, 2009 11:04 PM
AB Micro High Speed Counter Trouble Rocky Cortis LIVE PLC Questions And Answers 2 September 19th, 2004 01:09 PM
Different RSlinx drivers TimeFluxCap LIVE PLC Questions And Answers 22 November 25th, 2003 07:56 PM


All times are GMT -5. The time now is 12:34 PM.


.