EasyManua.ls Logo

Allen-Bradley Studio 5000 Logix Emulate User Manual

Allen-Bradley Studio 5000 Logix Emulate
676 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 #660 background imageLoading...
Page #660 background image
Chapter 11
660 Rockwell Automation Publication MOTION-RM002H-EN-P-February 2018
Example 1
If you want this Enter this structured text
The REPEAT_UNTIL loop executes the statements in the construct and then
determines if the conditions are true before executing the statements again. This
differs from the WHILE_DO loop because the WHILE_DO The WHILE_DO loop
evaluates its conditions first.
If the conditions are true, the controller then executes the statements within the
loop. The statements in a REPEAT_UNTIL loop are always executed at least once.
The statements in a WHILE_DO loop might never be executed.
pos := -1;
REPEAT
pos := pos + 2;
UNTIL ((pos = 101) OR (structarray[pos].value = targetvalue))
end_repeat;
Example 2
If you want this Enter this structured text
Move ASCII characters from a SINT array into a string tag. (In a SINT array, each
element holds one character.) Stop when you reach the carriage return.
Initialize Element_number to 0.
Count the number of elements in SINT_array (array that contains the ASCII
characters) and store the result in SINT_array_size (DINT tag).
Set String_tag[element_number] = the character at
SINT_array[element_number].
Add 1 to element_number. This lets the controller check the next character in
SINT_array.
Set the Length member of String_tag = element_number. (This records the
number of characters in String_tag so far.)
If element_number = SINT_array_size, then stop. (You are at the end of the
array and it does not contain a carriage return.)
If the character at SINT_array[element_number] = 13 (decimal value of the
carriage return), then stop.
element_number := 0;
SIZE(SINT_array, 0, SINT_array_size);
Repeat
String_tag.DATA[element_number] := SINT_array[element_number];
element_number := element_number + 1;
String_tag.LEN := element_number;
If element_number = SINT_array_size then
exit;
end_if;
Until SINT_array[element_number] = 13
end_repeat;
To make your structured text easier to interpret, add comments to it.
• Comments let you use plain language to describe how your structured text
works.
• Comments do not affect the execution of the structured text.
To add comments to your structured text:
To add a comment Use one of these formats
on a single line //comment
(*comment*)
/*comment*/
at the end of a line of structured text
within a line of structured text (*comment*)
/*comment*/
that spans more than one line (*start of comment. . .end of comment*)
/*start of comment. . .end of comment*/
Structured Text
Components: Comments

Table of Contents

Other manuals for Allen-Bradley Studio 5000 Logix Emulate

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley Studio 5000 Logix Emulate and is the answer not in the manual?

Allen-Bradley Studio 5000 Logix Emulate Specifications

General IconGeneral
TypeEmulation Software
Supported PlatformsPC
Operating SystemWindows
Compatible ControllersControlLogix 5570, ControlLogix 5580, CompactLogix 5370, CompactLogix 5480
IntegrationIntegrated with Studio 5000 environment
Works with Studio 5000 Logix DesignerYes
Programming LanguagesLadder Logic, Function Block Diagram, Structured Text, Sequential Function Chart
Communication ProtocolsEtherNet/IP
FunctionalityController Emulation
PurposeTesting and Debugging
Use CaseProgram development, testing, training, and troubleshooting without physical PLC hardware

Summary

LOGIX 5000 Controllers Motion Instructions

Motion State Instructions

Motion Axis Fault Reset (MAFR)

Use the Motion Axis Fault Reset (MAFR) instruction to clear all motion faults for an axis. This is the only method for clearing axis motion faults.

Motion Axis Shutdown (MASD)

Use the Motion Axis Shutdown (MASD) instruction to force a specified axis into the Shutdown state.

Motion Axis Shutdown Reset (MASR)

Use the Motion Axis Shutdown (MASR) instruction to transition a group of axes from the shutdown operating state to the axis ready operating state.

Motion Move Instructions

Motion Axis Stop (MAS)

Use the Motion Axis Stop (MAS) instruction to stop a specific motion process on an axis or to stop the axis completely.

Motion Axis Home (MAH)

Use the Motion Axis Home (MAH) instruction to home an axis. Two different homing modes can be selected during axis configuration: Active or Passive.

Motion Axis Jog (MAJ)

Use the Motion Axis Jog (MAJ) instruction to move an axis at a constant speed until you tell it to stop.

Motion Axis Move (MAM)

Use the Motion Axis Move (MAM) instruction to move an axis to a specified position.

Motion Change Dynamics (MCD)

Use the Motion Change Dynamics (MCD) instruction to selectively change the speed, acceleration rate, or deceleration rate of a move profile or a jog profile in process.

Motion Calculate Cam Profile (MCCP)

The Motion Calculate Cam Profile (MCCP) instruction calculates a cam profile based on an array of cam points.

Motion Axis Position Cam (MAPC)

The Motion Axis Position Cam (MAPC) instruction provides electronic camming between any two axes according to the specified Cam Profile.

Motion Axis Time Cam (MATC)

The Motion Axis Time Cam (MATC) instruction provides electronic camming of an axis as a function of time, according to the specified Cam Profile.

Motion Group Instructions

Motion Group Stop (MGS)

The Motion Group Stop (MGS) instruction initiates a stop of all motion in progress on all axes in the specified group by a method configured individually for each axis or as a group via the Stop Mode of the MGS instruction.

Motion Group Shutdown (MGSD)

Use the Motion Group Shutdown (MGSD) instruction to force all axes in the designated group into a Shutdown state.

Motion Group Shutdown Reset (MGSR)

Use the Motion Group Shutdown Reset (MGSR) instruction to transition a group of axes from the shutdown operating state to the axis ready operating state.

Motion Event Instructions

Motion Configuration Instructions

Multi-Axis Coordinated Motion Instructions

Motion Coordinated Linear Move (MCLM)

Use the MCLM instruction to start a single or multi-dimensional linear coordinated move for the specified axes within a Cartesian coordinate system.

Motion Coordinated Circular Move (MCCM)

Use the MCCM instruction to initiate a two or three-dimensional circular coordinated move for the specified axes within a Cartesian coordinate system.

Motion Error Codes, faults, and attributes

Understand Motion Status and Configuration Parameters

Troubleshoot Axis Motion

Overview of motion-related data types

Overview of Structured Text Programming

Common attributes for Motion instructions

Related product manuals