The MP3car.com Store The MP3car.com Store    

Sponsored links

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

Reply
 
LinkBack Thread Tools Display Modes
Old 04-24-2008, 12:23 AM   #1
Fusion Brain Creator
 
Join Date: Mar 2005
Posts: 1,930
New Debugging Skin, and Logging Example!

Hey guys.

I couldn't stand studying for finals anymore, so I took a break and wrote a debugging skin in MDX for everyone. It does the following:

Momentary on/off for outputs
Analog input display
Analog input logging

http://fusioncontrolcentre.com/Tempo...m/TestSkin.rar



The skin logs all analog inputs, in XML format, under the logs directory. Then, to test the logging, I hooked up a temperature sensor, in a glass of warm-hot water. The temperature plot is below.



Partway through, I tossed in some ice cubes, which explains the drop.



And here's what the XML file looks like in excel... super easy to collect data and edit!
greenman100 is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 04-24-2008, 08:33 AM   #2
Variable Bitrate
 
dhantiflag's Avatar
 
Join Date: Nov 2006
Location: Mentor, OHIO
Posts: 296
very nice, im sure this will help alot... i know it woulda me two weeks ago :-)!
dhantiflag is offline   Reply With Quote
Old 04-26-2008, 11:11 AM   #3
Constant Bitrate
 
Join Date: Jan 2008
Location: Texas
Posts: 151
have you tried the outputs with this greenman?
when I tried them I thought they weren't working, but then I kept clicking 1 and finally I saw an output light up. so then I tried to hold the button to make sure it came on before I released, doing this helped me see why it wasn't looking like it worked, there is a near 1 sec. pause before it turns on, then again when you release the button there's the same pause before it shuts off. it seems like this should be closer to instantaneous, especially for momentary buttons. At first I thought it might be my computer so I tried it on my laptop and got the same pause.
jimp is offline   Reply With Quote
Old 04-26-2008, 11:32 AM   #4
Fusion Brain Creator
 
Join Date: Mar 2005
Posts: 1,930
Quote: Originally Posted by jimp View Post
have you tried the outputs with this greenman?
when I tried them I thought they weren't working, but then I kept clicking 1 and finally I saw an output light up. so then I tried to hold the button to make sure it came on before I released, doing this helped me see why it wasn't looking like it worked, there is a near 1 sec. pause before it turns on, then again when you release the button there's the same pause before it shuts off. it seems like this should be closer to instantaneous, especially for momentary buttons. At first I thought it might be my computer so I tried it on my laptop and got the same pause.

Yup, it's all in the timers. Right now, they're set for 1 second. Adjust as you see fit.
greenman100 is offline   Reply With Quote
Old 04-26-2008, 11:43 AM   #5
Constant Bitrate
 
Join Date: Jan 2008
Location: Texas
Posts: 151
I don't quite understand the timer stuff, is it just the output timer I adjust for this, and what effect on everything do the timers have?
jimp is offline   Reply With Quote
Old 04-26-2008, 11:54 AM   #6
Constant Bitrate
 
Join Date: Jan 2008
Location: Texas
Posts: 151
ok i adjusted the output timer to "100" and that makes it pretty much instantaneous. one other thing I noticed with your skin is that the output buttons have the vote set to absolute, with it like this there is no "state" change of the buttons and therefore no sense in having both images. If I change this to "vote = attached" then I get a state change when I click. any particular reason why you had it set like this?
jimp is offline   Reply With Quote
Old 04-26-2008, 12:00 PM   #7
FLAC
 
Join Date: Oct 2006
Location: Las Vegas
Posts: 1,286
the timers are parts of the FCC software that actually execute the statements in logic, update graphics, and gather data from inputs, or send to outputs. the number you choose determines how frequently that part of the code executes. there's a counter in each timer section of the source that increments each time it cycles through. the value you put in the skin is when the counter says ok, I've incremented enough, time to actually do something now, and then it runs the code related to that section, comprised of both the hard code, and the code that has been read in from the skin. So if you pick a low number, you will get more samples of data, put data out more frequently, update graphics, or run logic faster, but your CPU usage will rise as well. Bigger number = slower.
outputs may be all you need, but the actual buttons are worked with in the graphic section, so you may need to adjust that too. Normally, in my experience if the timers aren't multiples of eachother or out of phase, data (button clicking) can get lost. But I'm not yet an expert on how that applies in this software yet (and there's nothing for phase adjustment).
h3rk is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 04-26-2008, 12:12 PM   #8
Constant Bitrate
 
Join Date: Jan 2008
Location: Texas
Posts: 151
cool, that explains why my attached image wasn't keeping up with my output, I adjusted the gui to 100 and now the button changes state as quickly as the output changes.
jimp is offline   Reply With Quote
Old 04-26-2008, 01:19 PM   #9
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,417
Quote: Originally Posted by h3rk View Post
the timers are parts of the FCC software that actually execute the statements in logic, update graphics, and gather data from inputs, or send to outputs. the number you choose determines how frequently that part of the code executes. there's a counter in each timer section of the source that increments each time it cycles through. the value you put in the skin is when the counter says ok, I've incremented enough, time to actually do something now, and then it runs the code related to that section, comprised of both the hard code, and the code that has been read in from the skin. So if you pick a low number, you will get more samples of data, put data out more frequently, update graphics, or run logic faster, but your CPU usage will rise as well. Bigger number = slower.
outputs may be all you need, but the actual buttons are worked with in the graphic section, so you may need to adjust that too. Normally, in my experience if the timers aren't multiples of eachother or out of phase, data (button clicking) can get lost. But I'm not yet an expert on how that applies in this software yet (and there's nothing for phase adjustment).

Exactly!

As to the phase, the history on the analogue inputs could be used so if you only check logic 1 time out of 10 it firesm then in the logic you can do calculations based on any previous value as well to make up for the delay in processing. I would have to think about doing this automatically if the difference got too large I suppose. But that is something for a feature to come later!
2k1Toaster is offline   Reply With Quote
Old 04-26-2008, 01:22 PM   #10
Fusion Brain Creator
 
Join Date: Mar 2005
Posts: 1,930
Quote: Originally Posted by jimp View Post
any particular reason why you had it set like this?


nope, just ended up that way
greenman100 is offline   Reply With Quote
Old 07-31-2008, 02:53 PM   #11
Newbie
 
Join Date: Jul 2007
Posts: 35
Sorry to resurrect an old thread, but it deals with logging.

How can I get the logs to restart and create a new file each day?
How can I name them with the date as part of the name, e.g. Log-20080731.xml?
What does "StoreBeforeDumping" mean?
ginigma is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Debugging Skin, and Logging Example! greenman100 FB Skins 0 04-24-2008 12:23 AM


All times are GMT -5. The time now is 12:00 PM.


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