Claims
- 1. A method in a computer-based development system for emulating a programmable logic controller for debugging a first ladder logic program wherein a second ladder logic program modeled after a particular machine function is provided as a debug program, the method comprising the steps of:
- (a) executing the first ladder logic program and the debug program in the computer-based development system;
- (b) scanning one or more rungs in the debug system to generate inputs for driving the first ladder logic program wherein the inputs emulate signals from I/O devices, and storing the inputs as values in an input image data table file for the first ladder logic program;
- (c) scanning one or more rungs of the first ladder logic program to generate outputs for driving the debug program wherein the outputs emulate signals to I/O devices and storing said outputs as values in an output image data table file for the first ladder logic program;
- (d) comparing, in the debug program, the outputs to a selected response by examining the values in the output image data table file for the first ladder logic program; and
- (e) scanning one or more rungs in the debug program to generate additional inputs for driving the first ladder logic program according to the results of the comparing step (d) wherein the additional inputs emulate signals from I/O devices and storing the additional inputs as values in the input image data table file for the first ladder logic program.
- 2. A method as recited in claim 1 wherein the first ladder logic program is transferred to a programmable logic controller for execution and wherein the debug program and its associated data table files remain in the computer-based development system, thereby being as large and as sophisticated as necessary to model a particular machine function.
- 3. A method as recited in claim 1 wherein an user can develop a plurality of debug programs that can be used independently and dependently for separate parts of the first ladder logic program.
- 4. A method as recited in claim 1 further comprising the steps of:
- dividing the first ladder logic program into a plurality of small segments;
- developing a list of inputs for driving a particular segment of the first ladder logic program;
- developing a schedule of when each of the inputs are to be on or off; and
- selectively executing selected rungs of the first ladder logic program.
- 5. A method as recited in claim 4 further comprising the step of invoking a single scan when the first ladder logic program is executed once and stops.
- 6. A method as recited in claim 4 further comprising the steps of:
- constructing a ladder logic rung in the first ladder logic program that performs a conditional test and has a breakpoint instruction as its output;
- executing the breakpoint instruction in response to the conditional test making the rung true; and
- trapping a condition suspected of causing a problem.
- 7. A method as recited in claim 6 further comprising the steps of:
- adding a plurality of breakpoint instructions to the first ladder logic program; and
- testing a plurality of different conditions for a true condition and executing a breakpoint in response thereto.
Parent Case Info
This is a continuation of application Ser. No. 07/373,920, filed Jun. 30, 1989, which was abandoned upon the filing hereof.
US Referenced Citations (38)
Continuations (1)
|
Number |
Date |
Country |
Parent |
373920 |
Jun 1989 |
|