next up previous contents index
Next: Outlook Up: ProcessViewBrowser Previous: SoftPLC in C++ using   Contents   Index


pcontrol

In process control you may have a number of processes your automation is consisting of. Most of the processes will run in background. There must be a means to view the background processes and have control about them. Also the processes should be able to send event messages to a central instance. The events must be viewable online and offline for historical access.

pcontrol is an application on top of rllib and using pvbrowser to do these things.

Figure 10.1: pcontrol managing background processes
Image pcontrol1

The background processes are controlled from pvbrowser. The pvserver - pcontrol will fork them if requested and allow the user to watch the processes.

Figure 10.2: Events may be watched from pvbrowser
Image pcontrol2

Figure 10.3: This is how you output events
#include "rlevent.h"

int main()
{
  char *argv[] = {"","-eventhost=localhost","-eventport=6003"};
  int i = 0;

  rlEventInit(3,argv,"/TEST/");
  while(1)
  {
    rlEvent(rlInfo    ,"event %d",i++);
    rlEvent(rlWarning ,"event %d",i++);
    rlEvent(rlError   ,"event %d",i++);
    rlEvent(rlCritical,"event %d",i++);
    rlEvent(rlFatal   ,"event %d",i++);
    rlEvent(rlTest    ,"event %d",i++);
    rlsleep(1000);
    if(i > 100*6) break;
  }
  return 0;
}


next up previous contents index
Next: Outlook Up: ProcessViewBrowser Previous: SoftPLC in C++ using   Contents   Index
Rainer Lehrig 2004-02-17