GiantJacob

MrPLC Member
  • Content count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About GiantJacob

  • Rank
    Hi, I am New!

Profile Information

  • Country United States
  1. Add On Instructions Parameters

    (In my previous post I was mistakenly using "UDT" to refer to the tag with the same type as the AOI, I now understand my mistake in that regard.) My intial reasoning for using an AOI instead of a subroutine was because as I understand it the JSR call to use a subroutine requires significantly more execution time than an AOI. Is this correct? If I wanted to replicate the same set of code with different parameters a large amount of times in my project, say 100-300 times, what would be the best way to do such a thing? I would like to not have to create 300 tags, one for each AOI. But I would also not like to slow down my execution time severely. Also a subroutine call cannot "block" a rung like an AOI can, correct? For instance if I wanted the subsequent part of the rung/branch that the Mult3 is on to only be examined if the modified integer is an even number (or some other requirment), this could only be achieved though an AOI, correct? If I wanted to replicate this example 300 times in a project, what would be the ideal way to do so? My main reason to understand this is that if I can reuse the same code (using an AOI or subroutine) I reduce the chance for human errors by mistyping something, especially if I need to do the same thing a large number of times, not to mention the programming time saved. Thanks again for the help
  2. Add On Instructions Parameters

    Thanks for the reply. So what would happen if I used the same UDT for all instances? In practice how would this produce bad results? Also does this mean if I want to use the same parameters I could use the same UDT? So in the two instances where I am using "Int1" as the InOut parameter I could use the same UDT (say "Mult3_A") and the other instance using "Int2" would need a seperate UDT (say "Mult3_B")?
  3. I am trying to learn how to use add-on instructions, and to get a better understanding I am trying to do a simplified example. I am trying to make two separate add on instructions that alter an integer tag in different ways. I would like one AOI that multiplies the input integer by 3 and another AOI that adds 3. The integer tag is a InOut parameter.  I named these AOIs "Mult3" and "Add3". When trying to use the AOI's it requires me to have an additional input with datatype the same as the AOI ("Mult3" or "Add3"). I have a couple of questions about this: 1. Why is this data type required? It seems to me that I would only need the InOut integer that I want to modify. 2. I want to use these AOI's in a number of places throughout my code on a number of tags. Would I be able to just use one "Mult3" tag for all the AOI's, or would I need a seperate tag for each use of the AOI?  For Instance if I am using the Mult3 AOI in 3 separate places in my code, two times using "Int1" as the InOut parameter and another time using "Int2" as the InOut parameter, could I just make one tag of "Mult3" datatype and use that for all the instances of the AOI, or would that screw it up in some way. Thanks for any help.
  4. Hey All, I am trying to do some data storing on a PanelView+ and the built in data logging doesn't quite fit my needs. I was looking into the possibility of creating my own ActiveX control for doing this. Is it possible to create custom ActiveX controls for Factory Talk? If so, are there any tutorials for doing so you recommend? Also, are there any sites that have custom ActiveX controls to download? I realize this may not be the easiest thing to do, but if I could create my own I could use it for various machines and would make things a lot simpler in the long run. Thanks