Sign in to follow this  
Followers 0
andyhill

Aliasing in RSlogix 5000 ( L62)

4 posts in this topic

Was having a think and wondering if this is possible, At the moment I have a array of UDT defined in the Controller and Use a small block of code to move this into a proccessing Tag with in a Proccessing TASK and then move the data back into controller when finished then increment the array element and repeat. Is there any way I could, using aliasing set up so the alais can point to the fisrt element of the array and then by code just increment the alias to the next element and so on, by using the inbuild ALIAS function of the the databses. Just think it may be more efficietn EXAMPLE So we would have Define these tags Controller.Array[1].UDT_Structure1 Controller.Array[1].UDT_Structure2 Controller.Array[1].UDT_Structure3 Controller.Array[2].UDT_Structure1 Controller.Array[2].UDT_Structure2 Controller.Array[2].UDT_Structure3 Controller.Array[3].UDT_Structure1 Controller.Array[3].UDT_Structure2 Controller.Array[3].UDT_Structure3 Where Scan 1 MyAlias:=Controller.Array[1] giving Myalias.UDT_Structure1 ( Array Element [1]) Myalias.UDT_Structure2 ( Array Element [1]) Myalias.UDT_Structure3 ( Array Element [1]) Scan2 MyAlias:=Controller.Array[2] giving Myalias.UDT_Structure1 ( Array Element [2]) Myalias.UDT_Structure2 ( Array Element [2]) Myalias.UDT_Structure3 ( Array Element [2]) Scan3 MyAlias:=Controller.Array[3] giving Myalias.UDT_Structure1 ( Array Element [3]) Myalias.UDT_Structure2 ( Array Element [3]) Myalias.UDT_Structure3 ( Array Element [3]) Scan 4 MyAlias:=Controller.Array[1] giving Myalias.UDT_Structure1 ( Array Element [1]) Myalias.UDT_Structure2 ( Array Element [1]) Myalias.UDT_Structure3 ( Array Element [1]) -------------- Or Can this not be done?

Share this post


Link to post
Share on other sites
yes, thats the idea behind alias Only problem I have had with it is alias physical IO to a UDT structure, wont let you do that. But what your doing should be fine.

Share this post


Link to post
Share on other sites
SO how do you access the Assign the Alais to the New Structure element at runtime eg move alias from pointing at MyStruct[1] to Pointing at MyStruct[2]. I've only ever used Aliases at design time form making the I/O tags more "friendly".

Share this post


Link to post
Share on other sites
1st Enter the UDT_Structure1 under the User defined tags 2nd Enter MyAlias as the tag name under Controller tags if you want it to be global or program tag under a task if you want it to be local. Use "UDT_Structure1" as the data type. Again you can only alias IO if a digital IO point as a Alias BOOL data type. Maybe someone knows some other way to use but I do not know what that is represented in a structure. Does this answer your question? see example below as seen in controller tags expanded out. MyAlias <normal> UDT_Structure1 Standard MyAlias.structure DINT Standard Decimal MyAlias.structure.0 BOOL Standard Decimal MyAlias.structure.1 BOOL Standard Decimal MyAlias.structure.2 BOOL Standard Decimal MyAlias.structure.3 BOOL Standard Decimal MyAlias.structure.4 BOOL Standard Decimal MyAlias.structure.5 BOOL Standard Decimal MyAlias.structure.6 BOOL Standard Decimal MyAlias.structure.7 BOOL Standard Decimal MyAlias.structure.8 BOOL Standard Decimal MyAlias.structure.9 BOOL Standard Decimal MyAlias.structure.10 BOOL Standard Decimal MyAlias.structure.11 BOOL Standard Decimal MyAlias.structure.12 BOOL Standard Decimal MyAlias.structure.13 BOOL Standard Decimal MyAlias.structure.14 BOOL Standard Decimal MyAlias.structure.15 BOOL Standard Decimal MyAlias.structure.16 BOOL Standard Decimal MyAlias.structure.17 BOOL Standard Decimal MyAlias.structure.18 BOOL Standard Decimal MyAlias.structure.19 BOOL Standard Decimal MyAlias.structure.20 BOOL Standard Decimal MyAlias.structure.21 BOOL Standard Decimal MyAlias.structure.22 BOOL Standard Decimal MyAlias.structure.23 BOOL Standard Decimal MyAlias.structure.24 BOOL Standard Decimal MyAlias.structure.25 BOOL Standard Decimal MyAlias.structure.26 BOOL Standard Decimal MyAlias.structure.27 BOOL Standard Decimal MyAlias.structure.28 BOOL Standard Decimal MyAlias.structure.29 BOOL Standard Decimal MyAlias.structure.30 BOOL Standard Decimal MyAlias.structure.31 BOOL Standard Decimal

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0