[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: Occupancy detection



"Dave Houston" <nobody@xxxxxxxxxxxx> wrote in message
news:46ba7271.2387921265@xxxxxxxxxxxxxxxx
> "Robert Green" <ROBERT_GREEN1963@xxxxxxxxx> wrote:
>
> >The Maxbotic site
> >
> >http://www.maxbotix.com/MaxSonar-EZ1__FAQ.html
> >
> >described some of the platforms people are using for their sensors
(BasicX,
> >BX24p, Basic Micro, Atom, Wright Hobbies DevBoard-M32, AVR using Bascom,
> >Parallax, Basic Stamp BS2).  Not one was an ADI platform.  Learning how
to
> >program a newer, more powerful microprocessor would probably have payoffs
in
> >other areas of automation that will need microprocessor control.  Ladder
> >logic and leisure suits both had their day, but that day is gone, at
least
> >for me.
>
> Ahh! I didn't realize that your new residence was going to be a cave. ;)
It
> will help with energy costs.

A cave?  I'm afraid I don't get it.  I'm not sure how my reluctance to use
old technology more suitable to stand-alone industrial process control than
home automation makes me a trogdolyte. Learning to work with a current
microcontroller would give me options like robotics that the Ocelot will
never be able to handle.

> Ladder logic is used throughout industry worldwide. Its use probably
> outnumbers higher level languages by several orders of magnitude. Its day
is
> far from done.

The primary problem is that I am not an industry.  I should have been more
specific.  Ladder logic appears to be done as far as home automation
programming is concerned, *especially* mine <g>.  If I ever begin
manufacturing operations in my house, I may come to regret eschewing ADI,
CMAX and ladder logic programming.  But I doubt it.  The simple truth is
that the payback for learning to program in ladder logic on the Ocelot just
isn't worth it for me.

> Comparing microcontrollers like those you've listed to ADI's system is
> comparing apples and orange groves. ADI uses an RS485 network with a
> protocol (published) of their own design. Expecting robotics hobbyists to
> use an Ocelot is rather ridiculous - it wasn't intended for that.

Good golly, Miss Molly, where did I EVER say robot hobbyists would, should
or could use an Ocelot?   Of course that's ridiculous.  The Ocelot is old
technology and totally unsuitable for that sort of application.  However, a
modern micro-controller can solve both my stair light problem and provide
substantial future benefits like robotic control. The "ridiculous" thing
would seem to be deciding to learn how to program microcontrollers, and then
choosing one as old and limited as Ocelot's.  Learning any one of the
numerous newer hobbyist microcontrollers that use a structured language has
far more value to me than struggling with very long-in-the-tooth CMAX and
ladder logic.

The stairway lights are critical, therefore I have no real desire to revisit
CMAX.  The lack of CASE structures, local vars and the unusual evaluation of
conditionals makes for very nasty spaghetti code that reminds me of the
famous statue with all the snakes:

http://www.google.com/search?q=laocoon

I tracked the ADI forum for about a year and CMAX seems to consistently
provide unexpected results for neophyte CMAX coders like me.  It's great for
people who learned on ladder logic or who love programming PICs or in
assembler.  It's not so great for people like me who can program, but don't
have a feel for CMAX's structural oddities.  It's totally unsuitable for
rank newbies with little coding experience.

Let me make it perfectly clear I have nothing but respect and appreciation
for all the CMAX users out there. The last time I took a run at CMAX the ADI
forum people and folks here were *extremely* helpful, providing code,
samples, hints, serious debugging help and more.  But if the concepts don't
click, all the help in the world isn't going matter.  If my ability to earn
a living depended on it, I would slog through learning CMAX the way I
slogged through coding Newton's approximation method for solving quadratic
equations in PL-1, Fortran, COBOL (yes - it was a comparative language
course!) and PASCAL in college.  But those days are long, long gone and this
is just a hobby.  I'd rather investigate the newer microcontroller offerings
that use something other than ladder logic.  I'll probably end up putting
the CPU-XA in service as a broadcast storm detector because that's a pretty
trivial problem and if it fails, no one fails down the stairs in the dark.

Here's an excerpt from a ladder logic tutorial:

http://xtronics.com/toshiba/Ladder_logic.htm

(NOT CMAX, but of the same basic design) that might help to explain my lack
of enthusiasm for LL:

<<Normally in a programming language things happen in order. The command or
line of code on top is executed before the command on the bottom until you
hit the end of a loop. This is not so in ladder logic. Everything happens at
the same time. . . . "The things you will probably use the most writing
Ladder Logic are the relay conditionals --| |-- ---|/|--- and the output
coils ---( )---. These three things basically make up a kind of IF THEN
statement. This --| |-- means closed if energized while --|/|-- means closed
if not energized. The output coil --( )-- basically means then energize
this.">>

"Kind of IF THEN" sums up my feelings for ladder logic.  It's "Kind of" of
programming language. Kind of.  Energize THIS, ladder logic!  --|#%$$!!!!|--
and then stuff it in your output coil.

< g >  (And apologies to those that love ladder logic, it's just not my
cuppa tea.)

Now let's return to analyzing just what sensors and other components are
required to build an ultra-fast and ultra-reliable stair light control
system that will still respond to X-10 commands if safety conditions permit.

--
Bobby G.





comp.home.automation Main Index | comp.home.automation Thread Index | comp.home.automation Home | Archives Home