Hello Guest it is March 29, 2024, 03:52:05 AM

Author Topic: Newbie error? - #1  (Read 3520 times)

0 Members and 1 Guest are viewing this topic.

Newbie error? - #1
« 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
         

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: Newbie error? - #1
« Reply #1 on: June 24, 2016, 07:08:23 PM »
Yes you are right  :)
Without engineers the world stops