EasyManuals Logo

Emerson DSM314 User Manual

Emerson DSM314
519 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 #321 background imageLoading...
Page #321 background image
User Manual Chapter 13
GFK-1742F Jan 2020
Local Logic Variables 310
13.2.3 System_Halt Variable
The System_Halt variable is a Write-Only Bit Operand (refer to Table 69). If the Local Logic
program writes a 1 to the System_Halt variable servo motion and Local Logic execution is
halted. An error code is also reported in the Module Status Code ( refer to Chapter 12). Thus
the System_Halt variable can be used to trap for fatal error conditions and perform error
recovery. The sample code below shows a possible scenario in which the System_Halt
variable might be used:
IF Overflow THEN (* Trap for an overflow *)
System_Halt := TRUE; (* Halt Local Logic Execution and Servo Motion *)
END_IF;
13.3 Double Precision 64 Bit Registers
Local Logic provides eight 64-bit registers (D00-D07) in addition to the 255 32-bit registers
(refer to Table 69). This is to allow the user to store the result of multiplying two 32-bit
numbers in a Dxx register and then perform a Divide/Modulus operation on the result.
Thus the 64 bit registers may be used under the following circumstances:
1.
As the Destination register for a multiply operation.
2.
As the Dividend (numerator) in a Divide/Modulus operation.
The Parser will flag an error if it is used in other operations. Example code for the use of the
Dxx registers is shown below:
D01:= P001 * 2147483647; (* Perform a Multiply operation and store in a 64 bit register
*)
P010:= D01 / 12500; (* Divide the result and store in a 32 bit register *)
Note that the above scenario may result in a Divide Overflow, if the result does not fit in a
32-bit register. A Divide Overflow will halt Local Logic execution and servo motion, since the
result of the operation is undefined (refer to Chapter 12). An error code will also be reported
in the Module Status Code.
Note: The contents of the 64-bit data registers (D00-D07) and 32-bit writeable data registers (P000-
P255) are not automatically initialized by Local Logic when it starts running. The user should
initialize any required variables using a separate Local Logic program or the
First_Local_Logic_Sweep variable or host controller ladder program.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Emerson DSM314 and is the answer not in the manual?

Emerson DSM314 Specifications

General IconGeneral
BrandEmerson
ModelDSM314
CategoryController
LanguageEnglish

Related product manuals