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 February 5th, 2018, 06:39 PM   #1
Saturn_Europa
Member
United States

Saturn_Europa is offline
 
Saturn_Europa's Avatar
 
Join Date: May 2016
Location: USA
Posts: 42
Number of Running Pumps

Compact Logix
RS Logix 5000 v20.04
Function Block or Ladder

I want to create a new tag in a PLC for a large pump station that will allow me to historize the number of pumps that are running. This tag will be used in a high performance HMI graphic. The pump station has 6 pumps. I thought I would simply be able to use an "add block" to add up the number of boolean run indicator tags that are true or 1. The "add block" will not allow me to connect a boolean output tag to it. It appears that the "add block" will only allow float data types.

Is there and elegant way to solve this? I thought about using the ssum (selective summer block) but that requires a float also.
  Reply With Quote
Old February 5th, 2018, 06:46 PM   #2
OkiePC
Lifetime Supporting Member
United States

OkiePC is offline
 
OkiePC's Avatar
 
Join Date: Mar 2005
Location: ENE of Nowhere Oklahoma
Posts: 9,681
Not elegant, but simple, just create a temporary storage tag (I'd use a DINT).

Zero it (CLR Dummy)

XIC Running_Pump_1 ADD Dummy, 1, Dummy
XIC Running_Pump_2 ADD Dummy, 1, Dummy
XIC Running_Pump_3 ADD Dummy, 1, Dummy

etc for all the pumps,

MOV Dummy, ToHMI_Pumps_Running

Use the separate dummy tag to ensure that the actual tag displayed by the HMI does not pick up its value during this little section of logic where the value could be less than the number actually running.
__________________
It's not all the variables I am most concerned with, it's the undiscovered constants.
  Reply With Quote
Old February 5th, 2018, 06:54 PM   #3
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,297
Quote:
Originally Posted by OkiePC View Post
Not elegant, but simple, just create a temporary storage tag (I'd use a DINT).

Zero it (CLR Dummy)

XIC Running_Pump_1 ADD Dummy, 1, Dummy
XIC Running_Pump_2 ADD Dummy, 1, Dummy
XIC Running_Pump_3 ADD Dummy, 1, Dummy

etc for all the pumps,

MOV Dummy, ToHMI_Pumps_Running

Use the separate dummy tag to ensure that the actual tag displayed by the HMI does not pick up its value during this little section of logic where the value could be less than the number actually running.
+1 for simplicity, any "elegance" you introduce will be swamped by others not understanding what you have done.

And to be honest, the "brute force" method often outperforms other methods that are less transparent to the observer.

And definitely use a DINT as OkiePC suggests, it is the most efficient data-type in Logix5000 controllers.
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Old February 5th, 2018, 06:56 PM   #4
rupej
Member
United States

rupej is offline
 
Join Date: Sep 2014
Location: NC
Posts: 341
Check post #3 of this thread for an "elegant" way to do it in FB.
http://www.plctalk.net/qanda/showthread.php?t=65123

That said, if it were me, I'd use OkiePC's suggested method.
  Reply With Quote
Old February 5th, 2018, 08:47 PM   #5
Saturn_Europa
Member
United States

Saturn_Europa is offline
 
Saturn_Europa's Avatar
 
Join Date: May 2016
Location: USA
Posts: 42
Thank you everyone for their posts! I'll give Okie's method a try tomorrow.
  Reply With Quote
Old February 6th, 2018, 07:43 AM   #6
Saturn_Europa
Member
United States

Saturn_Europa is offline
 
Saturn_Europa's Avatar
 
Join Date: May 2016
Location: USA
Posts: 42
How do I:


Zero it (CLR Dummy)
  Reply With Quote
Old February 6th, 2018, 07:58 AM   #7
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,297
Quote:
Originally Posted by Saturn_Europa View Post
How do I:


Zero it (CLR Dummy)
Use the CLR instruction, and just put the tagname you want to clear (to zero)
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Old February 6th, 2018, 08:13 AM   #8
Saturn_Europa
Member
United States

Saturn_Europa is offline
 
Saturn_Europa's Avatar
 
Join Date: May 2016
Location: USA
Posts: 42
Quote:
Originally Posted by daba View Post
Use the CLR instruction, and just put the tagname you want to clear (to zero)
Got it!! Thank you!
  Reply With Quote
Old February 6th, 2018, 09:26 AM   #9
Saturn_Europa
Member
United States

Saturn_Europa is offline
 
Saturn_Europa's Avatar
 
Join Date: May 2016
Location: USA
Posts: 42
The code is up and running.


Thank you everyone for the help!!
  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
Counting running time for 3 pumps Heimerdinger LIVE PLC Questions And Answers 2 April 11th, 2014 01:16 PM
Dedicated Virtualization Rigs...Anyone running one? Paully's5.0 LIVE PLC Questions And Answers 10 June 30th, 2013 12:51 PM
Howto read serial number of CLX 1756-L61? oldnewbee LIVE PLC Questions And Answers 9 June 18th, 2008 08:46 AM
Usless but maybe fun excercise ndzied1 LIVE PLC Questions And Answers 6 May 15th, 2006 06:28 AM
hi mehkocak LIVE PLC Questions And Answers 9 April 28th, 2006 07:17 AM


All times are GMT -5. The time now is 11:01 AM.


.