Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked
Resolved Resolved by DJ Sures!

Blockly Locking Up And Can't Stop It

Is there an easy way to shut down Blockly when it locks up and you can't stop it- without totally restarting ARC?


Related Hardware EZ-B v4

ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
PRO
Synthiam
#1   — Edited
The bigger question would be what tight loops or commands are causing Blockly to lock up? Something in your program is making it lock up. What does the command trace look like when it locks? Does it lock at the same command or section? 

Also remember that Blockly isn’t a programming language, so it’s not blocky locking up, it’s your program. Blockly generates JavaScript - so there’s a trace of commands displayed as the project runs. The big question is what part of your program is it locking at and why?
#2  
I am experimenting voice to expecting numbers with different numbers ranging 10-1000 incremented by one and then divide by 10   Then move the servo to that location Maybe it’s too much processing for the computer I’m using not sure I was just generally wondering if there is an easy way to get out of Blockly when it hangs up like this It would be nice to have an emergency stop rather than reboot
PRO
Synthiam
#3   — Edited
Unfortunately, that doesn't provide enough information to help you. If you can, give a code or snapshots of the program. Hanging is not because the computer is doing too much. Computers can do a lot more than that. Hanging is when something is being called recursively, in a tight loop, or for several other reasons. But the only way to know where to begin helping is to share your code or a screenshot.

PS, here's a support document that explains how to paste a picture into a forum post: https://synthiam.com/Support/website-features/how-to-use-the-website/pasting-images-in-forum-post
#4  
User-inserted image
It works fine for 600 but I'm trying to get more resolution-16ft broken down into tenths or even better 100ths so optimally get 1600 or 16000 positions. It takes forever to load and locks up if I try to go to 1600. Seems like it would be easier to just ask the question, turn the voice to text, put the text into a variable. The servo has max and min limits so if it does not like the answer just tell the person to pick the number between 1-16000. This was just an experiment, so I did not list that in the play audio area. I also noticed that my mp3 recording gets clipped sometimes this is why I added the sleep block. The "waiting for answer 10 second" takes about 4-5 seconds to load and the typical person is ready to answer directly after the question is asked, is there a way to speed this up and make it instantaneous? Ultimately I'd like to ask about 10 questions, fill in the variables and have multiple motors/bots complete their mission.
#5  
The manual for WaitForSpeechRange has this to say about large numbers....

Quote:


Large Number Ranges
This style of speech recognition populates the pre-defined responses it expects to hear. In this case, a range of numbers. This dramatically increases the accuracy of the speech recognition system by limiting the detected phrase/words to the list. By providing the list, the speech recognition system will generate definitions of the sound waveforms it is looking for.

While this method dramatically improves detection accuracy, it also can consume a lot of PC resources if a large number range is used. For example, a range higher than 100 is considered a large range. You may notice a significant delay every time this function is called, and that is due to the large range.

A solution to this is to prompt for multiple digits that will generate a larger number when added together with simple math. For example, if you require 1000 positions, consider prompting for each digit.

Another option is if your system requires decimal places, you may wish to prompt for the integer first and the decimal in a second prompt.


The manual can be found here: https://synthiam.com/Support/javascript-api/Audio/waitForSpeechRange or by selecting HELP on the Blockly block
PRO
Synthiam
#6  
Oh wow, yeah. I did not realize you were attempting to prompt for such a vast range. When you noticed that it took a long time to process the block with that range, I figured you'd split it into chunks. So no, Blockly is not locking up. Your program is locked up. You can fix your program by dividing the prompt into multiple prompts and assembling the range using math. There are math blocks in Blockly for multiplication, addition, subtraction, etc.
#7  
I understand what you are saying and understand what the computer is doing Can you point me in the direction of just straight up speech recognition that I can give a reply and be able to do something with that response-put it into a varaiable my speech recognition on my phone and my computer are wonderful and I would like to try that route because we are talking about 16,000 +positions which would take multiple conversations. I will have it repeat back to me what my answer was and I can confirm or deny and redo it again This paragraph was done with speech recognition
PRO
Synthiam
#8   — Edited
I can tell that sentence was done with speech recognition because it was tough to read and had no punctuation haha. It was not a paragraph; it may be as long as a paragraph, but it was one sentence - now you see the issues with speech recognition.:)

There are many speech recognition options, including Bing, which is excellent. But your program may have to change to use an asynchronous model. You appear to be using Blockly often, which is synchronous, like old-school BASIC programming. Blockly runs one task at a time. Robot skills, such as BING, use multiple threads and run simultaneously. The Task Script robot skill is used to make asynchronous robot skills work together in each task step (https://synthiam.com/Support/Skills/Scripting/Task-Script?id=21103).

You can still use the Task Script with Blockly, but each step of the task will have its own Blockly code. This is different than having one long gigantic program. The Task Script splits each step of the task into functions that will run synchronously. The manual for it explains more, but I do not think it's the direction you want to go.

But since that may be out of the scope of your program, I am having a block created for you that will receive any spoken number, including decimal places. It may not be that accurate, but that will depend on your microphone quality. The documentation for it is here: https://synthiam.com/Support/javascript-api/Audio/waitForAnyNumberSpeech.

The new block will be in the next release (about 15-25 days from now).
#10  
Thanks so much for the new number block, it works great and it's fast!!
#11  
User-inserted image
It worked great and I could see the number in the variable watcher but I started adding some blocks to the top of it and "say the number" to bottom of it and it started locking up. Wondering if I need to put some extra conditional statements to get out of the loop. Is there something in particular that is nullifying the Stop button from getting out of the loop and stopping it.