Board index » delphi » Re: Real-Time control & Delphi

Re: Real-Time control & Delphi


2004-10-16 08:15:23 PM
delphi185
Quote
My desire is to be able to use Delphi which appears to be rather awkward
with the RT systems I have looked at.
I can assure you there were implemented really real-time programs in Delphi,
as, for example, medical - to test physical condition/health of possible cosmonauts and jet-pilots.
(I do not provide the link, 'coz it is all over in Russian)
Quote
And my Windows expertise is uhmmm....
then look at
1) mmsystem.dll functions
2) priority routines (with which you can grab complete control over computer).
 
 

Re: Real-Time control & Delphi

Andrew Rybenkov writes:
Quote
I can assure you there were implemented really real-time programs in
Delphi, as, for example, medical - to test physical condition/health
of possible cosmonauts and jet-pilots.
That's a strict definition to what is a "real time OS":
en.wikipedia.org/wiki/RTOS
Windows is not a RTOS, since it does not guarantee a minimum response
time. A RTOS does not mean "fast", either. The minimum response time
can be high.
And does not mean you can not create mission-critical tasks on windows,
as you developed yourself.
--
Leonel
www.techtips.com.br
"Any fool can write code that a computer can understand. Good
programmers write code that humans can understand." - Martin Fowler
 

Re: Real-Time control & Delphi

Yes, you can use WIN32 fibers, giving you control over scheduler. But you do
not get control over response time for interrupt service routines (and all
the things that happen in kernel mode). For hard RT issues this also is
important.
Franz
"Andrew Rybenkov" <XXXX@XXXXX.COM>schrieb im Newsbeitrag
Quote
2) priority routines (with which you can grab complete control over
computer).
 

Re: Real-Time control & Delphi

Quote
Yes, you can use WIN32 fibers, giving you control over scheduler. But you do
not get control over response time for interrupt service routines (and all
the things that happen in kernel mode). For hard RT issues this also is
important.
for such one should write corresponding driver. Delphi, very unfortunatly, is not helpful
in this area.
 

Re: Real-Time control & Delphi

Israel Raj T writes:
Quote
"Wayne Sherman" <body1233 at yahoo dot com>writes:

>Using Kylix with real time Linux might be worth considering:
>
>www.linuxdevices.com/articles/AT8073314981.html
>www.linuxdevices.com/news/NS3557180455.html

Kylix ?
Has the zombie been seen walking ?
Kylix does indeed get used. I am currently involved in a project where
deployment is to a Linux box with such a real-time kernel (not sure which
one, I am not involved with that part).
--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
RADBooks: www.logicfundamentals.com/RADBooks.html
Working for yourself is great because you get to work half days, and
you can choose any twelve hours you want.
 

Re: Real-Time control & Delphi

Andrew Rybenkov writes:
Quote
>Please keep in mind that because Windows is NOT a real time operation
>system, you cannot guarantee that your processing program will work in
>real time.


be it so we would not be able listen music or watch movies on our Windows PCs.
We are because the OS is not too loaded. But there is NO warranty from
the OS that the next frame of your video will be processed in time for
it to be displayed when it should be.
Don't mix the apparent real-time operation of Windows and the
requirements industry are asking for. Windows cannot guarantee that a
given operation performs in at most x milliseconds. 99% of the time, it
does, but you have no warranty. and those 1% may be critical when
controlling external systems
 

Re: Real-Time control & Delphi

"John Herbster" <herb-sci1_AT_sbcglobal.net>writes
Quote

I am not sure what you mean, Jim, but as a member of
RT OS community, I take exception to the implication
that one cannot use "Windows" products for dynamic
interaction with the real world, if you are careful. Even
with RT OS products, one has to be careful.

Regards, JohnH
I didn't mean to imply that one could not use Windows for mission critical
tasks if one knows
what one is doing and the task suits. Of course you can. In fact, that's
exactly what I want to do!
But Windows on its own is not classified as an rtos from everything I've
read. You have to use it properly
and know what you are doing or better still, have RT extensions added to it.
I don't know what I am doing
(in this context) but I am trying to find out. All I know is that using
vanilla Windows in the way I am used to,
I'll get unpredictable response times which will occasionally be
catastophically unacceptable.
It's an interesting field that is for sure and I am rather surprised it is not
more popular. The industrial control field is massive but it appears that
using Windows for it is way beyond the means of many (most?) of the people
involved
in it. Heck, VB(Visual Basic) is the language of choice among my cohorts. Threads are what
you wear to work. Priorities are instructions to the shipping department.
And several thousand dollars for an RTOS that doesn't like Delphi and still
needs hardware to run on is hard to justify against an $800.00 plc that's
already as real-time as it gets (not to mention fast).
Anyway, I am still interested and I am reading just as fast as I can. :->
Jim Rowell
 

Re: Real-Time control & Delphi

"Andrew Rybenkov" <XXXX@XXXXX.COM>writes
Quote
>My desire is to be able to use Delphi which appears to be rather awkward
>with the RT systems I have looked at.

I can assure you there were implemented really real-time programs in
Delphi,
as, for example, medical - to test physical condition/health of possible
cosmonauts and jet-pilots.

(I do not provide the link, 'coz it is all over in Russian)

>And my Windows expertise is uhmmm....

then look at
1) mmsystem.dll functions
2) priority routines (with which you can grab complete control over
computer).


--
Andrew Rybenkov.

Thanks Andrew. I am looking into them.
I'm concerned that there are many pitfalls and gotchas in simply setting
priority to real-time, etc. I get the impression that it is not easy or safe
hence the vast number of very expensive rtos systems and extensions
available for sale. Fun stuff though. Google, google, google......
 

Re: Real-Time control & Delphi

Quote
I get the impression that it is not easy or safe
hence the vast number of very expensive rtos systems and extensions
available for sale.
maybe they are very expensive because they should. ;)
"_real_ rtos cannot cost $100 a priori" ;))
something like Sony monitors that are overpriced just because they are Sony.
 

Re: Real-Time control & Delphi

Quote
We are because the OS is not too loaded. But there is NO warranty from
the OS that the next frame of your video will be processed in time for
it to be displayed when it should be.
you mean on _real_ RTOS you can without problem run your critical task and
play Unreal Tourment in the same time?
 

Re: Real-Time control & Delphi

"Jim Rowell" <XXXX@XXXXX.COM>writes
Quote

Anyway, I am still interested and I am reading just as fast as I can. :->

Curious. Did you check out LynxOS stuff? Or would you rather stay on a
Windows solution if you can?
-d
 

Re: Real-Time control & Delphi

Andrew Rybenkov writes:
Quote
>We are because the OS is not too loaded. But there is NO warranty from
>the OS that the next frame of your video will be processed in time for
>it to be displayed when it should be.


you mean on _real_ RTOS you can without problem run your critical task and
play Unreal Tourment in the same time?
Apparently yes. I never tried that because the _real_ multithreaded RTOS
that I used were not windows nor linux based, but I am quite sure you
would find reports in google about such things. If I recall well, the
multitasking is not "preemptive", but "collaborative" which is a bit
more difficult to program but way more predictible.
 

Re: Real-Time control & Delphi

On Sun, 17 Oct 2004 04:11:22 +0400, "Andrew Rybenkov"
<XXXX@XXXXX.COM>writes:
Quote
you mean on _real_ RTOS you can without problem run your critical task and
play Unreal Tourment in the same time?
On some hefty hardware. A proper RTOS will guarantee that things
(interrupts handled etc) will happen within set time limits, but that
means that overall, performance will be lower than for other OS'
without that guarantee.
At least thats my understanding on the topic.
- Asbjørn
 

Re: Real-Time control & Delphi

If I recall well, the
Quote
multitasking is not "preemptive", but "collaborative" which is a bit
more difficult to program but way more predictible.
Windows (starting with Win95) exhibits preemptive multi-tasking, that is btw why
your mouse is responsive always, except cases when some long task gets highest priority.
(and that was a major feature Bill Gates proudly announced about new OS, -
"you will never see frozen mouse again"), that is why you can terminate any process
via Task Manager.
Until then Windows was co-operative, so you had explicitly call ProcessMessages to let
other tasks to do something.
 

Re: Real-Time control & Delphi

Quote
On some hefty hardware. A proper RTOS will guarantee
that things (interrupts handled etc) will happen
within set time limits, but that means that overall,
performance will be lower than for other OS' without
that guarantee.
Even a proper RTOS will *not* guarantee that things
(interrupts handled etc) will happen within set time
limits. Rather, it is the programmer, through his
careful application planning that will guarantee such.
A "proper" RTOS tool can include planning, analysis,
simulation, compiler and linker measurement (like
checks for max recursion depth and required stack
size), and performance measurement tools that help
the programmer do this with confidence.
Some other features that I like to see in a "proper"
RTOS are (1) simplicity and intuitiveness so that the
programmers can learn it quickly have confidence in
their knowledge of it, (2) an interrupt priority
management scheme that does not put the lowest
priority H/W interrupt ahead of the highest priority
S/W task, (3) queuing schemes associated with the
task monitor (like the Ada rendezvous) for allowing
one task to provide another tasks with its next job,
and (4) the availability of a good OOP programming
language for use with it.
--JohnH