Stephen Wille Padnos wrote:
> Thomas Kaiser wrote:
> 
>> Hello All
>>
>> I would like to override (force) the input of the home switches for testing.
>>
>> I created a "checkbutton" vcp component which should overwrite the 
>> "both-home-x/y" signal:
>>
>> <checkbutton>
>>     <halpin>"x-axis-home-force"</halpin>
>> </checkbutton>
>>
>> In the postgui.hal:
>> linksp both-home-x pyvcp.x-axis-home-force
>>
>> But this does not work. Is it possible to override (force) a input with 
>> a vcp checkbutton? If possible, how do I have to do it?
>>  
>>
> It is possible, but not the way you did it (as you noticed :) ).
> 
> You probably got an error that said something like "signal both-home-x 
> already has a writer".  This is because you can only have one pin per 
> signal that writes to the signal.
> 
> How you should go about this depends on what you're trying to do.  You 
> said testing, so I'll assume you won't want to keep this setup - that 
> you're using a vcp panel to emulate the machine while making your 
> configuration.  This is the simpler of the methods anyway.
> 
> If you're using stepconf make sure to leave a parallel port pin set as 
> your X home/limit input, otherwise the both-home-x signal won't be 
> written to the .hal file.  All you need to do is disconnect the parallel 
> port pin from that signal somewhere above the line you already have.  
> Here's what you do if you used parallel port pin 1:
> 
> unlinkp parport.0.pin-01-in   # use -in-not if you have the "invert" 
> checkbox checked
> linksp both-home-x pyvcp.x-axis-home-force
> 
> This method has the advantage of disappearing when you (a) uncheck the 
> "use a custom HAL file" or (b) remove the associated lines from custom.hal.
> 
> - Steve

Hi Steve

That's exactly what I was looking for. It works perfect for me, right now.

On the other side, the "or" suggestion from John looks good, too. But I 
could not get it working till now :-(
John, do you have a real live example for me?

Thanks and Regards,

Thomas

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to