PL/i Simulator

This tool provides a means to visually observe simulated program execution for any of the i.CanDoIt products with the PL/i control programming language embedded. You can step through the program or set breakpoints and run to breakpoint.

A summary of the language may be found here. Additional tutorials may be found here at www.csimn.com.

The icansim.exe window looks like example below which shows a very simple test program. The red circles in the source window indicate an executable line on which you may set a break point. (Lines such as variable declarations do not generate executable code.) The green arrow indicates the line that will be executed next. The windows at the bottom show variables and Modbus registers. Double click on any value (variable or register) to change it while paused or while running (although the program may overwrite you if running). Variables shown as "Out of scope" mean the value is invalid until program executing enters the procedure in which they are declared.

Set a break point by double clicking the source line with a red circle in front. The circle will become a solid red dot indicating there is a break point at that line. Double click again to remove the break point.

Open file: You select a source file name with .pli suffix. This file is expected to already be compiled. If you provide a name of myprogram.pli, this also opens myprogram.plx and myprogram.dbg. All 3 files must be present in the same directory before you can proceed with simulation.
Reset: Used to restart the program from any point.
Step: Used to single step the program. One executable line will be executed and then the simulator will stop and wait for you.
Run: Runs the program until a breakpoint is reached, or until the end of the program is reached, or forever if there is an endless loop.
Pause: Allows you to temporarily stop a running program.
Stop: Stops a running program. You must reset the program to restart.
Refresh: Updates the display of registers and variables while a program is running in the background (started with the Run button).
Compile: File dialog lets you pick a .pli program. This source file will be compiled into .plx and .dbg files. Either a success message or error information will be displayed. Use your favorite text editor to edit the .pli source file. Note that this does not load the compiled file into the simulator. Use the open file icon to do this.

Help continued... (click here)