Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Fred_evans on January 25, 2015, 12:42:56 AM

Title: parameter syntax
Post by: Fred_evans on January 25, 2015, 12:42:56 AM
Hello chaps

I am doing a bit of coding with parameters and having trouble getting mach3 to read them

I think it is a syntax error.
firstly -do the normal operators ("+","-","/","*') work on parms??
secondly what about boolean ?
What about "<" and ">" (smaller than and bigger than)
thirdly where do the brackets go?

this is one of the lines i am not getting
Plain english says  #5  is equal to #3 minus 2 mm

coded as follows   #5=#3-2  doesnt work ??

please help the manual is very brief on this subject is there ant other literature?

regards

fred



Title: Re: parameter syntax
Post by: BR549 on January 25, 2015, 01:18:54 AM
#5 = [#2-2]
Title: Re: parameter syntax
Post by: Fred_evans on January 25, 2015, 07:03:22 AM
sorry i didnt make it clear
values of parms are as follows
# 3=9
To get value of #5 I am looking for 9-2
#5 = #3-2 ( answer should be
value of #5=7)
Title: Re: parameter syntax
Post by: Fred_evans on January 25, 2015, 12:53:55 PM
Ha-- square brackets . Is that the secret?

Fred
Title: Re: parameter syntax
Post by: BR549 on January 25, 2015, 12:58:09 PM
#3 = 9
#5 =[#3 -2]