I have an idea. There seems to be more than a few of us who either haven't had the time or haven't had the resources to fully examine and determine ways to implement real time Linux, as in the Rtlinux flavor or the RTAI flavor, etc. What always seemed to work for me was the use of an example. Years ago, Ciarcia's Circuit Cellar (those of you who remember Byte Magazine) was a great source for learning by "hands on" with both the hardware and the software. I think a small but serious project with description and documentation would go a long ways towards lifting the veil of mystery that surrounds RTLinux to the novice. Perhaps one exists in the literature, I have not yet found it in my web surfing. If anyone knows of such a posting please advise the community (and me) and I'll shut up. I do have a simple application that I penned in Microsoft Quick-C 2.0 several years ago, it's neither difficult nor large, but implementing it in RTLinux would be a neat educational exercize, then documenting the project as an example would give the RTLinux novice (like me) a place to start. _____________________________________________________________________ Picture this:::: 1.You have two pairs of wires coming into your plant from the electric utility's substation. 2. One pair is connnected to a relay contact that closes for 500 milliseconds every 15 minutes. (This tells you the power company's demand interval end and start of new interval.) 3. The other pair of wires is connected to a relay that closes every 0.6 kilowatt hours consumed and opens for the next 0.6 kilowatt hours consumed. (Every time the relay changes state you've burned another 0.6 kilowatt hours of electricity.) 4. Your plant can use power at a rate of up to 3000 Kw (or kilowatt hours per hour, we'll assume for this exercise unity power factor). 5. You want to trip an alarm at 1800 kw to shut some machinery off (just make a contact closure for now). 6. The parallel port on the PC is a great digital interface, it's well documented in the literature (see recent issue of EDN) , use it for the relay monitoring. 7. You need to do some graphics display (and updating) during the consumption pulse interval to show KW-HR consumption, KW rate, and alarm status. ________________________________________________________________________- My first incarnation of this program was just a simple loop. Watch the inputs, update the graphics when something happened. Because I wrote this on a '286 machine, the task of Item 7 took longer than the time between incoming pulses at 3000 kw, so I frequently would miss consumption pulses. To solve the problem I had to hook the clock interrupt in the pc bios (the one that fires every 55 msec) and add several lines of code (in asembler & C) to monitor the relay lines and update counters to keep track. Then the graphics routines could just plod along in an endless loop and calculate & display their updates. How would one implement this functionality in RTLinux? If anyone wants to collaborate on a "hands-on" example (fully documented, detailed enought to answer almost any question) I'll be happy to join in..... Regards, Ray Minich -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
