10Starting and Stopping Programs
10.1Starting Programs
The user can initiate programs using multiple different methods. The following section describes how programs can be initiated from Assignments, from Programs, and from PowerTools Pro while online with the system.
10.1.1 From Assignments
In order to initiate a user program from an assignment, a Source must be assigned to the Destination listed below on the Assignments view in PowerTools Pro.
10.1.1.1 Program.#.Initiate
A rising edge on the Program.#.Initiate destination will cause the specified program to start. The program number that is to be started is determined by the instance field of the destination (represented by # above). Program.#.Initiate is edge sensitive, so the program will only start once until the next rising edge of the destination.
If a program is already running on the same task as the program being initiated, the Program.#.Initiate signal will be ignored.
10.1.2 From Programs
Following is a list of program instructions that can be used to start user programs.
10.1.2.1 Call Program
The Call Program.# instruction acts like a subroutine call by suspending the program that is active, and starting the program that is called. When the called program completes, program flow will return to the next line of the program that it was called from.
The program being called must be assigned to the same task as the program that is calling it.
10.1.2.2 Program.#.Initiate
The Program.#.Initiate instruction in a program allows the user to start another program that is assigned to a different task. If a program is already running on the task as the program being initiated, then the Program.#.Initiate instruction will be ignored.
If the program to be initiated is not assigned to a different task, then the instruction will have a Red Dot Error in the program editor.
10.1.3 From PowerTools Pro
Individual programs can be initiated from PowerTools Pro while online with the system. To initiate a program while
online, click on the Run Program icon on the Program Toolbar. Doing so will initiate the program number that is currently displayed.
10.2 Stopping Programs
10.2.1 From Assignments
There are numerous different methods that can be used to stop programs using Assignments in the
10.2.1.1 Stop
The Stop destination will, when activated, stop all motion and all programs that are active. Stop is level sensitive, so that while it is active, all motion and programs are prevented from starting. Stop will override any other functions that are active.
10.2.1.2 Program.#.Stop
The Program.#.Stop destination is used to stop a specific user program without stopping all of the programs. Program.#.Stop is edge sensitive, so the stopped program can be initiated again immediately after it has been stopped.
10.2.2 From Programs
Following are the instructions used to stop user programs from within a user program.
10.2.2.1 Stop
The Stop command is used to stop all motion and programs that are currently active. Stop is level sensitive, so it must be activated by being set equal to ON (Stop = ON). Since programs cannot be initiated while Stop is active, the user must create an assignment to deactivate the Stop function if it is activated from a user program.
10.2.2.2 Program.#.ProgramStop
The Program.#.ProgramStop command is used to stop a specific user program. If the intended program is not active, the instruction will be ignored.
Program.#.ProgramStop is edge sensitive, therefore the program that is stopped can immediately be initiated again.
10.2.3 From PowerTools Pro
Programs can be stopped while online with PowerTools Pro using the following methods.
10.2.3.1 Stop All - Main Toolbar
The Stop All icon on the PowerTools Pro toolbar can be used stop all motion and programs that are active. The Stop All can be toggled on and off from the toolbar. Click the icon once to toggle the Stop on. Motion and programs will be prevented from running until the icon is clicked
Starting and Stopping Programs | www.emersonct.com | 83 |