Studio 5000 Program Parameter Connections

theColonel26

Lifetime Supporting Member
Join Date
Feb 2014
Location
West Michigan
Posts
784
So I noticed that in Studio 5000 there are Program Parameter Connections. They seem to be a way to map a parameter to something inside the program, like for example an AOI parameter. But they don't seem to work that way. I connected the Program level output parameter "Seconds" to the AOI level output "Second". When I run it "Second" is now zero. I remove it and run it and the AOI level output has the expected value. :unsure:
see screen shots (Minute is configured the same way in the screen shots if you are wondering)

2019-10-22 22-50-15 CL-CTRLS-VM-ROC.png 2019-10-22 22-54-00 CL-CTRLS-VM-ROC.png
 
The ins and out of things...

Hi,

Parameter passing is versatile and time and date management can be multi accessed or synchronized. So it would probably be best if you explain what exactly your goal is here? It may appear obvious that you are trying to read the AOI time and date values into the target program, but just in case, please lay it out for us.

You are connecting an Output parameter to an Output parameter. There are scenarios where this may be valid, but in general you would not do this to simply output a value from a source and input it to a target...

If you want to connect and use an "Output" parameters, from an AOI that is being executed in a source program, then you must "Input" that parameter value to the target program, not "Output" it.

Because your "Seconds" tag in the target program has a value of "0", and it is configured as an "Output" parameter, it will remain at "0" if nothing is manipulating it in the program, or from anywhere else in the project. So it is outputting the value of "0" to the AOI "Output" parameter "Second". When the AOI is executing, it is, I assume, constantly writing a valid value to its "Second" "Output" parameter. However, the "Seconds" "Output" parameter from the target program is also constantly try to write its value of "0" to it, because it is connected to it.

If the AOI "Output" parameter "Second" is normally updating correctly, but when connected to the program "Output" parameter "Seconds" it is not, then its Data Access must have been changed from the default of "Read Only" to "Read/Write".

If you do not need to write to an AOI Output parameter then you should leave its Data Access set to "Read Only". This way, for the current configuration, the AOI "Second" parameter would continue to update correctly, and you would just need to sort out the target program parameter "Seconds" by changing it to an "Input" parameter.

Now the AOI Output parameter "Second" should successfully connect and update the program Input parameter "Seconds".

If your intention were the reverse, for instance, and let's say you do want to update the "Second" Output parameter in the AOI from the "Seconds" Output parameter in the program, along with others (think setting the AOI time/date) then you would leave it as it configured now and write your logic in the program for the time and date update.

As there may be these different scenarios, this is again why I would suggest you clarify exactly what you are trying to do here.

Regards,
George
 
Last edited:
Hi,

Parameter passing is versatile and time and date management can be multi accessed or synchronized. So it would probably be best if you explain what exactly your goal is here? It may appear obvious that you are trying to read the AOI time and date values into the target program, but just in case, please lay it out for us.

You are connecting an Output parameter to an Output parameter. There are scenarios where this may be valid, but in general you would not do this to simply output a value from a source and input it to a target...

If you want to connect and use an "Output" parameters, from an AOI that is being executed in a source program, then you must "Input" that parameter value to the target program, not "Output" it.

Because your "Seconds" tag in the target program has a value of "0", and it is configured as an "Output" parameter, it will remain at "0" if nothing is manipulating it in the program, or from anywhere else in the project. So it is outputting the value of "0" to the AOI "Output" parameter "Second". When the AOI is executing, it is, I assume, constantly writing a valid value to its "Second" "Output" parameter. However, the "Seconds" "Output" parameter from the target program is also constantly try to write its value of "0" to it, because it is connected to it.

If the AOI "Output" parameter "Second" is normally updating correctly, but when connected to the program "Output" parameter "Seconds" it is not, then its Data Access must have been changed from the default of "Read Only" to "Read/Write".

If you do not need to write to an AOI Output parameter then you should leave its Data Access set to "Read Only". This way, for the current configuration, the AOI "Second" parameter would continue to update correctly, and you would just need to sort out the target program parameter "Seconds" by changing it to an "Input" parameter.

Now the AOI Output parameter "Second" should successfully connect and update the program Input parameter "Seconds".

If your intention were the reverse, for instance, and let's say you do want to update the "Second" Output parameter in the AOI from the "Seconds" Output parameter in the program, along with others (think setting the AOI time/date) then you would leave it as it configured now and write your logic in the program for the time and date update.

As there may be these different scenarios, this is again why I would suggest you clarify exactly what you are trying to do here.

Regards,
George
I'll put together a more detail post this even, when I get home.
 
I had intended to come back to this as I hadn't time earlier to get into it too deep, as I usually do. I was not at any software to make references. So apologies as my details are a bit scant and not covering all the basics.

I'll post more in a little while here.

Regards,
George
 
While still not completely sure of what it is you are actually trying to achieve here, I just wanted to explain something I had said a little better, in case there may be some confusion...

Geospark said:
...You are connecting an Output parameter to an Output parameter. There are scenarios where this may be valid...

While it is possible to achieve this, and having reread my statement, it may prove to not be true at face value. You cannot make a direct Connection between an Output parameter in one program and an Output parameter in another. They are both Outputting values at the same time so one cannot write to the other successfully. When selecting parameters to assign to the Connection of a program Output parameter, only valid choices are displayed, such as Input, InOut, Public, Controller-Scoped. There still ways to indirectly get an Output parameter value to another Output parameter, but I won't get into that now. Anyway, the fact that you could not be connecting an Output parameter to an Output parameter directly here would suggest that the AOI parameter "Second" is probably an input parameter?

If or when you might be explaining your intentions a bit clearer here, perhaps a screenshot of the Parameters tab for the AOI might also be useful?

I do notice that in the screenshot snippet for your program parameters, you also have an Input parameter "SecondIn" which has a Connection to a parameter in the AOI, also called "SecondIn". Is this an AOI Output parameter?

All a bit confusing here, the more I'm looking at it. So I think actually I will wait until you post that more detailed information later.

Regards,
George
 
Does this diagram clarify the write direction that I want?


See Attachments for Parameter defintions



pub


2019-10-24_21-35-20.png 2019-10-24_22-04-19.png
 
Does this diagram clarify the write direction that I want?


See Attachments for Parameter defintions



pub

Just curious, do 'Hour' and 'Minute' AOI output parameters exhibit the same behavior as 'Second'? It would appear from the 2nd set of attached screenshots that you have the connections and external access configured correctly.

(I noticed that in your diagram your AOI output parameter is named 'Seconds' instead of 'Second'. I'm assuming this is just a typo from your earlier screenshots)

Full disclosure, I have never used an AOI and program tags this way, but am interested in the answer as it appears to be very clean. That being said, you *could* work around this by setting the mapped AOI output parameters from 'Visible' to 'Required' and then map the program output tags directly on the AOI block. I would prefer myself to understand why the program tag connection is not behaving as expected (especially if only on the one tag/output parameter combo!) before I would resort to 'fixing' it this way.
 
I'll provide the following information to try distinguish the terminology I'm about to use...

A "Program Local Tag" is a tag created at the Program-Scope for which its "Usage" is set for "Local". This makes it a "Local Program Tag", "Local Tag", or "Program Tag".

A "Program Tag" for which its "Usage" has been changed to anything but "Local" is now called a "Program Parameter Tag", or "Program Parameter". This could be "Input", "Output", "InOut" or " Public".

An AOI "Parameter" is the name used for the parameters or members we create inside an AOI. These parameters are at the AOI-Scope and should not be confused with the Program Parameters described above. They are similar in name, but quite dissimilar in Scope.

Moving on...

Now that we have some more info I'll come back to your opening post...

theColonel26 said:
So I noticed that in Studio 5000 there are Program Parameter Connections. They seem to be a way to map a parameter to something inside the program, like for example an AOI parameter...

A way, yes, but not what they are primarily intended to be used for. Program Parameters are primarily for passing data from one Program directly to another Program, or from Programs to the Controller-Scope. At the Program-Scope, this gives us the option to create just the Local Tags and not have to include Controller-Scope Tags to pass the data out to the wider Project-Scope. They are not so much intended for passing data around within the same Program, as you seem to be doing. But, this is possible.

theColonel26 said:
...But they don't seem to work that way. I connected the Program level output parameter "Seconds" to the AOI level output "Second". When I run it "Second" is now zero. I remove it and run it and the AOI level output has the expected value...

Reiterating what I had said earlier, but now with some more information, I will repeat the fact that you are attempting to output data from one Tag into another Tag which is also set to output its data. This will not work.

A clarification on my clarification...

When I said that you cannot create a Connection from a Program Output Parameter to another Program Output Parameter, this is correct. The software will not allow this. However, if the target "Parameter" is belonging to an AOI, then this is not another Program Parameter. This is an AOI Parameter. There is a difference, as I've mentioned. When you are assigning the target for a Program Output Parameter, and it happens to be an AOI Output Parameter, the software does not check that the target is also an Output Parameter inside of an AOI. It just thinks it is a target tag within a structured data type ("DateTime_V2"). Just because the software allows this Connection does not mean it is valid. As I said, both the source and the target are outputting their data, so neither can write to each other successfully.

You have the usage for the AOI instance set as "Public". This makes the AOI, as a whole, available as a Public Parameter. You would only need to do this if you intend to pass the entire structure of the AOI to other parts of the project. If not, and you are only using the AOI inside this Program, then you would set the usage to "Local".

If you want to directly input values to the AOI from the Program Parameters then for each Program Parameter ending with "...In", change their "Usage" to "Output". This will instruct them to send their values wherever you connect them to.

Leave each of the Connections as is to the AOI Parameters. The equivalent named AOI Parameters are already Input Parameters inside the AOI. This means they are instructed to receive data from where they are connected to.

When the program is executing, the values for the "...In" Output Parameters will be passed to the Input Parameters in the AOI, as you seem to be looking to do.

Likewise for the AOI Output Parameters, leave everything as is and just change the "Usage" for the equivalent Program Parameter from "Output" to "Input".

When the program is executing, the values for the AOI Output Parameters will be passed to the Program Input Parameters, as you seem to be looking to do. Example: AOI Output Parameter "Second" (or "Seconds" if you have changed its name?) will pass its value to Program Input Parameter "Seconds".

The tricky part in all this is if you are using Program Parameters at the Project-Scope and you change the "Usage" to the opposite, just to pass data within the same Program, then you will break the Project-Scope Connections.

As I keep saying, without knowing exactly what you are trying to do here, it can be difficult to advise you to a satisfactory end. We may need to know yet more, or, perhaps the info so far will be enough to get you over the line?

Regards,
George
 

Similar Topics

Hello Everyone, I have about 135 controller PIDE loops that I need to add to my Studio 5000 and that means I will probably have to create about...
Replies
8
Views
1,905
Hi All, On our site, we normally use trapped keys for our safety gates, however, for our newest project, I have been told that we will be using...
Replies
1
Views
1,009
Hi all, Im new to Allen Bradley software, so i was given a existing studio 5000 plc program. i already know how to use emulator and rslinx but as...
Replies
2
Views
1,390
I want to run a simulation of a program uploaded from a rockwell PLC, but I can't configure the CPU on the emulate to match the actual CPU.
Replies
10
Views
2,195
Hey everyone, Recently converted a PLC-5 program to ControlLogix (initally to V20.19, just changed it to V24.11), and I'm experiencing extremely...
Replies
5
Views
1,826
Back
Top Bottom