Python HAL script, Pins not working

More
3 years 3 months ago #274678 by Faggan
Ok, then that's why I cant write to it with setp then? But that shouldn't stop the python component from writing to that pin?

Is that connected to the error I'm seeing or is there something else?

I'm not sure. But it feels like the signals that are being created in the python script needs to be declared somewhere else as well. Since the signals from the original hal_manualtoolchange script works. I cant find anything supporting this in the "Creating Userspace Python Components" manual how ever.

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

More
3 years 3 months ago #274683 by andypugh
Are you using "hal getp" and "hal_setp" in the Python script? That seems strange, as you would normally access the pin values for pins "belonging" to the component as variables.

eg
Code:
if h.current_tool_return == 0:

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

More
3 years 3 months ago - 3 years 3 months ago #274687 by Faggan
I am not using getp or setp in the script.

Most of the hal variables created in the script are outputs to transfer parameters from the script to a ngc subroutine.

the h.current_tool_return is an output to tell the ngc if the tool in the spindle should be returned to the magazine automatically or manually removed by the user and stored outside the machine.

eg:
if current_tool_return == 1
h.current_tool_return = True

current_tool_return is an internal variable in the python script that is set depending on various things.. Its not really relevant to this.
Last edit: 3 years 3 months ago by Faggan.

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

Time to create page: 0.048 seconds
Powered by Kunena Forum