Re:pyVCP Online Documents

More
10 Apr 2009 04:56 #58 by pleezwrite
Hi,

I have created a pyvcp with a led which should become green when machine reaches the X reference point.

The HALpins are as follows:
- LED: pyvcp.xref
- X ref switch: parport.0.pin-10-in

When I try to modify the custom_postgui halfile the software would not start anymore. I must have made mistakes when connecting the two halpins. How do you do it?

Regards,
Adam

Uses EMC for: 3 axis mill, 2 axis CNC heater
Company profile: recumbent bicycle manufacturer

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

More
10 Apr 2009 11:04 - 10 Apr 2009 11:15 #59 by BigJohnT
Replied by BigJohnT on topic Re:Led
I would assume you made some spelling error. It would help if you posted what you added.

Even though this board has little traffic I went ahead and split your question into a new topic just to see if the button worked...

John
Last edit: 10 Apr 2009 11:15 by BigJohnT.

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

More
12 Apr 2009 11:20 #66 by pleezwrite
Replied by pleezwrite on topic Re:Led
Hi John,

As for the custom_postgui.hal I added the following line which does not seem to work well:

net parport.0.pin-10-in => pyvcp.x_ref_led

Regards,
Adam

Uses EMC for: 3 axis mill, 2 axis CNC heater
Company profile: recumbent bicycle manufacturer

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

More
12 Apr 2009 14:48 #69 by BigJohnT
Replied by BigJohnT on topic Re:Led
Ok, what is the code in your .xml file that you used to make the led?

Here is an example that would match your halpin:
<led>
<halpin>"x_ref_led"</halpin>
<size>50</size>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</led>

If you comment out the net line with # does the led show up? If not then we need to back up to the code that creates the led....

John

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

More
12 Apr 2009 15:16 #70 by alex_joni
Replied by alex_joni on topic Re:Led
pleezwrite wrote:

net parport.0.pin-10-in => pyvcp.x_ref_led


That's almost correct, but you're missing the signal name.
The syntax for net is:
net signalname pin1 [pin2, ...]

So you'll have to use:
net pyvcp-led-link parport.0.pin-10-in => pyvcp.x_ref_led

Regards,
Alex

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

More
14 Apr 2009 07:22 #81 by pleezwrite
Replied by pleezwrite on topic Re:Led
John and Alex,

I think this is exactly what I did but I copied below the XML and HAL files again that I used.

John, when I add the # symbol the led still shows up on the screen and EMC starts. when I delete the symbol EMC would not start anymore and comes up with that usual long error massage with some kernel information at the end.

Panel.xml:

<led>
<halpin>"xref"</halpin>
<size>50</size>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</led>

Custom_postgui.hal:

net X_reference_led pyvcp.xref <= parport.0.pin-10-in

Regards,
Adam

Uses EMC for: 3 axis mill, 2 axis CNC heater
Company profile: recumbent bicycle manufacturer

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

More
14 Apr 2009 07:27 #82 by alex_joni
Replied by alex_joni on topic Re:Led
pleezwrite wrote:

when I delete the symbol EMC would not start anymore and comes up with that usual long error massage with some kernel information at the end.


Can you use an online pasting facility (like pastebin.ca/) to put that information there? (and give us the resulting link).
The important part is in there ;)

Regards,
Alex

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

More
14 Apr 2009 07:40 #83 by pleezwrite
Replied by pleezwrite on topic Re:Led
Here it is, hope its readable.

Adam

Uses EMC for: 3 axis mill, 2 axis CNC heater
Company profile: recumbent bicycle manufacturer

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

More
14 Apr 2009 07:42 #84 by pleezwrite
Replied by pleezwrite on topic Re:Led
now?

File Attachment:

File Name: error.txt
File Size:40 KB

Uses EMC for: 3 axis mill, 2 axis CNC heater
Company profile: recumbent bicycle manufacturer
Attachments:

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

More
14 Apr 2009 08:15 #86 by alex_joni
Replied by alex_joni on topic Re:Led
The error is this:
custom_postgui.hal:14: pin 'parport.0.pin-10-in' was already linked

That means you probably connected the pin 10 for something else using stepconf.
If you're sure you're not using, just put an "unlinkp parport.0.pin-10-in" before you do the 'net' to connect the parport pin to the pyvcp pin.

Regards,
Alex

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

Time to create page: 0.098 seconds
Powered by Kunena Forum