EasyManuals Logo

Omron NJ501-1500 User Manual

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #525 background imageLoading...
Page #525 background image
2-477
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Stack and Table Instructions
2
StackFIFO and StackLIFO
z StackLIFO
The StackLIFO instruction removes the top value from a stack. Value of InOut[Num1] is assigned to
OutVal. Then, Num is decremented.
The following example is for when Size is UINT#5 and Num is UINT#2.
Use the same data type for InOut[] and OutVal.
When an element in the array is passed to InOut[], all elements below the passed element are pro-
cessed.
The values in InOut[], Num, and OutVal do not change if the value of Size or Num is 0.
Return value Out is not used when the instruction is used in ST.
An error occurs in the following cases. ENO will be FALSE, and OutVal will not change.
InOut[] and OutVal have different data types.
The values of Num and Size are not 0 and Num is greater than Size.
The value of Size exceeds the array area of InOut[].
InOut[] is a STRING array and any of the elements does not end in a NULL character.
InOut[] is a STRING array and the number of bytes in the elements exceeds the size of OutVal.
Refer to the sample programming that is provided for the StackPush instruction (page 2-466).
Precautions for Correct Use
Sample Programming
StackLIFO(abc[1], def, UINT#5, ghi);
LD ST
abc[1]
def
ghi
StackLIFO
EN ENO
InOut
OutVal
Size
Num
abc[1]
def
UINT#5
ghi
Num = ghi
OutVal = def
Num = ghi
OutVal = def
Decremented.
Removed.
1234
2345
3456
0
0
Size=UINT#5
UINT#3
1234
2345
3456
0
0
UINT#2
INT#3456
InOut[0]=abc[1]
InOut[1]=abc[2]
InOut[2]=abc[3]
InOut[3]=abc[4]
InOut[4]=abc[5]
InOut[0]=abc[1]
InOut[1]=abc[2]
InOut[2]=abc[3]
InOut[3]=abc[4]
InOut[4]=abc[5]

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
ModelNJ501-1500
CPU TypeIntel Atom
SD Memory Card SlotYes
Power Supply Voltage24 V DC
Power Consumption30 W
Operating Temperature0 to 55 °C
USB PortYes
Power SupplyBuilt-in

Related product manuals