556,751 active members*
9 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Registered
    Join Date
    Mar 2014
    Posts
    1092

    Servo lathe spindle + Mach4 threading problem

    Hi,

    I recently Installed an AC servo as spindle motor. This servo runs with step-dir signals. Got some help from @joeaverage and @dazp1976 and some our friends (thanks).

    It took me a while to get the servo to run smooth and steady. All turn cycles works except threading. As you see in the video when I start a threading cycle spindle starts running, X and Z axes moves to their initial position then spindle suddenly stops. Then nothing happens.

    Mach4 version: 4.2.0.3804
    Latest PoKeys plugin and config app installed.

    Is this a software bug or something I did wrong?


    https://www.youtube.com/watch?v=1hpXf1iHkz0


    Here's the log file

    2022-05-29 19:56:27.639 - [PoKeys] [msg] PluginInstanceProcessAsyncMsg mInst = 0, msg = MSG_GUI_FOCUS (1030), wparam = 0, lparam = 0


    2022-05-29 19:56:38.049 - [PoKeys] [msg] PluginInstanceProcessAsyncMsg mInst = 0, msg = MSG_GUI_FOCUS (1030), wparam = 1, lparam = 0


    2022-05-29 19:56:38.182 - API: mcCntlCycleStart(inst = 0) (Mach4GUI LUA script)
    2022-05-29 19:56:38.284 - Attempt transition from "Idle" on event "Cycle Start" MachAPI.cpp:2851
    2022-05-29 19:56:38.284 - S_IDLE_on_exit
    2022-05-29 19:56:38.284 - ACTION_start_cycle
    2022-05-29 19:56:38.286 - S_FILE_RUNNING_on_entry
    2022-05-29 19:56:38.287 - S_FILE_RUNNING2_on_entry
    2022-05-29 19:56:38.287 - Signal id 1114, (Gcode Running), changed from LOW to HIGH.
    2022-05-29 19:56:38.288 - [PoKeys] [msg] PluginInstanceProcessMsg mInst = 0, msg = MSG_CYCLE_START (1005), wparam = 0, lparam = 0


    2022-05-29 19:56:38.296 - [PoKeys] [msg] PluginInstanceProcessAsyncMsg mInst = 0, msg = MSG_SPINDLE_CHANGED (1023), wparam = 0, lparam = 500


    2022-05-29 19:56:38.297 - Waiting on SetStill...
    2022-05-29 19:56:38.297 - Controller::RunCanonBuffer called AddStopReportRequest() RunCanon.cpp:88
    2022-05-29 19:56:38.297 - Step&Dir Spindle Direction: 0 RPM: 500.000
    2022-05-29 19:56:38.298 - Requesting a stopped report for axis 0 motors.
    2022-05-29 19:56:38.299 - Requesting a stopped report for motor 0.
    2022-05-29 19:56:38.299 - Requesting a stopped report for axis 2 motors.
    2022-05-29 19:56:38.299 - Requesting a stopped report for motor 2.
    2022-05-29 19:56:38.301 - [PoKeys] EX_STOP_REQ received for motor 0 - queuing at 112 (move 220593)
    2022-05-29 19:56:38.301 - [PoKeys] EX_STOP_REQ received for motor 2 - queuing at 32 (move 220593)
    2022-05-29 19:56:38.426 - API: mcMotionSetStill(inst = 0, motor = 0) (unknown caller)
    2022-05-29 19:56:38.426 - [PoKeys] Reporting motor 0 stopped (queued request) - delay of 0 slots stop=112 dev=112
    2022-05-29 19:56:38.428 - API: mcMotionSetStill(inst = 0, motor = 2) (unknown caller)
    2022-05-29 19:56:38.428 - All motors marked as still.
    2022-05-29 19:56:38.428 - [PoKeys] Reporting motor 2 stopped (queued request) - delay of 2 slots stop=32 dev=32
    2022-05-29 19:56:38.428 - Waiting on SetStill is Done!
    2022-05-29 19:56:38.431 - Signal id 1121, (Tool Change), changed from LOW to HIGH.
    2022-05-29 19:56:38.435 - [PoKeys] [msg] PluginInstanceProcessAsyncMsg mInst = 0, msg = MSG_CHANGE_TOOL (1000), wparam = 1, lparam = 0


    2022-05-29 19:56:38.439 - Signal id 1121, (Tool Change), changed from HIGH to LOW.
    2022-05-29 19:56:38.441 - Waiting on SetStill...
    2022-05-29 19:56:38.441 - Controller::RunCanonBuffer called AddStopReportRequest() RunCanon.cpp:88
    2022-05-29 19:56:38.441 - Requesting a stopped report for axis 0 motors.
    2022-05-29 19:56:38.441 - Requesting a stopped report for motor 0.
    2022-05-29 19:56:38.441 - Requesting a stopped report for axis 2 motors.
    2022-05-29 19:56:38.441 - Requesting a stopped report for motor 2.
    2022-05-29 19:56:38.441 - [PoKeys] [msg] PluginInstanceProcessAsyncMsg mInst = 0, msg = MSG_CHANGE_TOOL_DONE (1001), wparam = 1, lparam = 0


    2022-05-29 19:56:38.441 - [PoKeys] [msg] PluginInstanceProcessAsyncMsg mInst = 0, msg = MSG_CHANGE_TOOL_DONE (1001), wparam = 1, lparam = 0


    2022-05-29 19:56:38.441 - [PoKeys] [msg] PluginInstanceProcessAsyncMsg mInst = 0, msg = MSG_SPINDLE_CHANGED (1023), wparam = 0, lparam = 300


    2022-05-29 19:56:38.441 - [PoKeys] [msg] PluginInstanceProcessAsyncMsg mInst = 0, msg = MSG_SPINDLE_CHANGED (1023), wparam = 0, lparam = 300


    2022-05-29 19:56:38.443 - Step&Dir Spindle Direction: 0 RPM: 300.000
    2022-05-29 19:56:38.443 - [PoKeys] EX_STOP_REQ received for motor 0 - queuing at 112 (move 220738)
    2022-05-29 19:56:38.443 - [PoKeys] EX_STOP_REQ received for motor 2 - queuing at 32 (move 220738)
    2022-05-29 19:56:38.568 - API: mcMotionSetStill(inst = 0, motor = 0) (unknown caller)
    2022-05-29 19:56:38.568 - [PoKeys] Reporting motor 0 stopped (queued request) - delay of 1 slots stop=112 dev=112
    2022-05-29 19:56:38.571 - API: mcMotionSetStill(inst = 0, motor = 2) (unknown caller)
    2022-05-29 19:56:38.571 - All motors marked as still.
    2022-05-29 19:56:38.571 - [PoKeys] Reporting motor 2 stopped (queued request) - delay of 4 slots stop=32 dev=32
    2022-05-29 19:56:38.571 - Waiting on SetStill is Done!
    2022-05-29 19:56:38.573 - [PoKeys] [msg] PluginInstanceProcessAsyncMsg mInst = 0, msg = MSG_SPINDLE_CHANGED (1023), wparam = 1, lparam = 300


    2022-05-29 19:56:38.573 - Signal id 1142, (Spindle Fwd), changed from LOW to HIGH.
    2022-05-29 19:56:38.574 - Signal id 1141, (Spindle On), changed from LOW to HIGH.
    2022-05-29 19:56:38.574 - [PoKeys] [msg] PluginInstanceProcessMsg mInst = 0, msg = MSG_IO_CHANGED (1012), wparam = 151394920, lparam = 1


    2022-05-29 19:56:38.574 - Waiting for spindle at speed and stable... Spindle.cpp:269
    2022-05-29 19:56:38.574 - Step&Dir Spindle Direction: 1 RPM: 300.000
    2022-05-29 19:56:38.832 - Waiting for spindle stable DONE Spindle.cpp:274
    2022-05-29 19:56:38.835 - Waiting on SetStill...
    2022-05-29 19:56:38.927 - Controller::RunCanonBuffer called AddStopReportRequest() RunCanon.cpp:88
    2022-05-29 19:56:38.927 - Requesting a stopped report for axis 0 motors.
    2022-05-29 19:56:38.927 - Requesting a stopped report for motor 0.
    2022-05-29 19:56:38.927 - Requesting a stopped report for axis 2 motors.
    2022-05-29 19:56:38.927 - Requesting a stopped report for motor 2.
    2022-05-29 19:56:38.927 - [PoKeys] EX_STOP_REQ received for motor 0 - queuing at 32 (move 221224)
    2022-05-29 19:56:38.927 - [PoKeys] EX_STOP_REQ received for motor 2 - queuing at 32 (move 221224)
    2022-05-29 19:56:38.930 - [PoKeys] EX_STOP_REQ received for motor 0 - queuing at 32 (move 221225)
    2022-05-29 19:56:38.930 - [PoKeys] EX_STOP_REQ received for motor 2 - queuing at 32 (move 221225)
    2022-05-29 19:56:39.052 - API: mcMotionSetStill(inst = 0, motor = 2) (unknown caller)
    2022-05-29 19:56:39.052 - [PoKeys] Reporting motor 2 stopped (queued request) - delay of 0 slots stop=32 dev=32
    2022-05-29 19:56:39.058 - API: mcMotionSetStill(inst = 0, motor = 2) (unknown caller)
    2022-05-29 19:56:39.058 - [PoKeys] Reporting motor 2 stopped (queued request) - delay of 1 slots stop=32 dev=32
    2022-05-29 19:56:39.096 - API: mcMotionSetStill(inst = 0, motor = 0) (unknown caller)
    2022-05-29 19:56:39.096 - All motors marked as still.
    2022-05-29 19:56:39.096 - [PoKeys] Reporting motor 0 stopped (queued request) - delay of 44 slots stop=32 dev=32
    2022-05-29 19:56:39.096 - Waiting on SetStill is Done!
    2022-05-29 19:56:39.101 - API: mcMotionSetStill(inst = 0, motor = 0) (unknown caller)
    2022-05-29 19:56:39.101 - All motors marked as still.
    2022-05-29 19:56:39.101 - [PoKeys] Reporting motor 0 stopped (queued request) - delay of 45 slots stop=32 dev=32
    2022-05-29 19:56:39.107 - Waiting on SetStill...
    2022-05-29 19:56:39.107 - Controller::RunCanonBuffer called AddStopReportRequest() RunCanon.cpp:88
    2022-05-29 19:56:39.107 - Requesting a stopped report for axis 0 motors.
    2022-05-29 19:56:39.108 - Requesting a stopped report for motor 0.
    2022-05-29 19:56:39.108 - Requesting a stopped report for axis 2 motors.
    2022-05-29 19:56:39.108 - Requesting a stopped report for motor 2.
    2022-05-29 19:56:39.111 - [PoKeys] EX_STOP_REQ received for motor 0 - queuing at 32 (move 221402)
    2022-05-29 19:56:39.111 - [PoKeys] EX_STOP_REQ received for motor 2 - queuing at 32 (move 221402)
    2022-05-29 19:56:39.236 - API: mcMotionSetStill(inst = 0, motor = 0) (unknown caller)
    2022-05-29 19:56:39.236 - [PoKeys] Reporting motor 0 stopped (queued request) - delay of 1 slots stop=32 dev=32
    2022-05-29 19:56:39.239 - API: mcMotionSetStill(inst = 0, motor = 2) (unknown caller)
    2022-05-29 19:56:39.239 - All motors marked as still.
    2022-05-29 19:56:39.239 - [PoKeys] Reporting motor 2 stopped (queued request) - delay of 4 slots stop=32 dev=32
    2022-05-29 19:56:39.239 - Waiting on SetStill is Done!
    2022-05-29 19:56:39.333 - [PoKeys] Threading
    2022-05-29 19:56:39.464 - [PoKeys] Waiting for the buffer to flush
    2022-05-29 19:56:39.511 - [PoKeys] Start threading!
    2022-05-29 19:56:39.522 - [PoKeys] Trigger armed for threading
    2022-05-29 19:56:55.557 - [PoKeys] [msg] PluginInstanceProcessAsyncMsg mInst = 0, msg = MSG_GUI_FOCUS (1030), wparam = 0, lparam = 0

  2. #2
    Registered
    Join Date
    Mar 2014
    Posts
    1092

    Re: Servo lathe spindle + Mach4 threading problem

    I got a response from Polabs.

    Hi, Suat
    Unfortunately, step/dir driven spindles are not supported by the PoKeys device during threading cycle. During normal operation, all axes are fed by a constant flow of position references and at the moment of waiting for the threading trigger, the flow is stopped, which stops the spindle as well. Alternatively, threading can be executed as a CAM operation instead of G-code operation.
    This is disappointing because all that trouble on getting the servo running was for nothing. Now I need to switch to velocity mode.

Similar Threads

  1. Mach4 CNC EtherCAT AC Servo Motors 750W and Spindle Control
    By automationtechinc in forum Automation Technology Products
    Replies: 0
    Last Post: 02-17-2022, 04:44 PM
  2. Anyone using G76 threading under Mach4
    By Dragon8 in forum Mach Lathe
    Replies: 0
    Last Post: 06-15-2020, 08:38 AM
  3. Lathe Threading problem/question
    By Beansdiesel in forum BobCad-Cam
    Replies: 6
    Last Post: 01-31-2016, 10:44 PM
  4. Threading problem Haas SL10 lathe
    By christopher_s in forum General MetalWork Discussion
    Replies: 1
    Last Post: 10-11-2014, 05:50 PM
  5. Replies: 9
    Last Post: 05-13-2013, 04:14 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •