What's the easiest way to write and load a simple program?

More
30 Sep 2019 19:29 #146750 by BigJohnT
I never could understand why all the symlinks were added and why your forced to copy a sim just to look at it... none of which makes any sense to me.

JT

Please Log in or Create an account to join the conversation.

More
30 Sep 2019 19:44 #146752 by Scot
Got it. Thanks.

It's getting closer. BigJohnT pointed to where he has success. But when I tried it, I got all but the proper output. Not sure if I have the proper code in the file. But when I run the M101 command in MDI, Linux cnc doesn't give the output to the proper place on my PWM board, even though the command is recognized and doesn't throw me an error code. Other MDI commands such as M7 and M8 do as they're suppose to on the board. But not this one. I may have the code wrong. I'm waiting to hear back from Jon at Pico systems to know for sure.

Thanks, Todd.

Scot

Please Log in or Create an account to join the conversation.

More
30 Sep 2019 19:53 #146754 by Scot
Wait, do I have to make a HAL file, too? Or is that just in case I want to use a hard switch to open the collet through the DC side of the relay I use to operate the air solonoid I'm using to open/close the collet?



Scot

Please Log in or Create an account to join the conversation.

More
30 Sep 2019 20:17 - 30 Sep 2019 20:20 #146760 by BigJohnT
You can monitor the pin in Axis in the Show Hal Configuration.

That snippet is in my main hal file. If you have remote buttons to open and close and you want to use the same output yes you would need to add some lines to the hal file.

Just to simplify things don't use the or2 but rather use your pin names for the output.

So your M100 might look like this:
#!/bin/sh
# open the collet closer by turning on the output 1 is the same as true and 0 is the same as false
eval halcmd setp youroutputpin 1
sleep 0.25
# after a brief nap return the output to off unless it must remain on for the collet to stay open
eval halcmd setp youroutputpin 0
sleep 0.5
exit 0
Last edit: 30 Sep 2019 20:20 by BigJohnT.
The following user(s) said Thank You: Scot

Please Log in or Create an account to join the conversation.

More
03 Oct 2019 01:14 #146934 by andypugh

Please Log in or Create an account to join the conversation.

Time to create page: 0.070 seconds
Powered by Kunena Forum