Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: New Project Help

  1. #11
    Newbie
    Join Date
    Dec 2008
    Posts
    15
    OK, got it. Here it is for others who might be struggling like I am.

    <all_statements>
    <if fire_on="logic" minimum_delta_vote_time="100" id="Root Function #">
    <boolean_operation type="greater than">
    <parameter1>
    <analogue id="SC1" time="0"></analogue>
    </parameter1>
    <parameter2>
    <number>4</number>
    </parameter2>
    </boolean_operation>
    <then>
    <do function="Trigger Output" functionTargetID="D0" vote_opinion="On" vote_priority="High"></do>
    </then>
    <anti-then>
    <do function="Trigger Output" functionTargetID="D0" vote_opinion="Off" vote_priority="High"></do>
    </anti-then>
    </if>

    </all_statements>

  2. #12
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    9,851
    Quote Originally Posted by quick503 View Post
    OK, I used this in the Logic area and it worked.

    <all_statements>
    <if fire_on="logic" minimum_delta_vote_time="100" id="Root Function #">
    <boolean_operation type="greater than">
    <parameter1>
    <analogue id="SC1" time="0"></analogue>
    </parameter1>
    <parameter2>
    <number>4</number>
    </parameter2>
    </boolean_operation>
    <then>
    <do function="Trigger Output" functionTargetID="D0" vote_opinion="On" vote_priority="High"></do>
    </then>
    </if>
    </all_statements>

    I can't seem to figure out how to get the anti-then part. Do you do another <if>, </if> section but use "not"?

    <if fire_on="logic" minimum_delta_vote_time="100" id="Root Function #">
    <boolean_operation type="not">
    <parameter1>
    <boolean_operation type="greater than">
    <parameter1>
    <analogue id="SC1" time="0"></analogue>
    </parameter1>
    <parameter2>
    <number>4</number>
    </parameter2>
    </boolean_operation>
    <then>
    <do function="Trigger Output" functionTargetID="D0" vote_opinion="off" vote_priority="High"></do>
    </then>
    </if>
    To do antithen, the icon right beside then is what you want. You can do it with another if statement, but it takes more code and makes things harder to debug later.

    -- Nick
    Sent from my HTC Touch Pro
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  3. #13
    Newbie
    Join Date
    Dec 2008
    Posts
    15
    I figured out how to control an output using an EE-SX1235A-P2 Photomicosensor. But I still haven't got an answer as to whether or not the FB and software will be able to do what I need. Am I barking up the wrong tree?

  4. #14
    Fusion Brain Creator
    Join Date
    Mar 2005
    Posts
    2,220
    Quote Originally Posted by quick503 View Post
    I figured out how to control an output using an EE-SX1235A-P2 Photomicosensor. But I still haven't got an answer as to whether or not the FB and software will be able to do what I need. Am I barking up the wrong tree?
    You're not, we're just not sure what your question is, specifically?

  5. #15
    Newbie
    Join Date
    Dec 2008
    Posts
    15
    I was referring to the senerio and questions in #1.

  6. #16
    Fusion Brain Creator
    Join Date
    Mar 2005
    Posts
    2,220
    Quote Originally Posted by quick503 View Post
    I was referring to the senerio and questions in #1.
    hmm, okay. that's still a little vague to me, but the answer is that yes, absolutely it can be done, it's just a tremendous amount of logic and if statements.

  7. #17
    Newbie
    Join Date
    Dec 2008
    Posts
    15
    If I understand it correctly some of the functions are outside of the main program (like Celcius to Fahrenheit). I see that they are in xml. Can functions be written in another program (say VB) to return a value to a variable to xml?
    Does xml have things like being able to "Call" a subroutine? Or is that what the functions are for?
    I can write the code I need in a program called WinBatch but don't know how to make it communicate with the FB.

  8. #18
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    9,851
    In MDX, a function is an external xml file. Its structure is identical to a logic section, but if you have something you are doing over and over, it is probably easier to have 1 function that is called lots of times from individual logic sections than to have each logic section contain the same root code.

    XML itself is just a universally understood data formatting standard. It is just text. Everything in the xml file is parsed by MDX into functional objects.

    Calling a subroutine is when a logic section calls a function. A function can call another function and so on.

    If you write code in a different program, then you need to use the COM object to pass things back and forth. That means making a whole new program that will communicate with MDX through a shared memory object.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  9. #19
    Newbie
    Join Date
    Dec 2008
    Posts
    15
    Are the functional objects parsed by MDX defined within MDX or are they (can they be)defined (created?) by the xml code? I guess things like < or > have to have been predefined in MDX.
    Is it possible to loop an If/Then a set number of times before going to the next one?
    Is it possible to get a list of the possible functional objects written into MDX or are they all avaliable in the configurator?
    I'm a little unclear on the timers. I think I read that there are 4 and the If statements could use any of them. If some of the If statements use different timer settings how does that work? I envision that the first time the logic section is run it just flows down to the end and starts again but I get confused when the timers are different. (I'm so confused I'm having trouble describing it)

    Also I figured out how to control a output using an SX1235A-P2 photomicrosensor. Would you like me to write a little "How To" with the info I found including the resistor values I used?
    Oh Well ... it's very late. Cheers

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 18
    Last Post: 07-26-2006, 10:50 AM
  2. DIN compatable PC project
    By don-m in forum Worklogs
    Replies: 4
    Last Post: 10-23-2005, 11:11 AM
  3. New Project: Contrast Mediaplayer
    By pplante in forum Software & Software Development
    Replies: 26
    Last Post: 07-07-2004, 12:06 PM
  4. Hello!! CarPC project pics inside.
    By bobbykokinos in forum Newbie
    Replies: 11
    Last Post: 03-29-2004, 12:44 PM
  5. RLion Project Webpage
    By Reactor in forum General MP3Car Discussion
    Replies: 0
    Last Post: 02-18-2004, 06:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •