Search This Blog

_____________________________________________________________

Join Our Site To Subscribe

Wednesday, February 9, 2011

Glossary

Breakpoint

Breakpoints stop your program when conditions you define become true. For example, you can set a breakpoint to stop execution when a particular rung executes. Breakpoints are very useful for debugging and troubleshooting.

Breakpoint hit

A hit is when a breakpoint condition goes true. Breakpoint hits cause RSLogix Emulate to stop executing your program, freezing the ladder logic and data table in the state that caused the breakpoint condition to become true.

Channel 0

Channel 0 is a special communications channel on certain programmable logic controllers that allow the controllers to send and receive serial communications data. RSLogix Emulate can emulate Channel 0 communications, allowing you to check out these communications through the software.

DBF files

DBF files are standard database files -- most database and spreadsheet packages can read and write this format.

Debug files

Debug files are files used to simulate the actions of I/O in your system. The software does not recognize I/O, and therefore does not emulate I/O operations. If you need to simulate actions of I/O to increase the accuracy of your emulation, you will need to program these files.

Emulate

Emulation is simulation of operation -- in the case of RSLogix Emulate, the software emulates a programmable logic controller.

Halt mode

Stops program execution. Identical to Program Mode.

Hit (breakpoint)

A hit is when a breakpoint condition goes true. Breakpoint hits cause the software to stop executing your program, freezing the data table in the state that caused the breakpoint condition to become true.

One-rung mode

Scans the program one rung at a time. Allows you to step through execution in one rung increments.

Program mode

Stops program execution. Identical to Halt Mode.

Single-scan mode

Goes through one program scan, then halts execution. Allows you to step through execution one scan at a time.

Watchdog timer

The watchdog timer is a processor function that makes sure your ladder logic programs do not take more than a specified amount of time to execute through a complete scan. If the watchdog timer expires before a program scan is complete, the processor sets a major fault. The software can emulate the function of the watchdog timer -- you can also turn off this feature.

Troubleshooting

Here are a few of the most common problems people have with RSLogix Emulate, and how to get around them.

Q. When I run a project in RSLogix Emulate, my system seems to slow down drastically. What's wrong?

A. The software runs your ladder logic projects as fast as it can. Sometimes, that means that the software will "take over" your computer's CPU. You can stop this from happening changing the Priority setting in the Emulation Settings dialog.

Q. Timers are not updating.

A. You may need to increase the priority of the running program. Change the Priority setting in the Emulation Settings dialog.

Q. The screen does not refresh fast enough.

A. You may need to increase the priority of the running program. Change the Priority setting in the Emulation Settings dialog.

Q. Why do I keep getting a "watchdog timer" fault? There isn't that much ladder logic in my project.

A. Because the software isn't the only program being run on your computer, the emulator runs projects slower than a programmable controller will run them. You can adjust the watchdog timer setting in the Fault Options dialog.

Q. RSLogix Emulate doesn't seem to perform exactly like my PLC-5 or SLC 500 processor.

A. The software does not perform all of the functions of a PLC-5 or SLC 500 processor. Check the Emulator exceptions list. If you are seeing behavior that can't be explained from that list, please contact Rockwell Software Technical Support.

Q. What's wrong with all my I/O instructions?

A. The software doesn't know about I/O. Most instructions having to do with I/O operations are not executed. Check the Emulator exceptions list. For a more detailed description about how the software works, see the What RSLogix Emulate does topic.

Q. Why can't I see emulated projects in RSLinx or WINtelligent LINX?

A. Make sure you have configured a communications driver for the RSLogix Emulate product you are using. See the Communications setup topic for more information.

RSLogix Emulate messages

The following is a description of many of the most common messages that can come from RSLogix Emulate 5 and RSLogix Emulate 500. If you get a message that is not listed here and you can't determine what you should do, call Rockwell Software Technical Support.

"This SLC500 program must be compiled before it can be emulated."

SLC 500 programs are compiled before downloading to processors. Use your ladder logic editor to compile the SLC 500 program before trying to emulate it.

"OLE initialization failed. Make sure that the OLE libraries are the correct version."

RSLogix Emulate was unable to initialize the OLE subsystem of Windows. You may need to reinstall Windows.

"This SLC OS is not currently supported."

The ladder logic project you are loading was compiled for an SLC 500 operating system that is not currently supported in RSLogix Emulate. Either recompile the logic for an earlier series and revision of the SLC 500, or contact Rockwell Software for a newer version of RSLogix Emulate.

"File Is Not SLC500"

RSLogix Emulate is unable to recognize the ladder logic file you are opening as a SLC 500 ladder logic file. Either the file is corrupt or it never was intended to be a ladder logic file.

"File is corrupt (bad data file, program file, or data file count)"

RSLogix Emulate detected corruption in your ladder logic file. Recompile the ladder logic and try again.

"The copy protection for RSLogix Emulate 500 (or RSLogix Emulate 5) cannot be found. This application does not have a DEMO mode, therefore, you will not be able to run this program without copy protection."

The copy protection system for the software has failed. Either the copy protection was never installed, or the protection files have been compromised in some way. You need to install the software according to the directions that came with it, or contact Rockwell Software Technical Support for assistance.

"Start Value Out of Range"

The value for the start rung cannot exceed the number of rungs in the program.

"Destination station X is a duplicate"

The station number you entered has to be unique -- just as if you were working with a Data Highway Plus or Data Highway 485 network.

"Destination station must be specified"

You need to specify a destination station number. The number must be unique.

"Main File Must Be Ladder"

You cannot set the main program file to be anything other than a ladder logic file.

"Debug File Must Be Ladder"

You cannot set the debug program file to be anything other than a ladder logic file.

"Invalid Customer Registration Information, Verify the Program Installation."

Make sure you have installed RSLogix Emulate correctly. If you still get this error, call Rockwell Software Technical Support for assistance.

"The maximum number of users has been reached. See your network administrator."

On a network installation of RSLogix Emulate, there is a maximum number of people who can use the software at any given time. Check with your network administrator to make sure that there are not too many people using the software -- if there are, you may need to purchase additional RSLogix Emulate licenses. If there are not too many people using the software at one time, there may be a problem with the installation.

"This Program contains an unsupported instruction X in file Y rung Z"

RSLogix Emulate detected an instruction it did not understand at the specified program file and rung number. You may need a newer version of RSLogix Emulate, or your ladder logic program may be corrupt.

"Station number out of range (0-31) (or 0-77 octal)"

Data Highway 485 station numbers are limited to 0-31. Data Highway Plus station numbers are limited to 0-77 (octal). Enter a station number in that range.

"The Trend file address is invalid"

The trend file you are trying to use with your project contains an address that is not in your ladder logic project.

"The Trend file address type is invalid, or doesn't match the processor"

The trend file you are trying to use with your project contains an address type that is invalid for the SLC 500 model you are using.

"The Trend file is larger than the destination can hold"

You are trying to read in a trend file that is too large. You can edit the trend file to make it smaller.

"Record number out of range"

You asked for a trend file record that is not in the trend file.

"OLE 2.01 initialization failed"

RSLogix Emulate was unable to initialize the OLE subsystem of Windows. You may need to reinstall Windows.

"Main File Value Out of range (2-255)"

You tried to enter a main file number outside the range available for SLC 500 processors.

"Debug File Value Out of range (2-255) or 0 to Disable"

You tried to enter a debug file number outside the range available for SLC 500 processors.

"File Number out of range (2-255)"

The file number in question is outside the range available for SLC 500 processors.

"File Doesn't exist"

The file number you entered does not exist.

"File Must be LADDER"

The file number you entered is not a ladder logic file.

"Invalid Rung Number"

The rung number you entered does not exist in your ladder logic program.

"Rung Number is out of range (0-X)"

The rung number you entered does not exist in your program file.

"DH station and Emulation station must NOT be the SAME"

RSLogix Emulate and each emulated ladder logic project must have a unique station number.

"An Unknown Fault Has Occurred"

RSLogix Emulate experienced a fault that it does not recognize. Call Rockwell Software Technical Support for assistance.

"An attempt was made to execute an invalid Program file"

RSLogix Emulate tried to execute your project, but found a program file that it could not interpret. Either the program file is corrupt (in which case you should recompile your project), or you need a newer version of RSLogix Emulate (in which case you should call Rockwell Software Technical Support).

"An attempt was made to execute an invalid Opcode"

RSLogix Emulate tried to execute your project, but found an instruction that it could not interpret. Either the program file is corrupt (in which case you should recompile your project), or you need a newer version of RSLogix Emulate (in which case you should call Rockwell Software Technical Support).

"An Invalid direct instruction parameter was decoded"

RSLogix Emulate tried to execute your project, but found an instruction that contained an address it could not interpret. Either the program file is corrupt (in which case you should recompile your project), or you need a newer version of RSLogix Emulate (in which case you should call Rockwell Software Technical Support).

"An Indexed address was out of range"

The result of processing an indirect address resulted in a direct address that does not exist in the ladder logic project. This is a major fault. Use boundary tests before executing instructions containing indirect addresses.

"A File POS value was out of range"

A file address using a position word (.POS) was out of range -- the position specified for the file does not exist. This is a major fault. Use boundary tests to help trap this condition.

"A File LEN value was out of range"

A file address using a length word (.LEN) was out of range -- the length specified for the file does not exist. This is a major fault. Use boundary tests to help trap this condition.

"A NEGATIVE Timer Accum value was encountered"

A timer accumulator value (.ACC) was set to a negative value. This is a major fault. If you are writing values into a timer accumulator address, use boundary tests to make sure you are not writing a negative value.

"Rung contains too many nested branches"

Nested branches may be only eight levels deep. Exceeding eight levels deep faults the processor.

"A Breakpoint was executed"

A breakpoint you set executed, halting program execution.

"The Watch Dog Timer (S28) has timed out"

This is a major fault. The ladder logic project has taken too long to execute. You can adjust how RSLogix Emulate handles the watchdog timer in the Emulation Settings dialog.

"Too many nested subroutine calls (8 MAX)"

You can nest only up to eight subroutine calls. Any more than that results in a major fault.

"No LBL was found for a JMP instruction"

Your ladder logic contains a jump (JMP) instruction for which there is no label instruction (LBL). This results in a major fault.

"Minor Fault was set at end of scan"

A minor fault bit was set at the end of the program scan. This results in a major fault. You may need to test for and correct minor faults in your ladder logic.

"Invalid presets loaded to HSC"

There is a high-speed counter (HSC) instruction in your ladder logic with invalid presets. This results in a major fault.

"Index address outside of data file space"

An indexed address resulted in a direct address outside of the currently defined data table. This is a major fault. You may need to perform boundary tests to make sure your indexed addresses are valid before executing instructions involving them.

"Indirect element reference exceeds data file length"

An indirect address element resulted in a direct address outside of the currently defined data table. This is a major fault. You may need to perform boundary tests to make sure your indirect addresses are valid before executing instructions involving them.

"Indirect subelement reference of I/O slot does not exist"

A reference to an I/O address made indirectly results in a slot number that does not exist. This is a major fault. You may need to perform boundary tests to make sure your indirect addresses are valid before executing instructions involving them.

"The Ladder file you are trying to emulate is corrupt. There is no status file(data file 2). Use your Ladder Editor to fix the corrupted file."

The ladder logic file you are trying to emulate contains no status file. You will need to create one using your ladder logic editor before you can emulate the file.

"Unable to open COMx for Channel 0 Emulation "

The COM port you selected for Channel 0 emulation is currently being used by another software package or device. Choose another COM port.

"No NXT was found for a FOR instruction"

There was a Next instruction (NXT) without a corresponding For instruction (FOR). This is a major fault.

"An INDEXED (S24) Address was outside the file limits"

An indirect address resulted in a direct address outside of the currently defined data table. This is a major fault. You may need to perform boundary tests to make sure your indirect addresses are valid before executing instructions involving them.

Data Highway 485/DF1 emulation

When you run RSLogix Emulate software, you can place your computer on a simulated DH485 (for SLC 500 emulation) or DF1 (for PLC-5 emulation) network, connecting it with a computer running operator interface software such as RSView. With this setup, you can test your operator interface before connecting it to a physical processor. (If you want to simulate using Channel 0 with ASCII devices, see the Channel 0 emulation topic.)
To use Data Highway 485/DF1 emulation:
  1. Set the station number for your project to 1. To do this, click Settings > Emulation, then set the Station # field to 1. (The DF1 or DH 485 emulation will not work unless the station number is set to 1.)
  2. Connect a serial cable (a straight-through cable) to connect one of your computer's serial ports (COM ports) to a COM port on the computer running the operator interface software.
  3. In RSLogix Emulate, click Settings > Channel 0 Data Highway. The software displays a dialog allowing you to set up a COM port to simulate communications.
  4. From the Port listbox, select the COM port you want to use. (Make sure the COM port you choose is not occupied by another device, such as a mouse.)
  5. From the Baud listbox, select the communication speed for your connection. You should select the same speed as the connection between the operator interface computer and the physical processor.
  6. From the Parity listbox, select the parity for the connection. You should use the same parity as the connection between the operator interface computer and the physical processor.

Playing trends

One of the most powerful features of the software is the play trend feature. This feature allows you to take data gathered from your process, and see what would happen if you change your ladder logic or other address values.
The play trend feature "feeds" data to the software from .DBF files, replaying the processor's actions in response to the data. You can then monitor your ladder logic, looking for the effects of your changes.
Caution: While the software's play trend feature is useful for examining scenarios involving changes to ladder logic programs, you must not rely solely on your findings from the software to make changes to your process. RSLogix Emulate does not exactly simulate all the functions of a processor. The software does not run at the same speed as your processor, has differences in floating point calculations, and other differences that make it imperative that you carefully consider any changes you make to your process based on findings from a simulation.
Once it's set up, the trend player is as simple to operate as a tape player.

Setting up the trend player

Here's how to set up the trend player feature of RSLogix Emulate:
  1. In RSLogix Emulate, load the project into which you want to play a trend.
  2. In RSLogix Emulate, click Ladder > Play Trend. RSLogix Emulate displays the trend player dialog.
  3. You need to tell RSLogix Emulate where the .DBF file is, and other parameters for your simulation. To do this, click the Setup button. RSLogix Emulate displays the trend player setup dialog.
  4. Click the Open button. RSLogix Emulate opens a file selection dialog, allowing you to select a .DBF file to use in the simulation. Select the file you wish to use, and click the OK button.
  5. If you like, you can set up the trend player to start and stop at any record number you like. To do this, type record numbers in the Start Play At and Stop Play At fields. By default, the trend player starts at record 0 (the first record) and ends at the last record in the .DBF file.
  6. You can adjust the rate at which the trend player feeds data to RSLogix Emulate by moving the Playback slider bar. Moving the slider to the right increases the rate, and moving it to the left decreases the rate.
Note The rate at which RSLogix Emulate performs depends on several factors, including: CPU speed, number of applications running, and memory in your computer.

Assigning addresses in the trend player

If your .DBF file does not contain address information, you must assign addresses to the .DBF file records for the trend player to work.
To assign addresses:
  1. In RSLogix Emulate, open the ladder logic project into which you want to play data.
  2. Set up the trend player with the .DBF file containing the data you want to play into the project. .
  3. From the trend player setup dialog, click the Address button. The software displays the Edit Trend Item Addresses dialog.
  4. Click the first address you want to change, and click the Edit button. The address appears in the Assigned Address field at the bottom of the dialog.
  5. Type the new address in the Assigned Address field, and click the Save button.
  6. Repeat steps 4 and 5 for the remaining addresses you want to redefine.

Trend player controls


The trend player tells you the record number currently being played, and the time stamp on the record (from the .DBF file).

Starting the playback

To start a playback, click the start/restart playback button. The playback will run until the trend player runs out of records in the .DBF file, or until you stop or pause the playback.

Stopping the playback

To stop the playback, click the stop playback button. This stops playback and "rewinds" the trend player back to the first record in the .DBF file. To stop momentarily, click the pause playback button.

Pausing the playback

To pause the playback, click the pause playback button. This stops the playback, and leaves the trend player ready to resume playback at the .DBF file record where you paused it. To resume playback, click the start/restart playback button.

Moving through the .DBF File

You can "rewind" and "fast forward" through the .DBF file by clicking the reverse one record and forward one record buttons. Each click of these buttons moves the trend player back or forward one record in the .DBF file.

Breakpoints

To work with breakpoints , click Ladder > Breakpoints.
Breakpoints are defined by file number, rung number, whether the rung should be true or false, and the number of times the rung is true or false (Count).

Setting breakpoints

To set a breakpoint:
  1. Click Ladder > Breakpoints. The software displays the Breakpoints dialog.
  2. Click Add New.
  3. In the File field, type the number of the ladder file in which you want to set the breakpoint.
  4. In the Rung field, type the number of the rung for which you want to set the breakpoint.
  5. In the Count field, type the number of scans you want to occur with the rung in the state you select. For instance, if you want to "hit the breakpoint when the rung is true for 40 scans, type 40 in the Count field.
Note This doesn't mean the rung must scan with the same condition consecutively. For instance, if you set a TRUE breakpoint with a count of 40 on a rung that goes true once per minute, the breakpoint would hit after 40 minutes.
  1. From the list box under the Count field, select the state you want to examine with the breakpoint. For instance, if you want to count when the rung is true, select TRUE.
TRUE

when the rung is true
FALSE
when the rung is false
ANY
when the rung is scanned, regardless of the state of the rung
Example:
Rungs are considered TRUE when there is logical continuity from the beginning of the rung to at least one output. The examples below show how some rungs are assessed by RSLogix Emulate. The gray squares indicate which instructions evaluate as true.

  1. Click Save. The software moves the breakpoint into the breakpoint list.

Editing breakpoints

To edit a breakpoint:
  1. Click the breakpoint you want to edit.
  2. Click Edit. The software moves the parameters for the breakpoint into the fields at the right of the dialog.
  3. Edit the breakpoint's parameters. When you are through editing, click Save to save the changes.

Enabling and disabling breakpoints

You can disable breakpoints so that they are still in place, but will not stop program execution. To do this, click the breakpoint you want to disable, and click Toggle. The active/inactive state of the breakpoint is shown in the state column in the breakpoint list: A indicates an active breakpoint, and I indicates an inactive breakpoint.

Deleting breakpoints

To delete a breakpoint, click on the breakpoint you want to delete, then click Delete. The breakpoint is deleted.

Channel 0 emulation

The software's Channel 0 emulator can help you debug the interface between your ladder logic program and a serial device connected to Channel 0 of an Enhanced PLC-5 or SLC processor. The emulator uses your computer's serial ports to emulate the port. (If you want to use a serial port to simulate Channel 0 as a DF1 or DH-485 port, see the Data Highway 485/DF1 emulation topic.)
Caution: RSLogix Emulate software does not support uploading from the emulator using another computer through an emulated Channel 0 port. Doing so may corrupt the emulated ladder logic program.

Configuring Channel 0 emulation for use with a serial device

To emulate Channel 0 connections to a serial device, you must configure one of your computer's COM ports to emulate Channel 0. To do this:
  1. Click Settings > Channel 0 ASCII Instructions. The software displays the Channel 0 ASCII Instruction Settings dialog.
  2. From the Port list box, select a COM port to connect to the serial device. Make sure you don't select a COM port that is used by another serial device (such as your mouse or other pointing device). Selecting None disables Channel 0 emulation.
  3. From the Baud list box, select the baud rate (communication speed) for the port. Make sure the baud rate matches that of the serial device you are connecting to your computer.
  4. From the Parity list box, select the parity mode you want to use with the port. Make sure the parity setting matches that of the serial device you are connecting to your computer.
  5. There are two sets of radio buttons underneath the list boxes. These are used to select the number of bits in each packet, and how many stop bits are in each packet. Click the settings that match the settings on the serial device you are connecting to your computer.
  6. Click OK. The software is now prepared to use the COM port as if it was Channel 0 while it emulates your ladder program.

Strategies for using Channel 0 emulation

In general, you should start Channel 0 emulation before attempting to communicate with your serial device.
Remember that the software scans a single main program file at a time. That program file and any subroutines it calls will be executed. Other files will not be scanned. If you are not communicating with your serial device, verify that the read and write instructions are actually being scanned.
Channel 0 emulation should work whether a debug file is defined or not. You can even change debug files without disturbing Channel 0 emulation. If you wish, you can specify blocks of program file and debug files to emulate, and Channel 0 emulation will still function normally.

Debug operations

Since there is no real I/O when emulating a ladder logic project, you can create and edit special program files to simulate the I/O. These files are called debug files . Debug files emulate a piece of your process, simulating inputs to your ladder logic program.
Use Rockwell Software ladder logic editors to create debug files. These editors include:
  • RSLogix 500 (for SLC 500 projects)
  • RSLogix 5 (for PLC-5 projects)
  • WINtelligent LOGIC 5 (for PLC-5 projects)
  • A.I. Series Ladder Logistics (for PLC-5 or SLC 500 projects)

Creating debug files

You create debug files with your ladder logic editing application. Rockwell Software applications for editing ladder logic all support creating debug files. For information about creating debug files with your ladder logic editing software, please see the documentation for that software package.

Select debug files for emulation

You can select which debug file you want to use with the emulation session. You can select the debug file when you first open the ladder logic file in RSLogix Emulate, or you can define it later. You can also change the debug file as RSLogix Emulate scans the ladder logic. You can have multiple debug files defined in your ladder logic program, but you can use only one at a time.
To specify which debug file you want to use:
  1. Click Settings > Emulation. The software displays a configuration dialog.
  2. In the Debug File # field, type the number of the debug file.
  3. In the Start Rung field, type the number of the first rung to scan in the debug file.
  4. In the End Rung field, type the number of the last rung to scan in the debug file.
  5. Click the OK button. The software uses the new settings for the debug file.

Observing and tracing faults

The software acts as if it was a processor, down to telling you if the program faults. When the software detects a program fault, it displays a fault dialog.
The fault dialog indicates:
  • which program file had the fault (the name of the program is displayed in the title bar of the dialog)
  • the type of fault (in this case, the watchdog timer timed out)
  • the location of the instruction that was executing when the fault occurred (program file, rung number, instruction)
You can keep the dialog on-screen as long as necessary to trace the fault in your ladder logic. When you have recorded where the fault occurred, click OK to close the dialog.
When a fault occurs, and you are online with the ladder logic through PLC-500 A.I. Series, PLC-5 A.I. Series, RSLogix 5, RSLogix 500, or WINtelligent LOGIC 5, you can trace the fault as if you were online with a processor, using the processor status displays to track the fault to its source, and clear the fault.

Changing modes

To change the mode of a project, select the project from the file selection list box, then click the button for the mode you want to use. (You can also select modes from the Ladder menu.

The modes operate as follows:
  • Program (Halt) mode stops program execution.
  • Run mode runs the program based on the parameters used when the program was loaded into RSLogix Emulate's memory. Normally, the program runs as if it was in a processor.
  • Single-scan mode scans the emulated program once. To use this mode, click the Tst button, then click the Scn button each time you want to scan the program. An alternative to clicking the Scn button is pressing CTRL-SPACEBAR.
  • One-rung mode scans the emulated program one rung at a time. To use this mode, click the One button, then click the Scn button each time you want to scan the program. An alternative to clicking the One button is pressing CTRL-SPACEBAR. In the lower right-hand corner of the RSLogix Emulate window is a display showing where you are in the ladder logic file, by program file and rung number (e.g., 2:38 indicates program file 2, rung 38).
If you are online with the emulated project with RSLogix 5, RSLogix 500, PLC-500 A.I. Series, PLC-5 A.I. Series, or WINtelligent LOGIC 5, you can change modes as if you were communicating with a processor in Remote mode. (In WINtelligent LOGIC 5 and A.I. Series software, you cannot change to the Single-scan or One-rung modes; for those modes, you must use RSLogix Emulate's icons or menus.)

Changing data table values

To change a data table value while "online" with RSLogix Emulate, you can:
  • use your ladder logic editing software to display the data table and change the value of the desired address. This method works with storage words and bits.
  • force an I/O bit. This method works with real I/O addresses only (output and input files).

Closing an emulated ladder logic project

To close a ladder logic project, select the project from the File Selection list box, then click File >Close.
Because the software keeps a list of which projects are in memory, simply closing the software does not clear the file list. When you reopen the software, it reloads the files it had in memory when it was closed.
Note Make sure the applications using an emulated project are offline before closing an emulated project. This allows the applications to terminate their communications in a normal fashion, rather than displaying errors when they are no longer able to communicate. 

Editing ladder logic during emulation

You cannot edit ladder logic while online with the emulator. (You can change data values, but you cannot edit logic rungs.) If you see something in your ladder logic you want to change:

If you are using RSLogix 5 or RSLogix 500 with RSLogix Emulate:

You can download your edits as if you were downloading to an actual processor. (You cannot, however, perform edits online with the emulator.)

If you are using A.I. Series software with RSLogix Emulate:

  1. Go into offline editing in your ladder logic editor, make your changes, and save your changes to disk.
  2. Reload the project into RSLogix Emulate by clicking the Reload icon. Note that you will have to stop emulating by clicking the HLT button before the software will allow you to reload the project.

Setting fault options

You can set the faults to which the emulator will respond with a fault message. For instance, if you know you are always going to get a particular fault because you are not connected to I/O, you can choose to ignore that fault. To set fault options, click Settings > Fault Options.

For both RSLogix Emulate 5 and 500:

Watchdog Timer:
The watchdog timer operates much the same as the watchdog timer in a programmable controller, except that it can take longer to emulate a program than it takes to run the same program in a programmable controller. You can leave the watchdog at its normal setting, multiply the watchdog timer value by 10, or disable the watchdog timer fault entirely.
If you have the watchdog timer fault disabled, it is possible to "hang" the emulation in an infinite loop. If this happens, you will have to terminate the software manually.

For RSLogix Emulate 5:

The faults you can set are:
  • Bad Indirect File Number
  • Bad Indirect Element Number
  • Bad Indirect Bit Number
  • Bad Indirect File Type
  • Negative Timer .ACC
  • Too Many Nested Branches
  • Too Many Nested JSR Calls
  • Bad Index (S:24) Address

Emulation settings

The Emulation Settings dialog allows you to modify how the emulator scans your ladder logic files, even while the emulator is scanning. To get to this dialog, click Settings > Emulation.

Main file settings

This field or control:

Does this:
Main File #
Indicates the ladder logic file from which the scan starts. During a program scan the main file and any subroutines called by the main file and any nested subroutine files are executed.
Default = 2
Start Rung
Indicates the first rung in the main file to be scanned. A rung number of 0 starts the scan from the beginning.
Default = 0
End Rung
Indicates the last rung to be scanned. The rung number for this field IS scanned. To scan one rung, set the start and end numbers to the number of the rung you want to scan. Setting the end rung to -1 sets the software to scan to the end of the file.
Default = -1

Debug file settings

The debug file is scanned after each scan of the main file. The debug file contains any ladder logic you want to use to simulate the expected input response to the normal program output conditions. For example, a you could use FAL, MOV, or SQO instruction in the debug file to step an expected input sequence through the data table to test your desired output results.
A debug file is not required to operate the software. The default value for the Debug File field is 0 , indicating no debug file is selected. Any other number MUST be a valid Ladder file. No SFC or CAR files can be used. The ladder file may be empty although this would have the same effect as using a file number of 0.
This field or control:

Does this:
Debug File #
Indicates the ladder logic file you want to use as a debug file.
Default = 0
Start Rung
Indicates the first rung of the debug file to be executed during the debug scan.
Default = 0
End Rung
The end field indicates the last rung of the debug file to be scanned. To scan one rung, set the start and end numbers to the number of the rung you want to scan. Setting the end rung to -1 sets the software to scan to the end of the file.
Default = -1

Data Highway Plus settings

This field or control:

Does this:
Station #
Indicates the Data Highway Plus station address you want the software to take. Note that this is not a physical address -- it is used so the communications software can identify and display the emulated processor.
Restore Mode on Startup
If this box is checked, the selected file will resume execution in the last mode it was in when the program is started. If the box is not checked, each file will be placed in Halt mode on startup.

Priority

This field or control:

Does this:
Priority
The priority setting is a relative value, indicating the amount of time spent in a scan before control is yielded to another application. Setting this value higher will cause a shorter overall scan time but may cause the system to be sluggish. Setting this value to a lower value will extend the overall scan time but should cause the system to be more responsive.  

Opening a ladder logic project

RSLogix Emulate 5 accepts ladder logic files in the RSLogix 5 .RSP and PLC-5 A.I. Series .X5 formats. These files can be created with RSLogix 5 or PLC-5 A.I. Series software.
RSLogix Emulate 500 accepts ladder logic files in the RSLogix 500 .RSS and the PLC-500 A.I. Series .ACH formats. These files can be created with RSLogix 500 or PLC-500 A.I. Series software.
To open a ladder logic project in RSLogix Emulate:
  1. Click File > Open. The software displays the Open dialog.
  2. Highlight the file you want to open, and click OK.
  3. The software displays a configuration dialog for the ladder logic file.
In this dialog, specify the following:
  • File # indicates the ladder file from which scanning is started. During a program scan, the main file, any subroutines called by the main file, and any nested subroutine files are executed.
  • Start Rung indicates the first rung in the main file to be scanned. A rung number of 0 starts the scan from the beginning.
  • End Rung indicates the last rung to be scanned. The rung number for this field IS scanned. In order to scan one rung, make the start and end numbers identical. Setting the end rung to -1 scans to the end of the file.
  • The defaults for these fields are main file 2, start rung 0, end rung -1. This causes file 2 to be scanned from beginning to end. Any subroutines called by file 2 and any nested subroutines are also scanned.
  • Station # sets the Data Highway Plus or Data Highway 485 station number for the emulated processor.
Note If you want to emulate more than one project at the same time, make sure you set different node numbers for each project in the communications configuration. Otherwise, RSLogix will overwrite the project in RSLogix Emulate (each project you download will overwrite the same node number in RSLogix Emulate).
  • Restore Mode on Start (if checked) means that the emulated program will retain whatever mode it had when the software is closed. When the software is reopened, the program will reopen in its last mode.
  1. Click the OK button. The software reads the file into memory, and holds it there.
Note With this same dialog, you can specify debug file options. Debug files are not required for the software to function, but are used to simulate real I/O.
Note Once a file is opened in the software, that file remains in the file list. Whenever the software is opened, that file will also be taken into memory. Essentially this means two things:
  • Once you have configured your emulation scenario, you can close the software, reopen it, and have the same files ready to go.
  • It is important that you remove files from the list when you are no longer going to emulate them. This cuts down on the resources used by the software, particularly if the file is running.

Emulator operations

This help topic will orient you to how RSLogix Emulate software works and the operations you can perform with it.

Before you emulate projects

Before you emulate your projects, you should understand how RSLogix Emulate software works and what it can do. While the software behaves like a programmable logic controller most of the time, there are also some things the software does not do. You need to be aware of the limitations of the software before trying to emulate your logic.

Basic operations

There are several basic operations associated with using the software:

Advanced operations

Some advanced emulator operations are:
  • Debug operations, which allow you to simulate using I/O with your program
  • Channel 0 emulation, which allows you to simulate operations that involve using Channel 0 with serial communication devices
  • Data Highway emulation, which allows you to emulate using a SLC-500 processor on a Data Highway Plus network.
  • Breakpoints, which allow you to stop program emulation under certain program conditions that you specify
  • Playing trends, which allows you to "play back" a record of your process' activity through the software

Communications setup

Depending on the operating system you are using, you need to configure either RSLinx or WINtelligent LINX to communicate with RSLogix Emulate as if it was a hardware device.
RSLinx works under Windows NT, Windows 2000, Windows 98, and Windows 95.
WINtelligent LINX works under Windows 95 (but does not work with some of the newer Rockwell Software products). If you already have a working WINtelligent LINX installation, RSLogix Emulate software will work on that installation as well. WINtelligent LINX does not work with Windows NT or Windows 2000.

RSLogix Emulate's controls

All of RSLogix Emulate's functions are selectable from a single menu bar. However, underneath this simple interface is a powerful emulator, able to simulate several running PLC-5 or SLC 500 programs at the same time.
Let's take a look at the controls:

These are the basic controls for the software:
  • When you have a file in memory, it appears in the File Selector's pull-down menu. Select the file you want to act on from the File Selector.
  • Click on the Load File or Unload File icon to load a ladder logic file into or unload a ladder logic file.
  • Use the Mode Selector Buttons to change the "processor" mode of a program in memory. You can set the following modes:
  • Program mode, which halts execution of the program (you can't edit the program in memory)
  • Run mode, which runs the program as if it was in a processor
  • One-rung mode, which runs the program by scanning one rung at a time
  • Single-scan mode, which runs through one complete program scan, then stops execution
The software's other features (breakpoints , Channel 0 emulation ) are accessible from the pull-down menus.

What happens when RSLogix Emulate runs

RSLogix Emulate uses your computer's CPU to scan the rungs in your ladder program. The rungs in your program read inputs from and write outputs to the data table stored offline with your ladder logic project. The offline data table is also active during emulation.
RSLogix Emulate reads the ladder program and data table into your computer's memory before executing the ladder logic. The files on your disk are not affected by the emulator.
The basic order of events during emulation is no different from when a processor runs a project. The software scans your rungs, pauses to update the output and input image tables, and scans your rungs again. (During normal operation, the software repeats the program scan until you tell it to stop. There are other scanning modes you can use.)
Since there is no real I/O, the emulated ladder logic takes cues only from the state of the data table. To generate responses in your ladder program, you will need to change the value of the desired I/O bits, storage bits, or storage words acting as inputs to your ladder program.
Note Remember that the data table is always active, no matter which rungs are actually being scanned. It is not unusual to see inputs and outputs highlighting and values changing (like in an ADD instruction) on rungs that are not being scanned. If a dormant rung contains addresses that are being changed by an actively scanned rung elsewhere in the program , you will see the changing values on the dormant rungs.

What happens when you are "online" with the emulated program

When you are using RSLogix 5, RSLogix 500, WINtelligent LOGIC 5, PLC-500 A.I. Series, or PLC-5 A.I. Series online with RSLogix Emulate, the software owns the edit resource for the project. This means that you cannot edit the ladder logic that is in the software's memory. To change the project, you must edit the project offline and reload the project into RSLogix Emulate. You can change data table values while online.

What RSLogix Emulate does

RSLogix Emulate is a troubleshooting and debugging tool that can emulate most operations of Allen-Bradley PLC-5 and SLC 500 family processors. It executes your ladder logic programs in your computer, updating your programs' data tables, allowing you to approximate what is going to happen when you download your programs to physical PLC-5 processors.
Caution: While RSLogix Emulate is useful for verifying the integrity of your program, you should not rely solely on the software for final program checkout. Variations in processor function (and variations based on processor series and revision) dictate that final checkout must be performed with the actual processor and I/O for your system.
When a PLC or SLC runs a ladder logic program, the following occurs:
  1. The inputs from your physical I/O generate a response in your processor's data table.
  2. The processor executes your ladder logic, using the inputs from your I/O and other data table values to generate new values for your outputs (and other data table values).
  3. The output values in your data table are applied to your outputs in physical I/O.
This sequence of events is called one program scan. Depending on the processor and the program, 10 to 50 program scans occur each second.
When you use Rockwell Software products to program your processor, the ladder logic and data table are stored in your computer. RSLogix Emulate executes the stored ladder logic and updates the data table as if the processor was running.
There's something missing when RSLogix Emulate runs a processor's program: the I/O. Since your computer will not be connected to your I/O modules, the software uses debug files to simulate the inputs for your ladder logic program.
Debug files are sections of ladder logic that you program to simulate your process' inputs. The ladder logic in a debug file can be edited like any other program file.
RSLogix Emulate has some powerful troubleshooting features. You can:
  • scan your ladder logic continuously, one rung at a time, or one program scan at a time
  • restrict the program scan to a block of rungs that you specify
  • set breakpoints in your ladder logic to stop execution when a specified event occurs (e.g., when an important value goes out of range), freezing the conditions that caused the breakpoint to trigger
The software also allows you to emulate Channel 0 on your processor (for those projects that use New Platform PLC-5s or the SLC-5/03 and -5/04). This feature is handy for troubleshooting programs that interface with serial devices (e.g., bar code readers, scales, terminals, etc.).
As a debugging tool, you can feed trend data into the software to "replay" your data through your ladder logic.
Related Posts Plugin for WordPress, Blogger...