Welcome to Synthiam!

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

Asked — Edited

Script Question

Please have a look at this script. Will it run all the way through or will the Halt() command in the first "if" statement cause it to stop before it gets to the "Elseif" section? Thanks for looking.

Code:


if ($ADC_Lft_Elbow => 160 )#160-350 is in Centered position
$Lft_Arm_Centered = 0 #Reset varable 1=not cnetered, 0=centered
Halt()
ELSEif ($ADC_Lft_Elbow < 160 #Below 160 is not centered
uartWrite(2, 0, "2,p2480", 0x0d) #Move Lft Elbow Motor down a little
$Lft_Arm_Centered = 0 #Reset varable 1=not centered, 0=centered
endif

#7  
Oh my, how embarrassing. I do know I've been going through all my scripts lately and either rewriting them or cleaning them up. I have been finding and creating lots of errors. Maybe this is what you're seeing. I'll be watching that debug window closer now.
Synthiam
#8  
Nothing to be embarrassed about. Learning is harmless. watch the window. Here's some examples from yesterday...

Quote:


12/26/2016 3:21:14 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:21:42 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:21:42 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 45: Variable not defined: $Rt_Carrage_Position
12/26/2016 3:24:27 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:24:27 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 45: Variable not defined: $Rt_Carrage_Position
12/26/2016 3:25:24 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:25:24 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 45: Variable not defined: $Rt_Carrage_Position
12/26/2016 3:25:26 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:25:26 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 45: Variable not defined: $Rt_Carrage_Position
12/26/2016 3:25:35 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:25:35 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 45: Variable not defined: $Rt_Carrage_Position
12/26/2016 3:32:46 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:33:33 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:33:34 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 89: Missing ) in Expression
12/26/2016 3:35:58 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:35:58 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:36:31 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBSaved C:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZB
12/26/2016 3:37:03 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:37:03 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:37:04 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:37:49 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBSaved C:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZB
12/26/2016 3:44:20 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:47:11 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBSaved C:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZB
12/26/2016 3:47:28 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 3:59:26 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBSaved C:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZB
12/26/2016 4:01:20 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBSaved C:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZB
12/26/2016 4:01:37 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 4:02:27 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 4:03:45 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "


and

Quote:


12/26/2016 5:15:28 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 22: Variable not defined: $Rt_Carrage_Position
12/26/2016 5:36:40 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBSaved C:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZB
12/26/2016 5:46:43 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 25: Missing String Quotes or Invalid Expression at index 14: "
12/26/2016 5:46:47 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 3: Line 14. Unable to find label for goto(:Move_Rt_Elbow)
12/26/2016 5:48:55 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError: Line 14. Unable to find label for goto(:Move_Rt_Elbow)
12/26/2016 5:49:50 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 3: Missing 1 closing statement (ENDIF/ENDREPEAT/ENDREPEATUNTIL/REPEATWHILE/ENDREPEATWHILE/etc)
12/26/2016 5:50:37 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError: Missing 1 closing statement (ENDIF/ENDREPEAT/ENDREPEATUNTIL/REPEATWHILE/ENDREPEATWHILE/etc)
12/26/2016 6:01:55 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 14: Missing String Quotes or Invalid Expression at index 0: elsif
12/26/2016 6:03:18 PMC:\Users\Robot Control\Documents\EZ-Builder\My Projects\B9 Robot Control.EZBError on line 15: Missing String Quotes or Invalid Expression at index 0: elsif


It goes on like that for pages and pages:D. Now, some of that may be during your testing as well. When your robot project runs, the debug window should never have to raise. It should only need to raise when...

1) project is loaded
2) ezb is connected
3) camera is connected
#9  
@DJ Hey no fair, no hangin' out peoples dirty laundry man:P Oops I guess I'm next:)
Synthiam
#10  
Hey - that's helpful information for David. Far from dirty laundry. At least i suspect he'd see it as helpful:D
#11  
Yes , I do see this as helpful. Looking at the dates listed these were back in december when I was having "qiote" issues because I was having trouble with understanding Bianery among other things. You made some changes in EZ Builder and I made some adjustments and that issue was solved.

I don't mind my "dirty laundry" hanging out for all to see. Hopefull others can learn from my mistakes. I know I try to. LOL. I don't fear failure at all. However, it does get flustrating sometimes. ;)

I went through all my scripts again last night and was able to get them all to eun error free. No Debug popup bugging me. I'm sure I'll make more as I move along. It seems like I cant write a script without an error popping up after the first draft. I'll be sure to use the debug wondow from now one. Thanks again. :)
Synthiam
#12  
That's excellent to hear! Happy robot:)