Configure Windows Events To Launch Tasks; Within The Softlogix Controller; Configure A Windows-Event Task In The Controller - Allen-Bradley SoftLogix 5800 User Manual

Table of Contents

Advertisement

_tprintf(_T("Mode change occured: "));
fflush(stdout);
break;
}
// A mode change occured.
// This is done by performing a WaitForMultipleObjects on the mode event handles.
// These events are manual reset events that are controlled by the SoftLogix
// controller.
// Only one of these events can be set at any given time.
// Log a message to the screen indicating the new controller mode, and then go back
// to waiting for the mode change event above.
status = WaitForMultipleObjects(numevents, EventArray, FALSE, INFINITE);
switch (status)
{
case WAIT_OBJECT_0:
case WAIT_OBJECT_0+1:
case WAIT_OBJECT_0+2:
case WAIT_OBJECT_0+3:
}
}
return 0;
}
Configure Windows Events to
Launch Tasks within the
SoftLogix Controller
Now we have to check to determine the new controller mode.
_tprintf(_T("now in program mode\n"));
fflush(stdout);
break;
_tprintf(_T("now in run mode\n"));
fflush(stdout);
break;
_tprintf(_T("now in test mode\n"));
fflush(stdout);
break;
_tprintf(_T("now in fault mode\n"));
fflush(stdout);
break;
Windows event tasks are functionality associated with Microsoft's
Windows 2000 and Windows XP operating systems. Applications outside of the
Logix Designer application (Visual Basic, RSView, Custom C applications,
external routines, and so forth) can cause a task within the SoftLogix5800
controller to execute.

Configure a Windows-event Task in the Controller

In the SoftLogix project, we will create a task and configure the trigger as a
Windows event on the controller. Follow these steps.
1. Launch the Logix Designer application.
2. Open the controller1 project we created previously.
3. In the Controller Organizer, right-click Tasks folder and choose
New Task.
Rockwell Automation Publication 1789-UM002K-EN-P - January 2015
Program Windows Events to Monitor and Change Controller Execution
Chapter 8
153

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents