application real-time priority in WCE

Hello all, We are developing a data acquisition application. It runs in WCE5 and WCE6. Along with other operations that it does, it has a thread which executes a PLC program. In our case this PLC program execution is to be done with highest priority, a priority even higher than network access. We have read in MS help about the different priority levels supported by WCE.

Please see the link below: ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.WindowsCE.v60.en/ CE_OS_IntExplorer/html/79919df2-7d02-4796-8739-4e960de323c4.htm

This link mentions about some "Privileged applications" and "Trusted Environment Creation". In order for our application to have a priority higher than all drivers, we used CeSetThreadPriority and had set the priority to 96. Using Process viewer, the priority was indicated as 96.

Is it enough we use CeSetThreadPriority? Or should we need to create the trusted Environment and Privileged application?

thx P

Reply to
praju
Loading thread data ...

If you were able to get the thread priority to 96 then you don't need a trusted application. Nontrusted apps are limited to priorities in the range 248-255. Your particular system isn't restricting you.

A better question is whether it is safe to run your PLC program at such high priority. If you are using any kind of polled I/O device the program may never yield to let anything else run - and at level

96, you will be above the standard network and serial drivers so you may interfere with their operation.

George

Reply to
George Neuner

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.