RSLogix 5000 - References and Pointers

theColonel26

Lifetime Supporting Member
Join Date
Feb 2014
Location
West Michigan
Posts
785
Is there any form of Reference Type or Pointer Type like Codesys has? I am aware that you can nut a tag in the index of an array reference. but that is not what I am after.

I want to have some reference Tags and be able to reassign those reference tags while my program is running.




P.S. There is an old thread with the same name but it is not exactly what I am after.
 
I have never come across anything like that in the Logix development system. My guess is it doesn't exist since there are no functions that are strictly address based in Logix like there are in the Codesys environment. The Logix stuff pretty strictly abstracts the user from the actual addresses being operated on.

Keith
 
Why? Because you cant use pointers? To do what? Introduce more bugs? Make it impossible for someone to troubleshoot? PLCs are made to run equipment and processes. They need to be as bulletproof as possible. Cant have your system crashing like Windows.
 
I guess the question is what are you trying to do?

Like I said, Codesys manages pointers well because there are functions built around using true memory addresses to perform actions on. This is what makes the runtime so transportable across platforms. Since the AB system was purpose built with what are effectively "hard-coded" addresses the idea of a pointer doesn't seem as necessary.

What actual function are you trying to pull off?

Keith
 
Why? Because you cant use pointers? To do what? Introduce more bugs? Make it impossible for someone to troubleshoot? PLCs are made to run equipment and processes. They need to be as bulletproof as possible. Cant have your system crashing like Windows.
giphy.gif


I guess the question is what are you trying to do?

Like I said, Codesys manages pointers well because there are functions built around using true memory addresses to perform actions on. This is what makes the runtime so transportable across platforms. Since the AB system was purpose built with what are effectively "hard-coded" addresses the idea of a pointer doesn't seem as necessary.

What actual function are you trying to pull off?

Keith
Well still working on exactly how I want it structured, but basically I want to pass in a UDT's member as a reference to an AOI. The problem is I want to do the assignment in another task from the one that is actually executing the AOI.


I am trying to maintain SoC by not having any assignments happen in the Task->Program that is actually executing the AOI. It needs to run in another task because it need to run faster than the rest of the code.



So I want to do something like this

AOI_Thingy.MyReference := MyDUT[IndexTag].MemberToPassIn;


I think I can do this by making MyReference an InOut, but I am still investigating. Ran out of time today, why will be mad if I'm late... etc.
 
Yes, an InOut parameter is equivalent to Codesys VAR_IN_OUT. Pointers as such aren't supported but references are via InOut
 

Similar Topics

Hi, I am controlling 10 of the same type of device. I have a UDT that has all the control parameters for 1 device. I then make a tag that holds...
Replies
3
Views
4,837
Does anyone know if it is possible to save your preferences (display options, hot key assignments, etc.) so that you can move them to another...
Replies
2
Views
2,140
Hi folks, in the alarm manager of Rslogix 5000, the tag-based alarm has been created. But when I tried to change the condition, it was found the...
Replies
2
Views
158
I am completely stuck on building a ladder program that requires a start button to be pressed 3 times to turn on motor 1. Then motor 2 starts...
Replies
20
Views
586
Back
Top Bottom