Supporting routines, Instruction execution, Supporting routines instruction execution – Rockwell Automation 1789-L10_L30_L60 SoftLogix 5800 System User Manual User Manual

Page 37

Advertising
background image

Rockwell Automation Publication 1789-UM002J-EN-P - December 2012

37

What is the SoftLogix System?

Chapter 2

Supporting Routines

A routine is a set of logic instructions in a single programming language, such as
ladder logic. Routines provide the executable code for the project in a controller.
A routine is similar to a program file or subroutine in a PLC or SLC™ processor.

Each program has a main routine. This is the first routine to execute when the
controller triggers the associated task and calls the associated program. Use logic,
such as the JSR instruction, to call other routines.

You can also specify an optional program-fault routine. The controller executes
this routine if it encounters an instruction-execution fault within any of the
routines in the associated program.

The SoftLogix controller supports routines developed with the relay ladder and
function block editors of RSLogix 5000 software. You can edit relay ladder and
function block routines either offline or online. You can also develop C/C++
routines and incorporate them into your project.

See

Chapter 5

for information on adding external routines to a project; see

Chapter 6

for information on developing external routines.

Instruction Execution

When performing a math operation, the SoftLogix controller handles INT to
REAL conversions differently than hardware-based Logix controllers. The
SoftLogix controller completes the math operation by using the INT data and
then converts the result to REAL data, which is more consistent with how math
operations occur on personal computers. The hardware-based Logix controllers
first convert INT data to REAL data and then perform the math operation.

The SoftLogix controller also handles the conversion of single-float values to
double-float values differently than the ControlLogix controller. The personal
computer processor calculates conversions to more decimal points than the
ControlLogix controller. This can result in instructions operating differently
between SoftLogix and ControlLogix controllers. For example, when calculating
cam (MAPC) position with the MAPC instruction, the.PC bit can get set
slightly sooner or later in a ControlLogix controller than in a SoftLogix
controller. Factors that affect the time the .PC bit is set are as follows:

Direction of travel
Axis scaling constants of the two axes being used for the camming

instruction

The start and end point values used in the cam

Advertising