Hello Jeff,
JEFF I THINK THERE IS SUPPOSED TO BE ACTIVATION FOR THE LED TO SWTICH-ON WHILE
I CLICK ON THE BUTTON OR THE CHECKBUTTON - THIS NEVER WORKED
Thank you for your response, the BUTTON and the CHECKBUTTON now is like and OR
gate. This is ok BUT the LED does not come up, it doesn't light up. My
intention is to light the LED with the two buttons. I have try so many
simulation but it did just work. I was on it for more than 4hrs.
when went to the HAL SHOW CONFIGURATION in the WATCH, this is result:
WATCH
· pyvcp.my-button
· pyvcp.my-checkbutton
· pyvcp.my-led
the LED never came up.
I also went into the integrators manual to see an example but the example of
where
such was done has for only an old version of EMC 2.1, it doesn't have for
latest
vesions.
The example in the integrators manual that I tried to follows is in page 155
under the
sub heading;
17.7 VCP: A small example
WHAT DO I DO NEXT PLEASE GUIDE ME!
Olusegun Abode
+234 8037045535
Email:[EMAIL PROTECTED]
--- On Sat, 9/6/08, Jeff Epler <[EMAIL PROTECTED]> wrote:
From: Jeff Epler <[EMAIL PROTECTED]>
Subject: Re: I HAVE A PROBLEM WITH MAKING MY CHECKBUTTON TO SWITCH-ON MY-LED
To: [email protected]
Cc: "Olusegun A." <[EMAIL PROTECTED]>
Date: Saturday, September 6, 2008, 4:00 PM
[Redirected to the emc-users mailing list -- please use public forums
when requesting help with emc]
When I followed your directions, emc displayed the following error:
postgui.hal:1: Signal 'led' can not add OUT pin
'pyvcp.my-checkbutton'
This is because your 'net' command does not make sense. When emc
rejects your hal configuration, read and understand the message, because
it is the key to resolving the problem.
Here is why it does not make sense: A signal can have one "writer",
but
my-button and my-checkbutton are both "writers".
When I revised the 'net' line to read
net led pyvcp.my-led pyvcp.my-checkbutton
the state of the LED follows the state of the checkbutton.
If you want to have either of these sources affect the button, then you
have to add "something else" which controls how the two information
sources interact. Perhaps it is an 'or2' component. 'or2'
works like
a 2-input OR gate in electronics. Assuming that you do not already
otherwise use the 'or2' component, the lines for your postgui.hal file
would be something like this:
loadrt or2 count=1
addf or2.0 servo-thread
net b1 pyvcp.my-button => or2.0.in0
net b2 pyvcp.my-checkbutton => or2.0.in1
net led or2.0.out => pyvcp.my-led
Jeff
Original message follows for the benefit of emc-users:
On Sat, Sep 06, 2008 at 02:32:58PM -0700, Olusegun A. wrote:
> I have a problem with using my CHECKBUTTON or BUTTON to switch ON my
LED.
> I have tried the following.
>
> IN THE HAL section of my ini file I created POST_HALFILE = postgui.hal
>
> then,
> I created a postgui.hal file that is: net led pyvcp.my-led pyvcp.my-button
pyvcp.my-checkbutton
>
> already;
> I have added this to my test.xml file:
> <pyvcp>
> <checkbutton>
> <halpin>"my-checkbutton"</halpin>
> </checkbutton>
> <led>
> <halpin>"my-led"</halpin>
> <size>50</size>
> <on_color>"blue"</on_color>
> <off_color>"black"</off_color>
> </led>
> <button>
> <halpin>"my-button"</halpin>
> <text>"ON"</text>
> </button>
> </pyvcp>
>
> WHAT DO I DO TO MAKE THIS WORK, I WANT THE BUTTON OR CHECK BUTTON TO
SWITCH-ON MY-LED.
>
> Thank you
>
>
> Olusegun Abode
> +234 8037045535
> Email:[EMAIL PROTECTED]
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users