摘要 |
PROBLEM TO BE SOLVED: To increase the processing efficiency of a compiler corresponding to program language 1EC61131-3, and to achieve a high speed arithmetic operation. SOLUTION: A conventional arithmetic circuit constituted of an accumulator 1, a data memory 2 and an arithmetic circuit 3 is provided with a stack 4 and a stack pointer 5, and when compiling an arithmetic instruction having a plurality of input parameters, all input parameters are stored in the stack once, and the input parameters are extracted one by one from the stack, and an arithmetic operation with the current arithmetic result is performed, and the arithmetic result is updated, and this process is repeated until all the input parameters are extracted, and the final arithmetic result is output. An accumulator for storing the input parameters and the arithmetic results is arranged on the stack, and the stack position of the accumulator is moved by one for an arithmetic operation, and the arithmetic operation is repeated. COPYRIGHT: (C)2007,JPO&INPIT
|