Mesa 7C80 Spindel out Direction and Enable

More
10 Apr 2023 18:06 #268768 by maxguapo
Hi, In the last weeks I managed thanks to the may examples I found in the forum to configure the above bord with a MPG pendant, the steppers, an encoder and the spindle speed for a lathe. I struggle now with the output of the spindle interface (connector TB5 on the board) that the board provides for "direction" and "enable".

In the HAL file I have the following line:

net spindle-enable             <=  spindle.0.on
net spindle-cw                 <=  spindle.0.forward
net spindle-ccw                <=  spindle.0.reverse

and then
net spindle cw => hm2_7c80.0.gpio.020.out
net spindle-enabel => hm2_7c80.0.gpio.021.out

In the hal-meter the hm2_7c80.0.gpio.020.out or hm2_7c80.0.gpio.021.out pin changes state from true to false and vvs when I push to appropriate buttons on the Axis interface, but I do not get a reaction at the physical output. At the physical pin a ordinary relays is connected. When I send the signal to a ssr output all works. But I think that was not intended from Mesa. Do I have the right pins or what is my mistake?

From Mesa I got a funny bunny, but the bunny did not solve my problems until now. May be he (the bunny) was to much occupied because of the Easter holydays ;-( . Anyway......

Any help would be highly appreciated!

Regards, maxguapo

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

More
10 Apr 2023 18:18 #268770 by PCW
Have you set GPIO20 and GPIO21 to output mode?

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

More
10 Apr 2023 18:32 #268772 by maxguapo
Hi PCW, thank you for the quick reply.

No, I did not set the outputs to out. I found pins .020.in and 020.in-invert (?) and 020.out and thought that this would be enough.

Where do I have to set the pins for output?

Regards, maxguapo

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

More
10 Apr 2023 19:13 #268778 by PCW
You would need to set the "is_output" parameters for GPIO20 and GPIO21
(all HostMot2 GPIO starts out in input mode and must be specifically
set to output mode to use as an output)

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

More
11 Apr 2023 18:01 #268835 by maxguapo
Good evening PCW, thank you for your help. Now all works as expected.

Have a good time!

Regards, maxguapo

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

Moderators: PCWjmelson
Time to create page: 0.120 seconds
Powered by Kunena Forum