Asigning value from nc-code to HAL parameter
23 Jul 2020 15:42 #175554
by jsskangas
Asigning value from nc-code to HAL parameter was created by jsskangas
I have problem to write value from nc code to hal parameter.
I remapped G50 and defined to accept "S" parameter.
I would like this G50 command to pass value after "S" to Hal parameter.
How can i make this happen?
I can debug it like: (debug,value of S is #<S>) and it gives correct value. But how to write this to HAL parameter?
I remapped G50 and defined to accept "S" parameter.
I would like this G50 command to pass value after "S" to Hal parameter.
How can i make this happen?
I can debug it like: (debug,value of S is #<S>) and it gives correct value. But how to write this to HAL parameter?
Please Log in or Create an account to join the conversation.
23 Jul 2020 16:34 #175555
by PCW
Replied by PCW on topic Asigning value from nc-code to HAL parameter
Is there some reason you cannot use M67 or M68?
Please Log in or Create an account to join the conversation.
23 Jul 2020 18:09 #175559
by jsskangas
Replied by jsskangas on topic Asigning value from nc-code to HAL parameter
I made "limit spindle max rpm" HAL component for lathe and I would like to use G50 as it is generally used as RPM limit in Fanuc based machines.
Please Log in or Create an account to join the conversation.
23 Jul 2020 19:48 - 23 Jul 2020 19:49 #175567
by jsskangas
Replied by jsskangas on topic Asigning value from nc-code to HAL parameter
I tried do it like this :
G50 S1200.0
G50 mapped to subprogram, which call M120 P#<S>
Inside M120
#!/bin/bash
rpmlimit=$1
halcmd setp spindlelimit.rpm-limit $rpmlimit
exit 0
But there is also problems with this one.
Even calling M120 P1200.0 directly in MDI,
will not change parameter, but goes thru without error and shuts down spindle.
Using line directly in "Show HAL Configuration" setp spindlelimit.rpm-limit 1200.0 will change parameter
Calling any even empty user defined M-command will shutdown Spindle???
Is this a bug? My mill 2.8 pre will not act this way.
G50 S1200.0
G50 mapped to subprogram, which call M120 P#<S>
Inside M120
#!/bin/bash
rpmlimit=$1
halcmd setp spindlelimit.rpm-limit $rpmlimit
exit 0
But there is also problems with this one.
Even calling M120 P1200.0 directly in MDI,
will not change parameter, but goes thru without error and shuts down spindle.
Using line directly in "Show HAL Configuration" setp spindlelimit.rpm-limit 1200.0 will change parameter
Calling any even empty user defined M-command will shutdown Spindle???
Is this a bug? My mill 2.8 pre will not act this way.
Last edit: 23 Jul 2020 19:49 by jsskangas.
Please Log in or Create an account to join the conversation.
- tommylight
- Online
- Moderator
Less
More
- Posts: 19209
- Thank you received: 6438
23 Jul 2020 20:54 #175572
by tommylight
Replied by tommylight on topic Asigning value from nc-code to HAL parameter
Why do you insist on using 1200.0 ?????
Usually that is OK, but not always.
1200
Usually that is OK, but not always.
1200
Please Log in or Create an account to join the conversation.
23 Jul 2020 21:13 #175575
by jsskangas
Replied by jsskangas on topic Asigning value from nc-code to HAL parameter
I does not mater 1200 or 1200.0 same behavior.
I tried both, cause 1200.0 is float and 1200 could be read as integer.
I tried both, cause 1200.0 is float and 1200 could be read as integer.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- tommylight
- Online
- Moderator
Less
More
- Posts: 19209
- Thank you received: 6438
24 Jul 2020 09:23 #175612
by tommylight
Replied by tommylight on topic Asigning value from nc-code to HAL parameter
Thank for the explanation.
Please Log in or Create an account to join the conversation.
Time to create page: 0.078 seconds