using the m64,and m65
05 Jan 2012 00:00 #16315
by helpmeout
using the m64,and m65 was created by helpmeout
The code m64 will turn on a digital out put, is that output the voltage of a breakout board if your parellel port is 5 volts. the code of m65 will turn it off.
Please Log in or Create an account to join the conversation.
05 Jan 2012 00:32 #16316
by BigJohnT
Replied by BigJohnT on topic Re:using the m64,and m65
Depends on what you "connect" to motion.digital-out in your hal file. If you "connect" motion.digital-out to a parallel port pin then it will turn it off and on, the voltage will depend on your parallel port.
John
John
Please Log in or Create an account to join the conversation.
05 Jan 2012 00:54 #16318
by helpmeout
Replied by helpmeout on topic Re:using the m64,and m65
not sure that I follow you, I thought the code output a signal on my parellel port, and that made a( high or low) then the breakout board passed that signal to the out put pins that are 1,2,3,4,5,6,7,8,9, output. and the m64 code or the m65 code out put a signal and i thought you used m64,1 to use the no.1 output. thats how i thought it worked but now i dont know.
Please Log in or Create an account to join the conversation.
05 Jan 2012 00:58 #16319
by helpmeout
Replied by helpmeout on topic Re:using the m64,and m65
So can I go to my INI file and tell the motion.digital-out= pin 1 then will it work, I dont think my ini file has that in it yet but i can edit it with that in it.
Please Log in or Create an account to join the conversation.
05 Jan 2012 05:02 #16321
by helpmeout
Replied by helpmeout on topic Re:using the m64,and m65
You said something about the hal file, does EMC2 use both hal file and (WHATEVER.ini file too. I setup and use the ini file. i didnt know it used both files to run the cnc. do i need to do something extra to activate the hal file. BOY AM I HAVING FUN>.....
Please Log in or Create an account to join the conversation.
05 Jan 2012 09:44 #16325
by Rick G
Replied by Rick G on topic Re:using the m64,and m65
You might want to look here...
www.linuxcnc.org/docview/html//hal_basic_hal.html
You will use hal to connect to a pin to control the output.
Rick G
www.linuxcnc.org/docview/html//hal_basic_hal.html
You will use hal to connect to a pin to control the output.
Rick G
Please Log in or Create an account to join the conversation.
05 Jan 2012 12:02 #16332
by BigJohnT
Replied by BigJohnT on topic Re:using the m64,and m65
Seems like you have a lot of fun ahead of you.
To connect a motion digital output to a parallel port pin you will have to modify a .hal file. If you use Stepconf Wizard to create your configuration then do the modifications in custom.hal. To "connect" motion digital output pin 0 to the parallel port pin 17 you could create a line like the following.
Now to use the digital out pin you need the following in your g code file
Notice after reading the manual for digital I/O pins here that the above code will not work for M62/M63.
John
To connect a motion digital output to a parallel port pin you will have to modify a .hal file. If you use Stepconf Wizard to create your configuration then do the modifications in custom.hal. To "connect" motion digital output pin 0 to the parallel port pin 17 you could create a line like the following.
net digital-out-0 motion.digital-out-00 => parport.0.pin-17-out
Now to use the digital out pin you need the following in your g code file
M64 P0 (turn on digital out pin 0)
G4 P10 (pause for 10 seconds, just so you can see the pin turn on)
M65 P0 (turn off digital out pin 0)
Notice after reading the manual for digital I/O pins here that the above code will not work for M62/M63.
John
The following user(s) said Thank You: zfa
Please Log in or Create an account to join the conversation.
06 Jan 2012 23:23 #16388
by helpmeout
Replied by helpmeout on topic Re:using the m64,and m65
I entered that code into the custom .hal file then input the M64 p0 and M65 into the MDI and was able to turn the out put on and off, im thinking about using that out put to turn on an electronic switch that uses a dc input of 3 to 5 volts to turn on an ac router. im going to hook up the switch next with a light to see what happens. thank you folks very much. for you kind help.
Please Log in or Create an account to join the conversation.
07 Jan 2012 01:07 #16391
by andypugh
Replied by andypugh on topic Re:using the m64,and m65
helpmeout wrote:
Do you mean "router" or "router"![:-) :-)](/media/kunena/emoticons/smile.png)
If you mean the whirly woodworking thing, not the ethernet thing, then you would normally use M3 M4 and M5 for that. dedicated motion.spindle-on pins.
CNC folks are probably the only ones where the two "routers" cause confusion.
im thinking about using that out put to turn on an electronic switch that uses a dc input of 3 to 5 volts to turn on an ac router..
Do you mean "router" or "router"
![:-) :-)](/media/kunena/emoticons/smile.png)
If you mean the whirly woodworking thing, not the ethernet thing, then you would normally use M3 M4 and M5 for that. dedicated motion.spindle-on pins.
CNC folks are probably the only ones where the two "routers" cause confusion.
Please Log in or Create an account to join the conversation.
07 Jan 2012 02:17 #16392
by helpmeout
Replied by helpmeout on topic Re:using the m64,and m65
Yes its for the whirly woodworking thingy, but your segestion is better i think i can set that up in the setup wizard by selecting a pin no for the spindle, then turn it on with a m3 and m5 to turn it off, would that be right.
Please Log in or Create an account to join the conversation.
Time to create page: 0.123 seconds