How to add inputs and outputs to iocontrol

More
19 Jun 2009 06:53 #445 by kreshnik
Hi everybody.

I have a problem and I don't know how to solve it.

I'm using EMC with a 3 axis machine. However I need to add additional inputs and outputs (1 bit).
I don't know how to do it easily.

I tried to follow the implemention of the output "lube" and I succeeded to create one output. To do this I had to modify 10 source code files and I had to re-compile EMC. I'm not sure it's the right way to do it and I need your advice.

Thank you in advance for your help.

Kreshnik

PS: I tried to add 20 output. EMC craches with the message : "CMS:(emcStatus) Message size of 10900 exceeds maximum of 10180"

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

More
19 Jun 2009 13:11 - 19 Jun 2009 13:12 #448 by BigJohnT
What version of EMC are you running?

What are the inputs and outputs for? Perhaps there might be an easier way...

John
Last edit: 19 Jun 2009 13:12 by BigJohnT.

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

More
19 Jun 2009 13:25 #449 by kreshnik
I'm running EMC 2.2.5.

I need to add outputs to control some light switches.

Thanks for your help ;)

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

More
19 Jun 2009 13:58 - 19 Jun 2009 13:59 #450 by BigJohnT
What triggers the outputs?

Are the outputs on the parallel port card?

Can you tell us what your trying to do?

John
Last edit: 19 Jun 2009 13:59 by BigJohnT.

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

More
19 Jun 2009 14:24 #451 by kreshnik
Hi,

I have a Motenc PCI card.

I just want to command 3 lights with on-off signals.

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

More
19 Jun 2009 15:11 #452 by BigJohnT
If your wanting to do this with G-Code look at M100-199

www.linuxcnc.org/docview/html//gcode_main.html#sec:M100-to-M199:

John

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

More
19 Jun 2009 15:21 #453 by kreshnik
Thanks for your help.

But I am using TCL and I need to activate an output when I push a button.

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

More
19 Jun 2009 16:08 #454 by BigJohnT
By "TCL" do you mean your using the TKEMC interface or is it another interface?

A physical button or a button on the screen that you push with a mouse click?

Have you looked at pyVCP?

John

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

More
19 Jun 2009 16:17 #455 by swpadnos
kreshnik,

There are several ways to control a HAL output.

First, take a look at how halshow does it. If I remember correctly, it basically exec's halcmd, and pipes commands to it. Using this method, you can send "setp motenc.0.whichever_bit 1" (or 0) to turn a bit on and off.

Second, if you're not required to use TCL, you can make a simple pyvcp panel with a few buttons. Connect these buttons directly to the motenc pins in HAL, and you'll have a GUI that lets you twiddle bits directly. Use checkboxes if you toggles rather than momentary contacts.

You can also control some outputs using G-code, so you could (in some circumstances) use an MDI command to control them. This is probably not a good idea, but I figured I'd mention it anyway :) You can't use this method while a G-code program is running, for example.

- Steve

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

More
22 Jun 2009 07:05 #468 by kreshnik
Thanks for your help guys :)

to BigJohnT :

I'm already using MINI interface which is coded in TCL language. The interface is already done.


to swpadnos :

The interface is already done in TCL. How can I access directly to the motenc pins ?

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

Time to create page: 0.109 seconds
Powered by Kunena Forum