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 April 19th, 2015, 09:40 PM   #1
Snap25
Lifetime Supporting Member
United States

Snap25 is offline
 
Join Date: Dec 2014
Location: Michigan
Posts: 237
1 sec pulse bit running up my ADD instruction to fast

Objective :

Once the inlet flow drops below the set point on the filter chamber it starts a cleaning sequences and flushes the filter with pulses air and water to break up the solids that are building up on the sleeves.


Logic to control how many pulses to run to flush each sleeve :

I'm using a 1 second pulsing bit created from the status files to add up my pulses with an ADD and LEQ instructions.

Every time it pulses it is supposed to add 1 to the ADD destination but during that "1" second when it pulses, it adds up more like 8! The rest of the logic works correctly but I'm just not getting the pre set amount of pulses to clean each sleeve because its accumulating more than 1 in that one second pulse!!


Am I going about this the wrong way?
  Reply With Quote
Old April 19th, 2015, 10:06 PM   #2
MATT116
Member
United States

MATT116 is offline
 
Join Date: Dec 2009
Location: Dallas, TX
Posts: 330
You'll get more help if you let people know what software and hardware you are using. Part numbers and versions
  Reply With Quote
Old April 19th, 2015, 10:08 PM   #3
Snap25
Lifetime Supporting Member
United States

Snap25 is offline
 
Join Date: Dec 2014
Location: Michigan
Posts: 237
Rslogix 500
Micrologix 1100
  Reply With Quote
Old April 19th, 2015, 10:14 PM   #4
MATT116
Member
United States

MATT116 is offline
 
Join Date: Dec 2009
Location: Dallas, TX
Posts: 330
Ok what triggers your sec pulse?
Not sure if the ML1100 supports theses but maybe look at the S:4/6 bit or use the STI if you need a precise sec pulse
  Reply With Quote
Old April 19th, 2015, 10:20 PM   #5
Gil47
Member
New Zealand

Gil47 is offline
 
Gil47's Avatar
 
Join Date: Apr 2007
Location: South Island, NewZealand
Posts: 1,319
You need to use a one shot after the status bit before the add
this will allow only one pulse to the add per 2 second if you have
used the status bit that changes state ( 0 or 1 ) at that rate

Without the ons or osr
what you are probably seeing add up is the scan rate
or it maybe the bit you selected is the one eighth of a second
move it up three more bits

Last edited by Gil47; April 19th, 2015 at 10:25 PM.
  Reply With Quote
Old April 19th, 2015, 10:21 PM   #6
Snap25
Lifetime Supporting Member
United States

Snap25 is offline
 
Join Date: Dec 2014
Location: Michigan
Posts: 237
Quote:
Originally Posted by MATT116 View Post
Ok what triggers your sec pulse?
Not sure if the ML1100 supports theses but maybe look at the S:4/6 bit or use the STI if you need a precise sec pulse

I'm using the one second bit from the status file. I thought the one second timer seemed pretty accurate but I guess not because during that 1 second it makes the run true, it adds around 8 instead of 1 to my add instruction.
  Reply With Quote
Old April 19th, 2015, 10:25 PM   #7
Snap25
Lifetime Supporting Member
United States

Snap25 is offline
 
Join Date: Dec 2014
Location: Michigan
Posts: 237
Quote:
Originally Posted by Gil47 View Post
You need to use a one shot after the status bit before the add
this will allow only one pulse to the add per 2 second if you have
used the status bit that changes state ( 0 or 1 ) at that rate

Thank you.
  Reply With Quote
Old April 19th, 2015, 10:27 PM   #8
JHarbin
Member
United States

JHarbin is offline
 
Join Date: Sep 2009
Location: NC
Posts: 874
Quote:
Originally Posted by Snap25 View Post
Objective :

Once the inlet flow drops below the set point on the filter chamber it starts a cleaning sequences and flushes the filter with pulses air and water to break up the solids that are building up on the sleeves.


Logic to control how many pulses to run to flush each sleeve :

I'm using a 1 second pulsing bit created from the status files to add up my pulses with an ADD and LEQ instructions.

Every time it pulses it is supposed to add 1 to the ADD destination but during that "1" second when it pulses, it adds up more like 8! The rest of the logic works correctly but I'm just not getting the pre set amount of pulses to clean each sleeve because its accumulating more than 1 in that one second pulse!!


Am I going about this the wrong way?
It sounds like your 1 second pulse is staying true for more than one scan of the processor. Use something like an OSR to make sure that it is only on for one scan.

However, if you are only trying to count seconds, you could start a timer and use your compare statement with the .ACC of the timer. You won't actually use the timer, just use the Accumulated value to count seconds.

This is off the top of my head, I don't work with A-B processors as much as I used to.
  Reply With Quote
Old April 19th, 2015, 10:35 PM   #9
Snap25
Lifetime Supporting Member
United States

Snap25 is offline
 
Join Date: Dec 2014
Location: Michigan
Posts: 237
Quote:
Originally Posted by JHarbin View Post
It sounds like your 1 second pulse is staying true for more than one scan of the processor. Use something like an OSR to make sure that it is only on for one scan.

However, if you are only trying to count seconds, you could start a timer and use your compare statement with the .ACC of the timer. You won't actually use the timer, just use the Accumulated value to count seconds.

This is off the top of my head, I don't work with A-B processors as much as I used to.
I'm going try putting an OSR bit first and go from there. That should do it.. I don't know why I didn't think of that!
  Reply With Quote
Old April 19th, 2015, 11:27 PM   #10
ndzied1
Lifetime Supporting Member
United States

ndzied1 is offline
 
ndzied1's Avatar
 
Join Date: Aug 2002
Location: Chicago, Illinois
Posts: 2,380
The flossing bits are 50% duty cycle. So a 1 sec flasing it on for .5 sec and off for .5 sec.
__________________
nOrM
======================
nOrM=Norman Dziedzic Jr.
"I decry the current tendency to seek patents on algorithms. There are better ways to earn a living than to prevent other people from making use of one's contributions to computer science." Donald Knuth
  Reply With Quote
Old April 19th, 2015, 11:40 PM   #11
Mickey
Lifetime Supporting Member
United States

Mickey is offline
 
Mickey's Avatar
 
Join Date: May 2003
Location: Palmdale,Ca
Posts: 10,146
Depending on how low the cleaning cycle last you could use a counter instruction instead of an add instruction. A counter only increments on a false to true transition. The add instruction adds each scan while rung is true.
__________________
Mickey

If you want happiness for an hour-take a nap. If you want happiness for a day-go fishing. If you want happiness for a month-getmarried. If you want happiness for a year-inherit a fortune. If you want happiness for a lifetime-help someone else.
----- Chinese Proverb
  Reply With Quote
Old April 20th, 2015, 09:20 AM   #12
Tom Jenkins
Lifetime Supporting Member
United States

Tom Jenkins is offline
 
Tom Jenkins's Avatar
 
Join Date: Apr 2002
Location: Milwaukee, WI
Posts: 5,920
Use the pulse bit to trip a counter, not an add instruction. The counter only increments up on a change of status, not every scan.
  Reply With Quote
Old April 20th, 2015, 12:39 PM   #13
FactoryTalktotheHand
Member
United States

FactoryTalktotheHand is offline
 
Join Date: Nov 2013
Location: Michigan
Posts: 505
Quote:
Originally Posted by Snap25 View Post
Objective :

Once the inlet flow drops below the set point on the filter chamber it starts a cleaning sequences and flushes the filter with pulses air and water to break up the solids that are building up on the sleeves.


Logic to control how many pulses to run to flush each sleeve :

I'm using a 1 second pulsing bit created from the status files to add up my pulses with an ADD and LEQ instructions.

Every time it pulses it is supposed to add 1 to the ADD destination but during that "1" second when it pulses, it adds up more like 8! The rest of the logic works correctly but I'm just not getting the pre set amount of pulses to clean each sleeve because its accumulating more than 1 in that one second pulse!!


Am I going about this the wrong way?
You need to add ONS instructions before your ADD instructions. What's happening is the Status file Pulse bit stays on for more than one scan, so whenever the pulse bit is on, it will add 1 to your total every time that piece of logic scans. Certain instructions, like CTU and CTD have this built in and only execute on false-to-true transitions, but that is not the case with arithmetic instructions. Either use a CTU instruction instead or add a ONS.
  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
S7 Indirect bit addressing curlyandshemp LIVE PLC Questions And Answers 1 October 4th, 2006 02:40 AM
PLC-5 MSG Instruction .TO bit Steve Cav LIVE PLC Questions And Answers 1 September 10th, 2006 12:57 PM
FBC(file bit comparison) instruction thejerryguy LIVE PLC Questions And Answers 2 September 27th, 2005 11:44 AM
S7 - using Arrays with Multiplex Addressing in ProTool RMA LIVE PLC Questions And Answers 4 August 12th, 2005 08:39 AM
Start of Scan Beryl LIVE PLC Questions And Answers 31 September 25th, 2003 11:11 AM


All times are GMT -5. The time now is 01:41 PM.


.