pyVCP button to control generic digital out

More
09 Feb 2021 02:35 #198115 by oddwick
ahhhh so simple, thats what i'm talking about! can i still use a toggle with it?

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

More
09 Feb 2021 09:10 #198131 by andypugh
Yes, you can use any PyVCP control with a bit output.

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

More
10 Feb 2021 09:52 #198258 by ahmetbm
Hi, unfortunately i can not link motion out with pyvcp button:
net machine_up_signal motion.digital-out-00 <= pyvcp.machine-up
i get this error:
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 or Create an account to join the conversation.

More
10 Feb 2021 09:59 #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?
The following user(s) said Thank You: ahmetbm

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

More
10 Feb 2021 10:58 #198262 by rodw


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 or Create an account to join the conversation.

More
10 Feb 2021 13:16 #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 or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum