Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 13 of 18

Simatic S5 to RSLogix 5000 Application Conversion Guide: Chapter 4: Additional RSLogix 5000 Features

Pages 97 to 100 of 140, from Simatic S5 to RSLogix 5000 Application Conversion Guide

The original document is the PDF (3.5 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Siemens 6ES5-431-8MA11, Siemens 6ES5-451-8MA11 and Siemens 6ES5-452-8MR11

Page 97

Chapter

4

Additional RSLogix 5000 Features

Introduction

The objective of this chapter is to describe RSLogix 5000 features unavailable in S5. Using these features can result in a more unified RSLogix 5000 application structure than one created by directly converting S5 program components. There are programming and structure elements in RSLogix 5000 software that differ from S5. The goal of this chapter is to highlight these differences so the programmer understands these features and can use them to achieve the most efficient conversion of an application from S5 to RSLogix 5000 software. The goal of this chapter is to: • •

Task Monitor provide information to the S5 user to make the design process easier and quicker. highlight RSLogix 5000 capabilities to avoid programming controller features.

RSLogix 5000 software includes a tool called Task Monitor that helps analyze scheduled tasks, and much more. The screen shot below shows how information about your controller’s tasks can be viewed in one table. The other tabs provide additional system-level information on your controller’s performance. The tool is included as standard on the RSLogix 5000 installation disk.

97Publication LOGIX-AP010B-EN-P - May 2010

97

Page 98

Chapter 4

Additional RSLogix 5000 Features

Asynchronous I/O Updating

In Logix systems, I/O is updated asynchronously with respect to program execution periods. In contrast, S5 uses the traditional PLC approach where an I/O image table is updated at the start of the cycle and input values do not change during an execution of the program. When converting from S5 to Logix, consider if you must buffer input data so its value remains constant during a program-scan cycle. To keep the value constant, copy the inputs to memory variables at the start of the program and then use these memory variables, instead of the inputs, throughout the code.

DINT Data Type

Logix controllers operate on DINT (32 bit integer) tags more efficiently than on INT (16 bit integer) or SINT (8 bit integer). Use DINT whenever possible, even if the range of values would fit in an INT or a SINT. These data types are provided for IEC61131-3 compatibility reasons, but are internally converted to DINTs before being used by the program. Therefore, code will execute more efficiently in most situations.

String Data Type

The S5 permits ASCII characters to be stored in datablock locations but there are no instructions available in S5 to manipulate text strings. In RSLogix 5000 software, it is possible to define a variable of type STRING and to manipulate these string variables with the following instructions: • • • • • •

Find –finds the starting position of a string within another string. Insert –inserts ASCII characters at a specified location in a string. Concat –adds ASCII characters to the end of a string. Mid –copies a specified number of characters from a string and stores them in another string. Delete –removes ASCII characters from a string. File Search and Compare (FSC) – finds a string in an array of strings

In RSLogix 5000 software, the following comparison operations can be performed on string variables and numerical variables. The hexadecimal value of each character is used to determine the value of a string where the hexadecimal values are determined from the ASCII character code table. • • • • • • •

98

Compare (CMP) Equal (EQU) Not Equal (NEQ) Greater Than Or Equal GEQ) Greater Than (GRT) Less Than or Equal (LEQ) Less Than (LES)

Publication LOGIX-AP010B-EN-P - May 2010

Page 99

Additional RSLogix 5000 Features

Chapter 4

RSLogix 5000 software also allows the programmer to perform the following conversions on string type variables. • • • • • •

DINT to String (DTOS) – converts a numeric value to its ASCII equivalent. String to Dint (STOD) – converts an ASCII representation to its equivalent integer value. Real to String (RTOS) – converts a real value to its ASCII equivalent. String to Real (STOR) – converts an ASCII representation to its equivalent real value. Upper – converts all the characters in a string to uppercase. Lower – converts all the characters in a string to lowercase.

RSLogix 5000 software also provides an instruction called Swap Byte (SWPB) that rearranges the bytes order in a source and places the result in a destination. This instruction cannot be executed on string type variables but on double integers by using the ASCII display format to rearrange characters.

Coordinated System Time (CST)

All S5 controllers, except S5-90U, have a system clock that set and read the current date and time. RSLogix 5000 software provides the GetSystemValue (GSV) and SetSystemValue (SSV) instructions to access system status data, including date and time. It does this by accessing the data assigned to objects. The two date/time related objects are Coordinated System Time Object and WallClockTime.

Coordinated System Time (CST) Object The CST is a 64 bit, free-running timer with microsecond granularity on a ControlLogix backplane. A time master, for example, a ControlLogix controller or 1756-SYNCH module generates the timer and sets it on the backplane. All other modules in the chassis have read-only access to the CST and adjust their time reference based on the backplane time reference. CST serves as a relative time reference.

WallClockTime By setting parameters, this object keeps the current UTC time internally while allowing access to other time zones and adjustment for daylight-savings time.

Publication LOGIX-AP010B-EN-P - May 2010

99

Page 100

Chapter 4

Additional RSLogix 5000 Features

The RSLogix 5000 time-based objects provide the foundation for clock synchronization for multi-CPU systems, accurate motion control functionality, scheduled output switching to 100 µs accurate, input-event timestamping, scheduled analog sampling, safety I/O monitoring and communication, motion cam position calculations, and Wall Clock Time.

Timestamped Inputs

Timestamp is a RSLogix 5000 functionality that records a change in input data with a relative time of when that change occurred (CST time). With digital input modules, you can configure a timestamp for changes of data and use the timestamp to compare the relative time between data samples. This feature allows for accurate calculations between events to help identify the sequence of events in fault conditions or during normal I/O operations. Because only one timestamp value is returned to the controller when any input channel changes state, only use timestamping on one input point per module. This value will appear in one of the tags automatically generated when the module is configured as show below.

Timestamping on multiple input points can be achieved with a Logix Sequence of Events module. This is a DC input module that provides timestamping on a per-point basis and the normal functionality of a digital input module. There are two type of Logix Sequence of Events Modules namely: • •

Scheduled Outputs

1756-IB16IS0E – 24/48V DC inputs. 1756-IH16IS0E – 125V DC inputs.

With digital output modules, you can configure the module to set the outputs at a scheduled time with reference to the CST. Scheduled outputs can be used in conjunction with the timestamped inputs feature so that after input data changes state and a timestamp is generated, an output point will actuate at some configured time in the future. You can schedule outputs up to 16.7 seconds into the future. This allows the user to achieve unparalleled accuracy in linking outputs to time references for applications such as axis positions in motion control, or process control functions, without putting a huge burden on the communication and logic processing systems and related application code.

100

Publication LOGIX-AP010B-EN-P - May 2010