Variable management in PACSystem

2Faced

Member
Join Date
Oct 2018
Location
Nha Trang
Posts
24
Hello All-

I'm trying to re-structure my PLC code (in LD). The current code has blocks contain different type of memory areas (%AI, %AQ, %I, %M, %Q, %R..), the variables assigned to these areas are all global scope as described in the programmer's reference manual, means they can be seen across the program.

Now I want to re-write the code utilizing the local scope variables. E.g each block has its own local scope variables and cannot be seen by other blocks. The problem is, there is only one memory reference in PACSystem PLC (%L) supports local scope and it is word type thus I cannot manipulate bit instructions like I normally do with %M reference.

Could you please provide some hints ? Would it be feasible to re-structure the code following the above method ?

Thank you.
 
Never worked in a PAC system, however, as I understand it I & Q need to be global, also be aware that in many systems local variables may not be seen or accessed via an HMI or Scada system, local variables are probably only temporary so may not pass back information correctly into the same block on next scan, what is your reasoning for changing them. As I say have no experience on that system but in a number of systems local variables are allocated at compile time and the memory area may be used more than once.
 
Look into using symbolic variables (variables without a hardware address) for your local variable needs. Unless you have some need to address them, that is. Some more details would be helpful.
 
Thank you @parky and @brinocerous for your answers. As I read from the PACSystem programmer's guide the symbolic variables are global scope as well (can be called from other blocks), but better is that if one doesn't know the variable names they cannot be called.
So there is no other way to program the PLC like we can do with a high-level programming language on PC environment...
 
From the Proficy Machine Edition help file:

To create a variable that is local in scope:
Create and name a variable, or rename an existing variable, according to the following convention:

[Target name].[Scope name].[Variable name]

[Target name] is the name of the target the variable is to be used on (you can omit it if there is only one target in your project).

[Scope name] is the name of the block the variable is restricted to. This is what identifies the variable as local in scope.

[Variable name] is the name of the variable.
 
Thank you @parky and @brinocerous for your answers. As I read from the PACSystem programmer's guide the symbolic variables are global scope as well (can be called from other blocks), but better is that if one doesn't know the variable names they cannot be called.
So there is no other way to program the PLC like we can do with a high-level programming language on PC environment...

I don't have access to Proficy right now to check, but I'm almost certain you can create locally-scoped symbolic variables. Steve's example is correct about the naming convention. There is also an option in the settings that makes new variables local or global scoped by default.
 

Similar Topics

So i've been at this for a long while, i have Citect Scada 2018, i have full access to everything but i can't seem to find any option or...
Replies
0
Views
28
I'm upgrading an existing machine with a Honeywell HC900 controller, and I'm trying to do some data processing in the controller. I have variables...
Replies
0
Views
56
dear all.. i am designing the Sea Water Intake pump which the 4 pumps will be operated parallel, and 1 pump will be as stand by pump The pump data...
Replies
3
Views
160
I have a old lathe with a 120 VCA 9.5 AMP motor. Has white, black and red wires. I need to find a way to connect it to a variable speed controler...
Replies
0
Views
101
I am trying to display a variable within a cicode function onto a graphics page. This function queries a SQL database. I can get the value onto a...
Replies
3
Views
291
Back
Top Bottom