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 20th, 2019, 03:32 PM   #1
asdf6
Member
Canada

asdf6 is offline
 
Join Date: Apr 2018
Location: canada
Posts: 8
Discussion: Making use of program parameters in Studio 5000

Since v24 Rockwell introduced a feature called Program Parameters, which allows programmers to better customize the data sharing interface between programs. In a nutshell, the types of parameters they offer are:

- Input Parameters - pass by value
- Output Parameters - pass by value
- InOut Parameters - pass by reference
- Public Parameters - Similar to aliasing

Discussion questions:

- Do you make use of this feature?
- Does this feature actually contribute to code encapsulation? (Is it noticeably easier to reuse code?)
- In which scenarios would you use or not use this feature.

The company I work for now does not make use of this feature at all. We mainly use routines within a program for code segregation rather than programs within a task.

Last edited by asdf6; February 20th, 2019 at 03:37 PM.
  Reply With Quote
Old February 20th, 2019, 03:57 PM   #2
kamenges
Member
United States

kamenges is offline
 
kamenges's Avatar
 
Join Date: Nov 2002
Location: Brillion, WI
Posts: 3,722
As with everything I suspect it comes down to how you determine your upper level program structure.

One scenario may be the control of a 4-color printing press with an unwind and rewind on the ends. All the presses would be controlled identically. From a development standpoint you could write the control for one press, get it working the way you want it to work, then copy and paste that program three more times in the same task. The parameters you pass the program would be those for the press it controls. The unwind and rewind would be treated the same way. So from a development standpoint you would get six machine sections coded in the effort of two machine sections. It's kind of like the AOI concept writ large, except modifications in one program do not affect the others. You would just need to make sure you use all program level tags unless the data is truly non-sectional in scope.

We don't do that here but that is one scenario I could see where it might be useful.

Keith
  Reply With Quote
Old February 20th, 2019, 05:06 PM   #3
thingstodo
Member
Canada

thingstodo is offline
 
Join Date: Feb 2012
Location: Saskatoon
Posts: 275
Quote:
Originally Posted by asdf6 View Post
Since v24 Rockwell introduced a feature called Program Parameters, which allows programmers to better customize the data sharing interface between programs. In a nutshell, the types of parameters they offer are:

- Input Parameters - pass by value
- Output Parameters - pass by value
- InOut Parameters - pass by reference
- Public Parameters - Similar to aliasing

Discussion questions:

- Do you make use of this feature?
- Does this feature actually contribute to code encapsulation? (Is it noticeably easier to reuse code?)
- In which scenarios would you use or not use this feature.

The company I work for now does not make use of this feature at all. We mainly use routines within a program for code segregation rather than programs within a task.
This appears to be used for Add-on instructions only?

Pass by reference would reduce the number of values pushed onto the stack and pulled back off, if you are passing in values that are changed by the Add-on. That should reduce your scan time. But that's only an issue if you have dozens or hundreds of calls to an add-on.

We don't use add-on instructions. At least not yet. Our whole system is set up to use global tags, with subroutine calls. Passing large structures into an add-on, instead of having the data stored within the add-on, just didn't make sense. We tried it ... I guess it must have been before V24, since the penalty for doing 300+ Add-on calls took our scan times from 50-ish ms to almost 100 ms.

When we migrate to the 1756-L83s, it may make sense. Our biggest problem with subroutine calls are all human error. Using the wrong type, or fat-fingering the number of parameters ... which faults the processor after you accept edits. So we end up doing all of our subroutine call changes in a test processor to verify function before pasting the code/importing the tags into a running PLC.
  Reply With Quote
Old February 20th, 2019, 05:38 PM   #4
Geoff White
Member
Australia

Geoff White is offline
 
Join Date: Oct 2005
Location: Brisbane
Posts: 330
I have used them in PackML programs to help with inter-program communication without having to create controller level tags. It is less confusing than following aliased global tags from each end but would probably confuse the average sparky trying to troubleshoot. Seeing as it was a PackML program that boat had well-and-truly already sailed.
  Reply With Quote
Old April 15th, 2019, 12:50 PM   #5
V0N_hydro
Member
Canada

V0N_hydro is offline
 
Join Date: Sep 2010
Location: Whistler
Posts: 485
I have been asked to use these program parameters by some Rockwell programmers. they look to be solving a problem I don't think I have.

Last edited by V0N_hydro; April 15th, 2019 at 01:46 PM.
  Reply With Quote
Old April 15th, 2019, 02:59 PM   #6
Paully's5.0
Lifetime Supporting Member
United States

Paully's5.0 is offline
 
Join Date: Jan 2006
Location: WI
Posts: 2,082
Quote:
Originally Posted by asdf6 View Post

- Do you make use of this feature?
- Does this feature actually contribute to code encapsulation? (Is it noticeably easier to reuse code?)
- In which scenarios would you use or not use this feature.

The company I work for now does not make use of this feature at all. We mainly use routines within a program for code segregation rather than programs within a task.
I will probably give them a go on my next project. They really should be useful when you use multiple programs, take a look at Rockwell's fundamentals of modular programming guide. While program parameters aren't discussed the modular approach leads into why program parameters are valuable.

Simple example, say I have 4 mix tanks:

Program 1: Mix Tank 1
Program 2: Mix Tank 2
Program 3: Mix Tank 3
Program 4: Mix Tank 4

Now, lets say these 4 mix tanks all share some common raw materials

Program 5: Raw Material 1 Delivery
Program 6: Raw Material 2 Delivery
Program 7: Raw Material 3 Delivery

Programs 1-4 can now directly pass raw material set points (parameters) to programs 5-7 without having to use Controller Tags as the medium to do so.
  Reply With Quote
Old April 15th, 2019, 03:06 PM   #7
V0N_hydro
Member
Canada

V0N_hydro is offline
 
Join Date: Sep 2010
Location: Whistler
Posts: 485
Thanks for the insights Paully.


I use multiple programs to keep the clutter of program scope tags down, especially since Rockwell creates a tag for every FBD block even for simple ones such as add.


My processes generally do not have identical machines controlled by the same CPU. Where there is identical equipment it is more on the AOI level for a pump or valve.
  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
Studio 5000 download question RBergmann LIVE PLC Questions And Answers 10 October 10th, 2017 07:18 AM
Studio 5000 V24 compatibility with 1769-L35E jdbjdb LIVE PLC Questions And Answers 3 November 6th, 2016 04:29 PM
Studio 5000 logix Designer CliveBaker LIVE PLC Questions And Answers 2 April 11th, 2016 02:31 PM
RSLogix 5000 and FactoryTalk View Studio Question tranmeister LIVE PLC Questions And Answers 21 July 30th, 2015 03:33 PM
Studio 5000 Install Tim Ganz LIVE PLC Questions And Answers 6 June 29th, 2015 04:06 PM


All times are GMT -5. The time now is 04:40 AM.


.