unary operations in linux
- foam man
- Offline
- Senior Member
- Posts: 58
- Thank you received: 3
#<flange>= x2 y.5
i think i understand that its telling me i can use a single command, but which one?
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 4006
- Thank you received: 1730
linuxcnc.org/docs/html/gcode/overview.html#_parametersThe only value type supported by parameters is floating-point; there are no string, boolean or integer types in G-code like in other programming languages. However, logic expressions can be formulated with boolean operators ( AND, OR, XOR, and the comparison operators EQ,NE,GT,GE,LT,LE), and the MOD, ROUND, FUP and FIX operators support integer arithmetic.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 4006
- Thank you received: 1730
Please Log in or Create an account to join the conversation.
- foam man
- Offline
- Senior Member
- Posts: 58
- Thank you received: 3
Please Log in or Create an account to join the conversation.
- foam man
- Offline
- Senior Member
- Posts: 58
- Thank you received: 3
Please Log in or Create an account to join the conversation.
- MaHa
- Offline
- Platinum Member
- Posts: 405
- Thank you received: 163
o<flange> call [2] [0.5]
and place the subroutine with toolpath at the top of mainprogram.
o<flange> sub
G1 X#1 Y#2
o<flange> endsub
another exampl
o<flange> sub
G1 X#1
Y#2
o<flange> endsub
Please Log in or Create an account to join the conversation.
- foam man
- Offline
- Senior Member
- Posts: 58
- Thank you received: 3
thanks
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 4006
- Thank you received: 1730
linuxcnc.org/docs/html/gcode/o-code.html
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
- Posts: 4957
- Thank you received: 1441
What MaHa suggests is to create a small sub program that contains the 2 separate moves you are requesting, then you could use a single command to call that subprogram. The subprogram uses two variables for the distance of the separate X and Y moves that you have to specify the value of when you call the subprogram.
(or you can simply write the two separate moves explicitly in your g-code.)
Please Log in or Create an account to join the conversation.