Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: rgsparber on June 05, 2016, 02:52:51 PM

Title: Newbie error? - #1
Post by: rgsparber on June 05, 2016, 02:52:51 PM
I have been converting a program to be all parameters and ran into an error message. It took me a while to figure it out. I'm posting to first confirm I got it right and, if so, to alert my fellow newbies.

I wanted #2 = [ - #1]. In other words, to invert the sign of the number stored in variable location #1. Error message.

Used #2 = [ 0 - #1] and no error message.

A close reading of the Mach3 manual talks about subtraction but not flipping the sign.

Furthermore, I tried #2 = [ #3 - 1 * #1] and got no error message. I did get a panic opportunity to hit eStop. Mach3 read this as "take the contents of memory location #3, subtract 1.000. Then take the result and multiply it by the contents of #1. Oops.

So my take on this is that I must have that zero in order to change the sign of a parameter. Am I right?

Rick
         
Title: Re: Newbie error? - #1
Post by: Graham Waterworth on June 24, 2016, 07:08:23 PM
Yes you are right  :)