Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Sayezb Repeating Question

So I'm gritting my teeth try to figure out why the SayEZB command keeps repeating the phrase over and over. Usually around three times but not always.

When no scripts are running it functions normally.

When I start running 3 scripts, which are similar but monitor a different digital port.

Code:


:loop
IF (GetDigital(D14) = 1)
ControlCommand("PersonalityScripts", ScriptStart, "EarStalkLeftFlash")
ENDIF
WaitForChange(GetDigital(D14))
goto(loop)


It starts happening

It still exhibits the same behavior with the ControlCommand() commented out. I've been trying to set up a unit test but I can't seem to get the issue narrowed down.

Any one experienced this issue? Or have any insight as to what is happening?

PRO
Synthiam
#1  
ah, interesting - I think I know why... wait for change will loop with no delay. Which means if it is waiting for the digital port to change, it will send a kabillion commands per second and flood the communication channel.

Use this instead of WaitFor() when dealing with digital... Also, I recommend 100 or so ms while playing audio. Experiment and see what works best.

Quote:


Digital_Wait (digitalPort, on/off/true/false, [delay ms])
Wait until the digital port status has changed
The optional parameter Delay MS is the millisecond delay for checking. This value determines the delay between checks.
Example: Digital_Wait(D12, ON)
Example: Digital_Wait(D12, ON, 50)
#2  
Ok thanks, will proceed with your suggestions.

I have been noticing the communication channel effect when polling sensors, especially the analog ones. It seemed the sleep sweet spot was 500 milliseconds but I was making a lot of assumptions about what was going on.

Speaking of the communication channel is there anyway to measure the performance other then experiencing lag between ezb and ARC? I wanna ask more questions concerning sampling, commands per second but just not sure what to ask yet...
United Kingdom
#3  
Check out the benchmark control
#4  
Thank you @Rich for pointing out the obvious to me. Blush.

Thanks for having patience with us newbs.