PDA

View Full Version : Programming no-no?



roscoe
03-01-2011, 01:02 AM
I'm new to this file programming for my bot, but I discovered that I needed to be more careful with the words I use in creating a file. Hopefully, my experience will save some other poor soul the pain I went through.

I made a file to do a repeated cut, previewed it, and it looked good. Upon trying it out on my bot, the file seemed to become possessed and started to change the position midway through the file. Long story short, after pouring over the file for a couple of wasted days to try and figure out why it was changing position I discovered that I used the word "Start:" to commence the sub routine of doing the actual cutting.

I have since found out that the reason for the change in position was because of the first two letters in "Start" were the same for the command [Settings,Table] which changed the table coordinates to the point where the spindle was at the time, and not Absolute coordinates any more. After reading some of the forum solutions on repeating cuts in files, a better word was "Begin" which doesn't use any letters which may be mistaken for a command by the controller.

I hope this will help someone else down the road in avoiding the pain that one little word can inflict. BTW, is there someplace I can look to find a list of correct words for commands to use in creating SB files??

Cheers...

bleeth
03-01-2011, 07:11 AM
"Go To" is commonly used syntax before a sub-routine location as well.

beacon14
03-01-2011, 06:18 PM
OMG all these years and I've never stumbled upon that one or heard of it happening to any else. How frustrating that must have been. Thanks for the heads up. I have had similar issues using variable names within a file that turn out to be used by SB in some behind-the-scenes file, or worse, using the same variable name in more than one file, and calling one file from within another, and then wondering why it's not behaving as expected.

Look for the ProgHand.pdf file. Mine is in the C:\Program Files\ShopBot\Developer Tools directory, or you can look from within the ShopBot control panel: [H]elp/[P]rogramming and Developer Resources.

Hopefully this episode won't deter you from getting more involved in the programming aspect of the machine. It's where the real fun is.

dana_swift
03-02-2011, 09:53 AM
Interesting and serious bug in the SB3 code if it confuses "start:" the label with "st" the command.

Ted Hall & Bill Young - are you aware of this problem?

bill.young
03-02-2011, 02:12 PM
Bob,

Could you email me a copy of your original file that was causing the problem? We use "Start:" as a label without problems in the probing routines, and variations like "Startmove:" in the zeroing routines, so there must be something that's causing the "Start" to trigger the ST command. Seeing your original file will help us figure out what it is.

Bill

gerald_martin
04-02-2011, 01:50 PM
This is an interesting post.

I had this glitch occur to me once. If my memory is correct it was because I failed to follow the word "start" with a colon as in "start:".

However, to avoid a potential glitch today I switched to using "begin:" Then my command to start that section of the part file would be "goto begin:"

Can anyone else share their experiences on this one?

Gerald Martin

Gary Campbell
04-02-2011, 04:35 PM
My guess is that when its all said and done, we will find that Bob left out the colon just like Gerald (never me :rolleyes: ). I have used the label "START:" hundreds of times.

Dana...
We know its not a bug or problem unless it can be repeated on a machine in Durham! :D Unless its on my machine.