Create a function in RsLogix/Studio 5000

npham

Member
Join Date
Aug 2015
Location
Iowa
Posts
4
Is there a way to create a function that I can just simply use over and over again? For example MOV function. I don't want to create an instance just for a simple function. Please help.

Thanks.
 
With an AOI, an associate data type will be defined. Therefore, every time I call an AOI I have to create a tag/instance of that type in order to compiles. I just want a simple function like a MOV function where I only need ma source and a destination. Also I'm using ladder logic.
 
With an AOI, an associate data type will be defined. Therefore, every time I call an AOI I have to create a tag/instance of that type in order to compiles. I just want a simple function like a MOV function where I only need ma source and a destination. Also I'm using ladder logic.

You don't "...have to create an instance..."...You create the AOI only once...It will be in the Instruction Pallete just like your (apparently favorite) MOV...Just drag it onto a rung and define your INs (Sources) and OUTs (Destinations)...Just like your favorite MOV...Use any language you are capable of programming with...LAD, FBD, ST...

..and most importantly...READ THE MANUAL!...before having any opinions...
 
You don't "...have to create an instance..."...You create the AOI only once...It will be in the Instruction Pallete just like your (apparently favorite) MOV...Just drag it onto a rung and define your INs (Sources) and OUTs (Destinations)...Just like your favorite MOV...Use any language you are capable of programming with...LAD, FBD, ST...

..and most importantly...READ THE MANUAL!...before having any opinions...

Apparently I've created an AOI before I made this post. FROM the MANUAL you are required to have an InOut Parameter which is an a tag with AOI data type. I can create a global tag and use it every time I call the AOI, but I don't want to create a tag that could cost confusion for someone else that try to use the function.

Capture.jpg Capture1.jpg
 
Apparently I've created an AOI before I made this post. FROM the MANUAL you are required to have an InOut Parameter which is an a tag with AOI data type. I can create a global tag and use it every time I call the AOI, but I don't want to create a tag that could cost confusion for someone else that try to use the function.

It seems you are trying to implement a Siemens feature within a Rockwell platform.
Logix platform does not offer Siemens user defined FC-like instructions but user defined FBs and they are referred to as AOI; they do have "memory" when implemented, however, the inconsistency with Siemens' FCs is the name of the "instance"; the required IN and OUT parameters will differ with each occurrence.

Name each "instance" with the intended functionality followed by a number or letter since each "instance" will perform the same function within a different application : e.g. StartStop_Pump_1, StartStop _Pump_2, etc. or SpeedReference_Conveyor_A, SpeedReference_Conveyor_B, etc.
 
RET is on the money. A subroutine is similar to an FC in Siemens world, in that you just call it, pass it whatever parameters you want, and it returns whatever parameters you tell it to. No creating tags, just pass your existing ones.

You might get some more detailed answers if you are able to share an example of what you're trying to do, and how you would have done it on [other PLC platform], so that we can assess your situation more accurately, instead of just giving general vague advice.
 
Thread Necromancer here. Was searching for Functions in Studio 5000 and found this. Could have sworn I read that they added them to v32 but I can find where i read that now.
It seems you are trying to implement a Siemens feature within a Rockwell platform.
Logix platform does not offer Siemens user defined FC-like instructions but user defined FBs and they are referred to as AOI; they do have "memory" when implemented, however, the inconsistency with Siemens' FCs is the name of the "instance"; the required IN and OUT parameters will differ with each occurrence.

Name each "instance" with the intended functionality followed by a number or letter since each "instance" will perform the same function within a different application : e.g. StartStop_Pump_1, StartStop _Pump_2, etc. or SpeedReference_Conveyor_A, SpeedReference_Conveyor_B, etc.



No he is trying to use a 61131-3 feature in the Fischer-Price toy that is Studio 5000.

Also a Function Block or Allen Bradley's retarded version of it, an AOI, does take up memory. Even if it has no tags in it. Further calling a global AOI instance repeatedly, is hack (I can explain why if it's not obvious). Third, if you have a global instance and want to use it in other AOIs you are violating separation of concerns.
 

Similar Topics

Hello! I have a network of conveyors bringing raw product to 4 machines. A sensor in the hopper of each machine calls for more product. I'm...
Replies
15
Views
5,850
Dear all, I am having a flow totalizer that reset automatically every Thursday at 6:00 am. I would like to stack and save the value of the...
Replies
6
Views
2,785
Hi, Few days back, I need to copy files from one location to other location at certain time interval in FTView SE. I didn't find any direct way to...
Replies
0
Views
5,731
How to Copy multiple LD function blocks of Proficy Machine Edition PLC project and create their text files. I need to do this because I want...
Replies
5
Views
2,444
Hi all, I need information about as create Function Block on RS Logix 5000, because in my RSLogix 5000 only have one option when i try create a...
Replies
1
Views
9,022
Back
Top Bottom