Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > General Hardware Discussion > Fusion Brain


Reply
 
Share Thread Tools Display Modes
Old 12-01-2008, 02:39 PM   #1
Low Bitrate
 
Join Date: Jun 2004
Posts: 98
Iamthehor is on a distinguished road
Logic Questions

Just got my board set up & installed. I'm playing around with it & trying to get familiar with MDX. I've used both the pre-installed skin & made my own via the wizard, so I'd say I've got the basics down with respect to the digital outputs. I have a couple problems that are probably just due to my way of doing things, so set my logic straight please.
I've done ladder logic with PLC & pnuematic controls, so my thinking tends along those lines.

1. Can you switch an output between toggle & momentary? You get the option to pick using the wizard, but not when creating from scratch. The momentary also acts funny - sometimes a double click latches it.

2. Scenario - 3 outputs, 3 buttons. I want Output3 on when Output 1 & 2 are on, but ONLY when 1 & 2 are on. I can turn it on without problems, but i can't get it to go off for anything. setting it as momentary & shutting off 1 & 2 doesn't work (Trigger output = toggle on, how do i toggle off?).

Using a boolean variable, it will go on if variable=true (only if i use 2 NOTs before the output because it forces me too use a boolean operator before the output), but I have not figured out how to change the variable back to false. There's gotta be something I'm missing. For the "ON" I'm using an AND to change the variable from false (default) to true. I have not found a statement that will change the variable back to false. In the ThenDoForm, there is an unlabeled box beneath the "opinion" field (which is un-changeable) that has +0 in it by default. I've tried +1, -1, 0, +0 etc and nothing works. Is change variable only a flip-flop type function?

I get the point of MDX for skinning purposes - it works well for that. The logic seems to be more difficult because I can't use If/Then/Else statements.
Iamthehor is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 12-01-2008, 03:23 PM   #2
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 Iamthehor View Post
1. Can you switch an output between toggle & momentary? You get the option to pick using the wizard, but not when creating from scratch. The momentary also acts funny - sometimes a double click latches it.

You say you have some EE-type background, so I will be semi-nerdy.

If you get it latching, change the upclick vote to a higher priority, or the downclick vote to a lower priority. Only time it latches is when you click faster than the sample rate of the gui portion of the program. This is settable in the timer area. Faster the frequency, the faster you have to click to vote 2 times down in the same period, or down and up in the same period. Also faster the frequency CPU cycles goes up obviously.

As to changing a button from toggle to momentary on the fly, I have not thought about that. I am sure it can be done with some fancy logic where the button changes a variable, and the uplick changes a variable, and depending on another variable that determined momentary/toggle the button's variable would either increase or not making an output on or not. I would have to think about it more though.

Quote: Originally Posted by Iamthehor View Post
2. Scenario - 3 outputs, 3 buttons. I want Output3 on when Output 1 & 2 are on, but ONLY when 1 & 2 are on. I can turn it on without problems, but i can't get it to go off for anything. setting it as momentary & shutting off 1 & 2 doesn't work (Trigger output = toggle on, how do i toggle off?).

Using a boolean variable, it will go on if variable=true (only if i use 2 NOTs before the output because it forces me too use a boolean operator before the output), but I have not figured out how to change the variable back to false. There's gotta be something I'm missing. For the "ON" I'm using an AND to change the variable from false (default) to true. I have not found a statement that will change the variable back to false. In the ThenDoForm, there is an unlabeled box beneath the "opinion" field (which is un-changeable) that has +0 in it by default. I've tried +1, -1, 0, +0 etc and nothing works. Is change variable only a flip-flop type function?

I get the point of MDX for skinning purposes - it works well for that. The logic seems to be more difficult because I can't use If/Then/Else statements.

Each MDX logic section is and If/Then/Else.

Have 1 logic section that says if (DigitalOutput0 && DigitalOutput1) connected to an output. Then in the then do area put the then statement to be turn on DigitalOutput3, and in the anti-then statement put in turn off DigitalOutput3. Done.

It forces a boolean operation because each output is an if/then/else. If(42) doesnt makes sense, but if(true) does, and boolean gives a true/false, where non-boolean doesnt.

If that doesnt make sense I can give some more input. Let me know.

-- Nick
2k1Toaster is offline   Reply With Quote
Old 12-01-2008, 03:54 PM   #3
Low Bitrate
 
Join Date: Jun 2004
Posts: 98
Iamthehor is on a distinguished road
OK, thanks for that - You've cleared up a few things without me even knowing i didn't understand. My logic was OK, just doing a lot more work than i needed & being countered by something i didn't know existed- the "vote opinion" terminology fooled me. I though the on/off for that had something to do with the voting, which i thought was unnecessary for something as simply as on/off with 1 condition it was on for both cases, causing output 3 to stay on after coming on.

BTW, I understood most of that but my EE knowledge is poor at best. I'm ME, but i do work with automotive wiring systems - low voltage and no digital logic, more how to get them in the vehicle rather than functionality.
Iamthehor 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
Questions, Questions, Questions... TomParker69 General Hardware Discussion 3 08-10-2007 02:32 PM
Bunch of questions .. New around here. Timm3h Newbie 12 06-22-2005 02:28 AM
questions and more questions cortinaking Newbie 6 06-16-2005 03:02 PM
Will someone be willing to answer a few questions about the Vietnam War for an essay? guitar333 Off Topic 6 05-25-2005 12:53 PM



All times are GMT -5. The time now is 06:12 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