473,395 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

re: HARD REAL TIME PYTHON


"Blubaugh, David A." <dblub....elcan.comwrote:

>I have done some additional research into the possibility of utilizing
Python for hard real time development. I have seen on various websites
where this has been discussed before on the internet. However, I was
wondering as to how successful anyone has truly been in developing a
program project either in windows or in Linux that was or extremely
close to real time constraints? For example is it possible to develop a
python program that can address an interrupt or execute an operation
within 70 Hz or less?? Are there any additional considerations that I
should investigate first regarding this matter??
I am running some i/o in a thing called an eBox running Slackware
Linux for which GPIO port we have made some I/O boards.
This is a very weak machine - 500Mhz 486 without fp, 128Mb ram.
Its just cheap, which is why we are using it.

I can send it 64 bytes, which it then puts out from userland
using ctypes to do the Linux calls, and it reads 64 bytes of
input in - the actual I/O can accomodate only eight bytes of
bits in and out, but we intend to add some analogue capability
later, so the rest hits the bit bucket, and the extra reads see
bus pullup values for now.
>From my PC over the lan, it does this between 74 and 75 times
a second, reliably.

If I run it between 2 PC's, faking the I/O by writing to a disk,
I sometimes get up to 250 such "pings" per second. Going full
duplex would pass a lot more info, but you lose the stimulus-
response nature, which is kind of nice to have in a control
environment.

Its not real time, but its not exactly yesterday's stuff either.

Both PC's have more than a gig of memory and two processors,
but that is not remarkable anymore.

We have also used python to do the HMI for an Injection
Moulding machine, talking to a custom controller with
an 8031 and an ARM on it via an RS-422 link running at
115200 - and the python keeps the link fully occupied

And this is python that is interpreting another virtual
machine assembler...

So don't be afraid - go for it!

- Hendrik

--
Real programmers disdain structured programming. Structured
programming is for compulsive neurotics who were prematurely
toilet-trained. They wear neckties and carefully line up
pencils on otherwise clear desks.
Oct 7 '08 #1
0 1071

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: | last post by:
I've trolled the lists, FAQs, and Net as a whole, but can't find anything definitive to answer this. We're looking for real-time graph capability (bar, line, etc), so that we can display...
9
by: Hans-Joachim Widmaier | last post by:
Hi all. Handling files is an extremely frequent task in programming, so most programming languages have an abstraction of the basic files offered by the underlying operating system. This is...
2
by: Alberto Santini | last post by:
I ported a Jos Stam's demo about Fluid mech to check the difference of speed between C implementation and Python. I think I achieved good results with Python and there is space to improve, without...
30
by: Raymond Hettinger | last post by:
Proposal -------- I am gathering data to evaluate a request for an alternate version of itertools.izip() with a None fill-in feature like that for the built-in map() function: >>> map(None,...
1
by: frikk | last post by:
Hey Everyone! I've got a question regarding the capabilities of python in a real time environment. I'll start by saying I'm a little bit flaky when it comes to terminology, so please correct me or...
7
by: John Nagle | last post by:
Is there something available that will parse the "netloc" field as returned by URLparse, including all the hard cases? The "netloc" field can potentially contain a port number and a numeric IP...
0
by: Johannes Nix | last post by:
Hi, this might be of interest for people who are look for practical information on doing real-time signal processing, possibly using multiple CPUs, and wonder whether it's possible to use...
2
by: Blubaugh, David A. | last post by:
To All, I have done some additional research into the possibility of utilizing Python for hard real time development. I have seen on various websites where this has been discussed before on...
3
by: Kurt Mueller | last post by:
David, Am 07.10.2008 um 01:25 schrieb Blubaugh, David A.: As others mentioned before, python is not the right tool for "HARD REAL TIME". But: Maybe you can isolate the part of your...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.