Kill (program) – Rockwell Automation 2098-UWCPRG Ultraware Software User Manual User Manual

Page 324

Advertising
background image

326

Rockwell Automation Publication 2098-UM001G-EN-P - February 2011

Chapter 6 Creating and Running Programs

When you execute this command, Ultraware software sends the
SYSTEMSIGNAL_STOP signal to the executing program selected in the
Workspace window. In order to stop program execution, your program must
include code that receives and implements this command.

Ultraware software sends the SYSTEMSIGNAL_STOP signal each time the
Stop (Program) command is issued. In order to stop program execution, the
program must be written to recognize when a stop has been requested. The
Ultra5000 Motion library contains a function, Stop_Requested, which is set to
zero until a stop is requested. To respond to the stop request, write your program
like this.

int main(void){

/* Initialization code

*/

while (!Stop_Requested()){

/* repeating program code */

}

/* Code to stop smoothly

*/

}

Kill (Program)

Use this command to tell an online drive to immediately stop executing the
selected executable program (.exe) file. Unlike the Stop command, this command
does not provide a controlled stop to program execution.

When the Kill command executes, animation for the selected program's icon
stops.

Advertising