Configure the vfdb_vfd driver for direction

More
10 Nov 2024 06:44 #314176 by darrylb123
I am trying to get the vfdb_vfd MODBUS driver working for reversing (M4) . It is otherwise working. Linuxcnc expects some forward/reverse pins but (looking at the source code) vfdb_vfd expects a negative speed number to send a reverse command to the VFD.

    if (*(haldata->speed_command) >= 0) {
        cmd1_reg |= CMD_FORWARD;
    } else {
        cmd1_reg |= CMD_REVERSE;
    }


My current configuration always send positive numbers and asserts the fwd/rev pins instead.
I can find no reference to configuring linuxcnc to send negative speed numbers to the driver for reverse.

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

More
10 Nov 2024 06:48 #314177 by Aciera
Replied by Aciera on topic Configure the vfdb_vfd driver for direction
Sounds like you need to change the 'spindle.0.speed-out..-abs' pin in your hal file to the non absolute variant:

 
Attachments:

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

More
12 Nov 2024 09:43 #314307 by darrylb123
Replied by darrylb123 on topic Configure the vfdb_vfd driver for direction
Thank you, I read that severat times, but didn't pick up on the significance. Cut and paste examples... After reading your answer, I found it spelt out in the spindle man page. Sigh.

spindle.N.spindle-rpm float out

Current spindle speed in RPM.+ve = forward, -ve = reverse. Uses the encoder input if available. If not, uses a simulated encoder speed.

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

Time to create page: 0.073 seconds
Powered by Kunena Forum