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>
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
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?
I was referring to the senerio and questions in #1.
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.
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
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
Bookmarks