pyVCP button to control generic digital out

More
5 years 8 months ago #198115 by oddwick
ahhhh so simple, thats what i'm talking about! can i still use a toggle with it?

Please Log in to join the conversation.

More
5 years 8 months ago #198131 by andypugh
Yes, you can use any PyVCP control with a bit output.

Please Log in to join the conversation.

More
5 years 8 months ago #198258 by ahmetbm
Hi, unfortunately i can not link motion out with pyvcp button:
Code:
net machine_up_signal motion.digital-out-00 <= pyvcp.machine-up
i get this error:
Code:
custom_postgui.hal:14: Signal 'machine_up_signal' can not add OUT pin 'pyvcp.machine-up', it already has OUT pin 'motion.digital-out-00'

What is wrong with my code?
Thanks.

Please Log in to join the conversation.

More
5 years 8 months ago #198259 by andypugh
Both motion.digital-out-00 and pyvcp.machine-up are output pins, ie pins that supply a value to be used by other HAL pins, which are inputs.
(I prefer to use "reader" and "writer" sometimes, In this case you have two "writer" pins trying to set the same signal).

motion.digital-out-00 is a HAL pin that writes the result of an M62/M63/M64/M65 command. pyvcp.machine-up is a HAL pin that writes the result of pushing a button to HAL.

What do you actually want to do?

Please Log in to join the conversation.

More
5 years 8 months ago #198262 by rodw

andypugh wrote:
What do you actually want to do?


I thought the OP wanted to control a signal from both Gcode and the GUI. Thats what the example I posted achieved.

Please Log in to join the conversation.

More
5 years 8 months ago #198272 by ahmetbm
Thanks for the response.

I have noticed that i was using wrong signal after your warning.

Actually there are two positions up and down. I am trying to move a motor and stop it when it reaches the sensor, there are two sensors and motor moves between these two sensors(up limit sensor and down limit sensor). I am using classic ladder for this purpose, however i can not fully achieve what i need. I appreciate any tip for this kind of purpose.

Please Log in to join the conversation.

Time to create page: 0.514 seconds
Powered by Kunena Forum