Configure the vfdb_vfd driver for direction

More
1 year 11 months ago #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 to join the conversation.

More
1 year 11 months ago #314177 by Aciera
Sounds like you need to change the 'spindle.0.speed-out..-abs' pin in your hal file to the non absolute variant:

 

Attachment not found

Please Log in to join the conversation.

More
1 year 11 months ago #314307 by darrylb123
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 to join the conversation.

Time to create page: 0.882 seconds
Powered by Kunena Forum