Multitasking in DAPL

Multi-tasking configurations

The flexibility that the DAPL system needs to provide instant attention to hardware devices can also be applied to data processing. In fact, all DAPL processing tasks run independently and in parallel. Ordinarily you won't think about it, but sometimes, the multitasking can be used to advantage.

Simplify Multiple-Rate Processing

Processes operating on different time schedules with different data selection criteria can result in convoluted processing logic.

Consider an application in which

DAPL multitasking features can help by allowing the processes to run in parallel. To continue the example,

Task configuration for example application

And now the host application is much simpler. It receives the streaming data and routes it to the disk. It occasionally polls the fault detection channel to see whether anything unusual happened.

Leveraging software with replicated tasks

Suppose you have designed and tested a control algorithm that satisfies all requirements. Now you are faced with the problem that you must apply it to four channels instead of one. That means your software must be modified. You need to wrap a processing loop around the algorithm to cycle through the multiple channels.

pdefine  process4
  vctrl(ipipe0,LEV_V0,p_alarm0)
  vctrl(ipipe1,LEV_V1,p_alarm1)
  vctrl(ipipe2,LEV_V2,p_alarm2)
  vctrl(ipipe3,LEV_V3,p_alarm3)
end
    

Well, wait a second, maybe not! In the DAPL system you can define your processing once and use it multiple times. Each task runs independently. So, you can configure four copies of your existing processing command, routing the appropriate input and output signals to each task. With careful analysis of what things are consistent (for packaging in a command) and what things are adjustable (for configurable command parameters), you can make your DAPL configurations as flexible as the processes you measure and control.