Thread Content
This post was last edited by oatobnus on 2010-10-25 00:50. I’m using version V4.2; in the program section there are two types of variable declarations: one is local and the other is tagname. What’s the difference between them? Tagnames are generally used for input and output, but why is “loca” used in some cases? I hope someone experienced can give some advice!
Reply 1# ssln123: The L variable occupies memory space, while the T variable also takes up memory. In my opinion, as long as it’s not necessary to use the data for purposes such as screen display or communication, then the L variable can be used; for example, in cases of starting via SOE, manually stopping, or clearing variables within a program
Just like variables in high-level languages, there are local and global ones. The former is local while the latter is global.
LOCAL is a memory variable, also known as an intermediate variable; The TAGNAME, which is an I/O variable, comes from the field.
Reply to 4# WXJ198354: But I see that some of those defined as TAGNAME are not of the I/O type; they are memory types
One more question: The two TAGNAMEs I defined during configuration keep causing errors, and the reason is that the memory addresses are identical although the names are different – one is Input_1 and the other is PSL001_1. Why is this happening? I saw that in other cases the addresses are assigned automatically after the tags are defined, and I defined those two tags in the same order as well. I really don’t understand why this issue arises; I had no choice but to change the names of those TAGNAMEs
Reply to 6# ssln123: In version 3, addresses can be reused, meaning that two variables can use the same memory address; this is not allowed in version 4. Typically, Tagname is used for physical addresses, but memory addresses can also be chosen first, while Local is only used for memory addresses.