Delta AS Series Programming Manual page 247

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

A S S er i es Pr og r am m ing M an u a l
2.
Declaring the variables first, and then modifying the device:
Declare the three variables StartBit, Var1, and Var2 in ISPSoft.
The type of StartBit is a Boolean array, and its size is 2 bits. The range is from StartBit[0] to StartBit[1].
The type of Var1 is a word array, and its size is 11 words. The range is from Var1[0] to Var1[10].
The type of Var2 is a word, and its size is one word.
When StartBit[0] is ON, E0=10, E1=1, Var1[0]@E0=Var1[10], Var2=Var1[10], and
StarrtBit[0]@E1=StartBit[1]. StartBit[1] is ON.
_4
Additional remark: When you declare the variables in ISPSoft, and the variables are added to the contents of the
3.
Using index registers in an interrupt instruction:
4 - 1 0
registers to form the addresses to the actual data, you must note the addresses to prevent the
program from being executed incorrectly.
The index registers E0~E9 in the main program (e.g. POU, SFC, and FB) are different from the ones
(index registers E0~E9) in the interrupt program. They are independent groups of index registers and
they work separately.
You can use ISPSoft to monitor the values of index registers in the main program.
Application: If you use E0 in the main program and in the interrupt program. When an interrupt occurs,
before executing the interrupt program, the system stores the value of E0 in the main program. After
the interrupt program is executed, the value of E0 in the main program will be retained. So that the
interrupt program will not affect the value of E0 in the main program and the result of the main program
execution can stay unaffected.
Refer to the following example, if you need to monitor the values of index registers E0-E9 in the
interrupt program, or if the main program is also using the values of index registers E0-E9 in the
interrupt program. (Note: It is NOT recommended to use index registers as global variables. If you
need to use it as a global variable, you need to declare or define other devices to use it as a global
variable.)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents