Address multiple pumps by passing parameters

wfortuny

Member
Join Date
Jan 2011
Location
Portland OR
Posts
19
I am trying to create a single routine that can control multiple pumps. My pump tags are all different data types for each pump, i.e. bool, real, alias bool, alias real, timers, ...

The tags are all in the format: pump1_in_remote, pump1_running, pump1_Start, ...

Is there a way to pass a parameter into the routine into a variable such as "pump_number", and address all rungs in routine: pump[pump_number]_in_remote, pump[pump_number]_running, ...


All pumps are controlled identically, and I would prefer to not have hundreds of rungs to repeat the same process over and over for all 25 pumps?

Thanks,
 
For ease of data handling I would create a UDT containing all the pump data including timers, counters etc.

Then create an AOI which accepts a rag of the UDT type as an input/output argument.

Then invoke the AOI once for each pump. It is a lot more compact. If you choose to change the logic you just change the AOI definition once and re-download.

Edit - you might leave the actual input and output points out of the UDT and provide them as AOI arguments.
 
You need to specify which PLC platform you're using if you want specific help.

The way I do this with Schneider's Unity is using a derived function block. Inputs are pump in auto, running feedback, thermal OL etc. Outputs are Running, Faulted, an actual run command bit that gets copied to a digital output, etc. I then create an instance of that function block for each pump.

This simplifies the code that I have to take care of immensely. No worrying about pointers and the code I write inside each function block can be monitored online individually for that instance, which makes troubleshooting much easier.
 
When someone posts leaving out information I view their previous posts as a guide to the equipment being discussed. It's not a guarantee, but it saves time usually.
 

Similar Topics

I am trying to solve a Citect problem I want to combine a couple of IO Servers onto a single computer, however when i put both IO servers onto a...
Replies
10
Views
11,988
i have two plc 1. s7-1212dc/dc/dc ip; 192.168.0.1 2. s7-1500 1513-1pn ip; 192.168.3.2 i need to get data from plc1 to plc2. any idea how to do...
Replies
5
Views
89
Hi, I wanted to ask is there a way to have a visibility expression use the IP address of the HMI (Dynics, not PV) to show certain elements? The...
Replies
3
Views
200
Hello. I have a few machines that use Kinetix 300 (each machine has two drives). Both drives on one of the machine keep losing IP address. They...
Replies
2
Views
94
Hi Guys, Is it okay to have Redundancy ControlLogix Processor IP address set to DHCP? I had Static IP address on it but removed it via RSLinx...
Replies
3
Views
233
Back
Top Bottom