send var to pyvcp

More
09 Sep 2019 03:07 #144559 by sergiop
send var to pyvcp was created by sergiop
One question, I want to send the value of a variable # 20 to a pyvcp pin to show a number, how do I do ??

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

More
09 Sep 2019 08:41 #144574 by pl7i92
Replied by pl7i92 on topic send var to pyvcp
depending on system you are you can do this via a Mcode
or using a INI Var
You can output the value of a parameter from G-code to a motion.analog-out HAL pin, and show that in the PyVCP.

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

More
09 Sep 2019 09:59 #144584 by sergiop
Replied by sergiop on topic send var to pyvcp
I am making an engraving system and the idea is to see the serial number before executing the program (the serial number is stored in a variable)

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

More
09 Sep 2019 12:55 #144600 by pl7i92
Replied by pl7i92 on topic send var to pyvcp
as the serial number is to be engraved
you shoudt see it on the screen as gcode

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

More
09 Sep 2019 13:28 #144605 by sergiop
Replied by sergiop on topic send var to pyvcp
yes, but the surface to be engraved is irregular and it is difficult to see it from gcode

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

More
17 Sep 2019 00:19 #145354 by andypugh
Replied by andypugh on topic send var to pyvcp
You would need to send your G-code variable #20 out to HAL using M68
linuxcnc.org/docs/2.7/html/gcode/m-code.html#mcode:m68
Then connect motion.analog-out-00 to the PyVCP input pin.

(G-code can (unreliably) read HAL values, but can't directly write to them.)

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

More
17 Sep 2019 17:16 #145411 by sergiop
Replied by sergiop on topic send var to pyvcp
but I have to send the values BEFORE executing the gcode, some method to read a variable and send the value to pyvcp without gcode ??

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

More
17 Sep 2019 17:41 #145413 by Todd Zuercher
Replied by Todd Zuercher on topic send var to pyvcp
Maybe something like this would be better achieved using a filter script that reads your variable's value as the G-code is loaded and sets your pyvcp value then.

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

More
17 Sep 2019 18:26 #145423 by andypugh
Replied by andypugh on topic send var to pyvcp

but I have to send the values BEFORE executing the gcode, some method to read a variable and send the value to pyvcp without gcode ??


How does #20 have any meaning before the G-code is executing?

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

More
17 Sep 2019 21:27 #145447 by sergiop
Replied by sergiop on topic send var to pyvcp
# 20 is the variable that stores the next number to write. I want to pass that value to pyvcp to visualize it before running the program.

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

Time to create page: 0.113 seconds
Powered by Kunena Forum