RSLogix Data file Global or Local

I've wondered the same thing myself.

I've never defined a data table to be anything other than global.

Yes, I know that "Local" mean "only used by one program file", but WHY?

It doesn't improve scan time.
It doesn't improve memory usage.
It doesn't limit an HMI (or external PLC) from accessing the data (I think)).
It just prevents other program files from accessing the data stored there.

So what good is it?

Has anyone actually ever used this feature?
 
With RSLogix 500 the local / global distinction is only relevant to the programming environment. I believe it is an invention (abberation?) carried over from the ICOM AI series software. Possibly useful if you have several people developing program for one processor. Sort of like fitting yourself with a straight-jacket.

In RSLogix 5000 (ControlLogix), it's a different matter. In that case, the scope of variables is recognised by the PLC to be program (local) or controller (global). So far, I haven't encountered any compelling reason for not making all variables global.
 
You hit the nail on the head. The best use of the Global/Local really does come in when you have multiple programmers working on a project. It helps ensures that no one is stepping on someone elses toes by using data files not "assigned" to them.

I think it also evolved out of the programming environment where you define a variable and that variable only exists within that subroutine.

However, as it was mentioned, it is a programming environment structure, not a PLC/SLC structure like the ControlLogix has.

OG
 
Sincerely I have never used the local feature for data files, and I'm not sure if it's really useful in PLC programming, except for a multiple programmers project.

Anyway when I studied programming C language, my teachers always stressed the accent on the importance of a structured style of programming, using subroutines with a local scope of datas, which can be explicitly passed through the other subroutines by the subroutine call declaration.

Why can't this practice be useful with PLCs?
I'm trying to develop for a family of similar projects a library of standard subroutines for state-transition type programs, and I'm wondering if the local scope of variables can be useful for this kind of approach.

Has anyone here worked with local scope data files?
 
That might work well with a PLC-5, where the JSR command can pass parameters to the subroutine.

But a SLC doesn't allow parameter passing. So unless you create a scheme where certain (Global) registers are assigned for parameter passing, and your sub's first instruction is to MOV those registers to Local ones, this isn't going to get you much.
 

Similar Topics

I stumbled onto this behavior the other day, then went looking for old forum posts with the assumption that "there is nothing new under the...
Replies
0
Views
775
Hello All, I am working on converting a program written in RSLogix 500 to Connected Components Workbench. The MicroLogix to Micro800 converter...
Replies
1
Views
1,187
Hi Guys! Does anyone know which version of RSLogix 500 i can insert ASCII DataFile? I'm using 10.0 version and i not found this DataFile, but...
Replies
1
Views
1,445
Hello everyone. This might be a silly question for many of you here. I have created 2 separate ladders. One to control one part of the machine...
Replies
6
Views
2,395
Hi all, Im trying to add some more elements to a Floating point data file without much success. Its already set up for F8:0 only. I would like to...
Replies
3
Views
3,324
Back
Top Bottom