Hi all,
I "was" having major performance problems within EZ Builder that was getting worse and worse. The program would lag badly and sometimes lock up and crash. It was driving me nuts. Window 7 was not effected but I could not decide if it was my laptop, win 7 or EZ-B. The problem got worse to the point I couldn't even click on a button or drag a window around within EZ Builder and have it react. Then EZ-B would lock up and the program would crash. I tried to have just EZ Builder running and nothing else. However testing showed Win 7 and other programs would stay up and work nicely. Then I realized that the problem had gotten worse as I added ADC port Value monitors from the Add Control feature. I have 9 ADC Value monitors running now and all were watching different ADC ports on two different boards (I plan to add more soon). Once I clicked the Pause box on all but a few ADC monitor windows all my problems went away and EZ Builder ran perfectly! No lag, no crashes.
Is this usual behavior? Seems like monitoring ADC poets is very intensive for EZ Builder. However when the lagging problem was occurring I was watching a CPU monitor and EZ-B was only using about 60% of core 2 of a dual core CPU. Has anyone else had this issue running more then a few of these monitors? Would a stronger laptop with a better graphs board run these monitors better and without lag? I'm running on an older Dell laptop with a duel core Intel Centrino now.
Now, it's not an issue since I paused most of the monitoring windows. Also now that my B9 project is mostly setup and working without issue I really see no need for the 9 or more ADC monitor windows. But they're really cool to watch as B9 is run by EZ-B.
Thanks,
Dave Schulpius
Asked
— Edited
Remember, when the GUI is running a "read" command from the EZ-B, it has to wait until the command is read and the value is returned. The process can only be as fast as the communication channel. You may use the Benchmark Control to view the communication performance on your computer.
To monitor the ADC, do not use a graphical ADC window - instead use the Variable Watcher to view the results of your ReadADC() commands.
Thanks!
:Start
Sleep(1000)
$Battvolts = GetADC(adc0) * 0.0392079031372549
If($Battvolts < 7.10)
ControlCommand("Soundboard", Track_1)
Goto(Start)
Sure, I'd love to explane:
I have 10 chest buttons on the front of B9. All are connected to momentary switches that are in turn connected to a CFSound III sound system. The cool thing about the CFSound III is that it has onboard relays that you can program to close when a momentary button is pushed and a sound file is played (on a compact flash card on the CFS III). Anyway, I have 6 ADC poets connected to 6 of those CFS III relays. one wire is from the 5vdc pin and the other is the signal pin. So when I push any of the 6 chest buttons assigned to the relays tied to the ADC ports on EZ-B, EZ-B sees the change of voltage. I can program EZ-B to execute a script that's watching that ADC port. So in short I've tied the CFS III to the EZ-B through 6 of the 10 chest momentary buttons. Does that make sense?
The other 4 buttons make things happen with the CFS III like playing sound files randomly and timed randomly, play a different sound file at each button push, start up my on board Bluetooth receiver that hooks up to my laptop so I can run a program that lets me control what B9 robot phrases he recites. The 4th button will start the soil sampler and any animation other I choose to program into EZ-B.
The other ADC ports are monitoring potentiometers that give feedback for the positioning of where DC motors are.
Hope you got all that.
Dave Schulpius
How would I make GetADC() see the different values in a different scripts? would I just specify a value where each resistor brings the voltage to on that port?
Sounds like a small SDK script using IF GetADC() > ( a value) Elseif(action1) etc.......I know, a bit of programing
Thanks for the script hint. Yes, this sounds like it may be the answer. I'm certainly going to give it a try.