Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > General Hardware Discussion > Fusion Brain > FB Documentation and Tutorials


Reply
 
Share Thread Tools Display Modes
Old 09-10-2008, 08:41 PM   #1
Newbie
 
Join Date: Aug 2008
Location: Woodstock, Ontario, Canada
Posts: 7
Dagwood is an unknown quantity at this point
Suggested reading to better understand graphical interface

I’ve been planning to use the FB for home automation. I have figured out the logic end of things I want to do & how they relate to inputs and outputs, but now it is time to put it all in action. I am having a hard time understanding some of the terms. If I could get better knowledge of what the terms mean & their relations I might be able to get to the next step easier. Any books you could suggest that will give me a ground up on what is being done here with the fusion Brain. I’ve ordered another brain to make 2 to my collection & the input output ideas are growing, but I’m stuck on the graphical interface organizing the logic due to my lack of experience with Digital logic that is probably second nature to yourselves. I just need a good book to cover the elementary objects to get a good grasp on things
Thanx in advance. Keep up all the good work
Dagwood is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 09-10-2008, 09:30 PM   #2
FLAC
 
Join Date: Oct 2006
Location: Las Vegas
Posts: 1,283
h3rk will become famous soon enough
Radio shack had a really good book for an introduction to digital logic, I have it somewhere....
I think this isn't it, but I think it's the predecessor to the one I have.
http://cgi.ebay.com/ENGINEER-MINI-NO...08112012r21521

Forrest Mims did a lot of books on electronics for radio shack, back when it wasn't a cell-phone kiosk.

I'll look up the one I have tomorrow.

I'm assuming that you're talking about the MDX software, and you're looking to build loops with the configurator?

The first thing you should know is that each function you are building is a statement, that get's read in by the MDX software. With one exception, all of the statements are IF statements. They all follow the standard format IF(expression) THEN DO (something) ELSE{anti-THEN} DO (something else)

You don't see that part when you're building the functions, the whitespace that you see is where you start writing your expression.

Expressions can be simple, or they can be very complicated. The main goal of an expression is to produce a boolean result that is either true or false. If the result is true, then the statements that are in your "then" list get executed. That last sentence is the english equivalent of what the function does. If you need more help with that, any introductory programming book will do the job. {CODE, by Microsoft Press is a fun little book to read}.

The THEN statements are not as flexible as the IF statement. There is a window that pops up with list-boxes allowing you to set a variable to a value or increment a variable up and down or, turn on or off outputs, and some other things. But you don't get too much custom control over that statement.

The IF statements are where you can and should do almost anything. It's not exactly like a boolean logic diagram, but it reads very similar.

I could go on about IF statements if you like, but it's mostly programming. So I'd pick up a book on the particular code you want to learn VB, BASIC, C, C++, C#, etc. and start there. It will probably be more useful to you than any digital logic book, in the long run. However digital logic is a good brick in that foundation. As long as the programming book is truely introductory, it will introduce you in to thinking in code. And because MDX skinning isn't truely coding, you'll be able to do many things rather quickly. I'm no code-slinger, but I feel I'm learning to express my thoughts in MDX more and more freely by the day.

I'm guessing you have some ideas of what you want your brain to do like:

I want my shower to turn on and automatically adjust to the pre-set temperature when my alarm clock goes off, but only if I'm in my bed and only on weekdays, and I want the temperature in the shower to vary depending on what temperature the air in the house is, and I want the A/C to turn off for a few minutes at the end so I don't shiver when I get out.

(Sure, it would be nice if calender items like date and time were available to use for this, but they're not yet, so we'll use a digital input and find a wire in the alarm clock that goes to ground when the alarm clock is alarming).

Turning something like that ridiculous thought into logic is something along the lines of what I think you want to be able to do easily.

So I've planned out the inputs and sensors I want to use, and I have a cool electronically controlled shower valve I have to put in, but that's the easy part.

Aside from the calendar stuff, it's all something you can do with the functions in MDX. And functions are a form of code, I'd get a programming book.

"Thinking in C" was a pretty good course. I'm not sure if you can find that anymore though. There's tons of books out there though. You won't have to learn to be an expert programmer to do what you want here, not by a long shot.

I'm sure there's some more people than just me that would jump in and try to help you through some examples you provide, so that you can get the hang of it.

There's more, but I'll hold off.
h3rk is offline   Reply With Quote
Old 09-10-2008, 09:44 PM   #3
Newbie
 
Join Date: Aug 2008
Location: Woodstock, Ontario, Canada
Posts: 7
Dagwood is an unknown quantity at this point
Exactly, Yes. I’ll take up the fight to Chapters (indigo) and see what is available. The graphical interface of MDX is why I started here & the fact that a lot of car enthusiasts aren’t computer code writes either. Since I work on passenger elevators a lifetime, the relay logic is their, but the code isn’t. Elevators have moved to MPC’s & is now the “black Box “for most mechanics, this will give me an inside look, as far as career improvement goes.
Thanx again.
Dagwood is offline   Reply With Quote
Old 09-10-2008, 11:33 PM   #4
FLAC
 
Join Date: Oct 2006
Location: Las Vegas
Posts: 1,283
h3rk will become famous soon enough
Well, if your proficient at relay logic, then building functions to support what you want will not be a far step for you. Ladder Logic was intended to make it easier for old school electricians, trained in old-style controllers, to be more comfortable in the new world of microprocessors. Ladder logic isn't available for MDX, but it is esentially the same behind the scenes. 'Or' is a parallel, 'And' is series. Some of the analog stuff doesn't apply that way... but it's just math.

And knowing that little bit more about you, I now think you'd really enjoy CODE by Charles Petzold, Microsoft Press

Last edited by h3rk; 09-10-2008 at 11:36 PM.
h3rk is offline   Reply With Quote
Old 09-11-2008, 12:57 AM   #5
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 8,862
2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future
Well an AND and OR logic gate inside your CPU does essentially just that.... Except with a few transistors nanometres wide and 3 billion times a second without the clicking.

But really they are NAND usually to make everything but that is a different story.

It is easy once you understand it.

AND: Both have to be true for the output to be true. I would buy a panda if it was legal and I had a bamboo forest in my backyard. If pandas are illegal to own I would not buy one regardless of whether or not I had a bamboo forest in my yard. Also I would not buy a panda if I did not have a bamboo forest in my back yard even if pandas were 100% legal to buy. Obviously if both statements are false, I would not buy a panda either.

Input AInput BResult
Pandas are not legal to buyI do not have a bamboo forestI will not buy a panda
Pandas are not legal to buyI do have a bamboo forestI will not buy a panda
Pandas are legal to buyI do not have a bamboo forestI will not buy a panda
Pandas are legal to buyI do have a bamboo forestI will buy a panda



OR: One condition has to be true for the output to be true. I will get angry if someone steals my lawn gnome or if my TV breaks. If someone steals my lawn gnome, I will be angry. If my TV breaks, I will be angry. If someone steals my lawn gnome and my TV breaks, I will be angry. If neither happens, I will not get angry.

Input AInput BResult
Nobody steals my lawn gnomeMy TV does not breakI am not angry
Nobody steals my lawn gnomeMy TV does breakI am angry
Somebody steals my lawn gnomeMy TV does not breakI am angry
Somebody steals my lawn gnomeMy TV does breakI am angry



NOT: Input is opposite of the output. Just like in english, I will go to the store means you are going. I will not go to the store means you dont.

Input AResult
TrueFalse
FalseTrue



NAND: If both statements are true, output is false. Otherwise true. The house will be comfy if I get a cat nand a dog. If I have a cat, the house will be quiet. If I get a dog, the house will be quiet. If I get neither it will be quiet. If I get both, it will be chaos.


Input AInput BResult
I do not get a catI do not get a dogThe house is quiet
I do not get a catI get an old sleepy dogThe house is quiet
I do get a catI do not get a dogThe house is quiet
I do get a catI do get a dogThe house is not quiet



NOR: If both inputs are false, then output is true. Otherwise output is false. I will make mash potatoes if I have neither made macaroni nor have I made lasagna. So if I have made macaroni, or have made lasagna, or have made both, I will not make mashed potatoes. If I have made neither, then I will make potatoes.

Input AInput BResult
I have not made lasagnaI have not made macaroniI will make mashed potatoes
I have not made lasagnaI have made macaroniI will not make mashed potatoes
I have made lasagnaI have not made macaroniI will not make mashed potatoes
I have made lasagnaI have made macaroniI will not make mashed potatoes



XOR: If the inputs are the same, then the output is false. Believe it or not, there is no English phrase that you can represent this with. "Or" in english means inclusive or (up above) meaning one, the other, or both. Exclusive or means one or the other. Not both, and not either.

Input AInput BResult
falsefalsefalse
falsetruetrue
truefalsetrue
truetruefalse


Now the numerical operands, I think you know, they are just math.

Ask if you have any questions.

-- Nick

Last edited by 2k1Toaster; 09-24-2008 at 10:10 AM.
2k1Toaster is offline   Reply With Quote
Old 09-24-2008, 07:06 AM   #6
Newbie
 
Join Date: Aug 2008
Location: Woodstock, Ontario, Canada
Posts: 7
Dagwood is an unknown quantity at this point
I like your quote "Logic was intended to make it easier for old school electricians", and it applies here. Thanx for the explaination, it has helped. I have 3 books on order & will let all know how usefull thay are. Used from Chapters $6-$13 each & lots of them in stock should anyone else need to educate themselves. I expect them to arrive soon & I will follow up with the ISDN #'s & thier respective usefullness.
Dagwood is offline   Reply With Quote
Old 09-24-2008, 10:12 AM   #7
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 8,862
2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future
Quote: Originally Posted by Dagwood View Post
I like your quote "Logic was intended to make it easier for old school electricians", and it applies here. Thanx for the explaination, it has helped. I have 3 books on order & will let all know how usefull thay are. Used from Chapters $6-$13 each & lots of them in stock should anyone else need to educate themselves. I expect them to arrive soon & I will follow up with the ISDN #'s & thier respective usefullness.

Cool beans.

I did have a typo on the NOR, I just fixed. The table was correct, but it should (and now does) read "Otherwise outputs are true."

If you found this useful, then I will think of making this a sticky for others.
2k1Toaster is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New FM USB module, maybe good for our carputers? skywise Road Runner 57 11-04-2007 08:12 PM
Whats the easiest to use interface? need help ultraz Software & Software Development 1 09-14-2006 09:47 AM
Help with A/C Control Interface TheDeepFryedBoo General MP3Car Discussion 2 04-10-2006 02:18 PM
Help prequired for reading serial port data !! tolisn Road Runner 28 07-06-2005 05:04 PM
Whats up with Geiss? Was working before but not now? PDiddy Centrafuse 7 07-01-2005 04:29 PM



All times are GMT -5. The time now is 04:39 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics