- Posts: 65
- Thank you received: 0
unary operations in linux
4 years 1 month ago #252548
by foam man
unary operations in linux was created by foam man
hi when i enter the following line into linux it says unary operation can be used
#<flange>= x2 y.5
i think i understand that its telling me i can use a single command, but which one?
#<flange>= x2 y.5
i think i understand that its telling me i can use a single command, but which one?
Please Log in to join the conversation.
4 years 1 month ago #252554
by Aciera
Replied by Aciera on topic unary operations in linux
I'm not sure what you are trying to do there but parameters can only be floating point values.
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 to join the conversation.
4 years 1 month ago #252555
by Aciera
Replied by Aciera on topic unary operations in linux
The message you are getting about unary operation is just an error message from the interpreter when it encounters an unexpected line of gcode.
Please Log in to join the conversation.
4 years 1 month ago #252649
by foam man
Replied by foam man on topic unary operations in linux
ok makes sense
Please Log in to join the conversation.
4 years 1 month ago #252650
by foam man
Replied by foam man on topic unary operations in linux
what would be the best way to move 2 directions (but not simultaneously) with a single command
Please Log in to join the conversation.
4 years 1 month ago #252668
by MaHa
Replied by MaHa on topic unary operations in linux
as a 'single command' you can call a subroutine
and place the subroutine with toolpath at the top of mainprogram.
another exampl
Code:
o<flange> call [2] [0.5]
and place the subroutine with toolpath at the top of mainprogram.
Code:
o<flange> sub
G1 X#1 Y#2
o<flange> endsub
another exampl
Code:
o<flange> sub
G1 X#1
Y#2
o<flange> endsub
Please Log in to join the conversation.
4 years 1 month ago #252824
by foam man
Replied by foam man on topic unary operations in linux
honestly i.m very new to cnc programing and whatever you have written up top is probably over my head, but can you elaborate just a little bit about excactly what those commands will do
thanks
thanks
Please Log in to join the conversation.
4 years 1 month ago #252833
by Aciera
Replied by Aciera on topic unary operations in linux
Maybe have a look at the O code documentation:
linuxcnc.org/docs/html/gcode/o-code.html
linuxcnc.org/docs/html/gcode/o-code.html
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
Less
More
- Posts: 4739
- Thank you received: 2
4 years 1 month ago #252934
by Todd Zuercher
Replied by Todd Zuercher on topic unary operations in linux
Technically, it is not possible to make two separate moves with a single command.
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.)
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 to join the conversation.
Time to create page: 0.134 seconds
