Journeyman 325 retrofit


Page 1 of 2 12 LastLast
Results 1 to 20 of 32

Thread: Journeyman 325 retrofit

  1. #1
    Member
    Join Date
    Feb 2011
    Location
    USA
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default Journeyman 325 retrofit

    Gentlemen,

    I have been working for a week or so on converting my Tree Journeyman 325 Mill with Kflop / Kanalog.
    So far everything is going well, I have all of the functions working with the relay outputs and switches detected by the opto inputs.
    The DAC outputs seem to work fine and correctly operate the servo and spindle inputs.

    I have connected my differential 5v encoders X, Y, Z, Spindle to the Kanalog channels 0, 1, 2, 3 respectively.
    I have the A+, A-, B+, and B- terminals on the corresponding terminals of Kanalog.
    On the X axis, the Axis screen count would not change, until I reversed the polarity of the encoder inputs.
    - is tied to + on the board and vice versa. The X axis did not read otherwise.

    On performing the same test with the Y axis, I have tried it both ways and still it does not work.
    Some configurations will count 4x greater in one direction, and 1/4 as much in the opposite direction.
    I have connected an oscilloscope to both channels of the encoder wires alone, and can see a 5v quadrature signal with the polarity I expected.

    I'm not sure how to proceed here. Are the gain and offset settings necessary?

    Similar Threads:


  2. #2
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    Reversing the polarity shouldn't have any effect other than reversing the count direction, depending on if you swapped a single or both pairs.

    Have you configured the channel inputs on the Config&Flash screen, and uploaded the settings to the KFlop?
    I don't think encoder inputs will show on the Axis screen until the Channel has been configured to tell the KFlop there is an encoder linked to that channel.

    In Analog output, I don't think the gain setting is needed, as I'm sure it's only for step/dir outputs where you may need a ratio between input/output steps.
    Offset may be needed, however as long as you're servos don't move at 0V, then you shouldn't, as the closed loop should handle things.



  3. #3
    Member
    Join Date
    Feb 2011
    Location
    USA
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    m_c

    Thanks for the reply,

    I agree with you about the direction. The X encoder would not read, so I reversed the polarity of both pairs. This way it worked, the other way did not. I don't know why.
    It would seem that the switching threshold in Kanalog must be slightly negative, so that reversing the polarity crossed it.

    Doing this for the Y channel however, did not make it work.

    Yes, I did configure each channel in the config screen and download to the Kflop board.

    It seems to me that an offset of 0 would be best, as the signals swing from +5 to -5.
    I was referring to the input gain and offset, not the output.
    Not sure if the offset is in volts, or percentage, or what. It doesn't say V on the screen.

    Thanks,
    Rick



  4. #4
    Member
    Join Date
    Feb 2011
    Location
    USA
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    After thinking about this a bit more, It occurred to me that the signals on the scope did not look differential.
    They did not swing from +5 to -5, but from +5 to ground, although the encoder signals do have a pair for each channel.

    Is there a way to use this with the Kanalog inputs, or should I build a differential conversion circuit?

    Rick



  5. #5
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    Encoder differential signals don't actually drop below 0V. Referenced to 0V, they should switch from roughly 0.5V to over 2.5V. 2.5V is the minimum, but a 5V encoder should manage around 4V unless there's a long cable and/or the receiver end is drawing more current.
    The only time you'd get a negative voltage is if you are measuring between the main and compliment on each channel (would show as a mirrored square wave on a scope).

    What kind of waveform do you get if you scope each pair?
    I'd try scoping each wire with them attached to the Kanalog, and make sure you have the correct pairs (differential waveform) together, and you're getting a quadrature signal between the A and B wires (it shouldn't matter what A or B wire you scope, you should still get the same pattern, just possibly reversed).



  6. #6
    Member
    Join Date
    Feb 2011
    Location
    USA
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    I measured the signals relative to each - encoder output, not DC gnd.
    Relative to DC ground, the + output goes from gnd to +5. The - output stays at gnd relative to gnd.
    Therefore I think the outputs are single ended even though they do have a + and - for each channel.

    I would expect a differential output to swing from +5 to -5 on the scope, relative to the - differential output.
    It's not negative with respect to DC GND, but the negative and positive terminals should change polarity.

    Rick



  7. #7
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    Certainly sounds like you've not got the compliment signals.

    Depending on the encoder, it may be possible to dismantle it and add the compliment signals. I know from past experience, some encoder manufacturers just cut/don't connect the compliment signals internally, with the actual hardware being identical between single ended/line driven output encoders.



  8. #8
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    Hi Rick,

    I agree both the + and - signals need to be driven from 0.5V to 2.0v (or more) for it to be a differential signals.


    Another option might be to add a differential line driver module at the encoder. Such as:

    https://cnc4pc.com/differential-line-driver.html

    Regards

    Regards
    TK http://dynomotion.com


  9. #9
    Member
    Join Date
    Feb 2011
    Location
    USA
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    I built a board to use a 74hc14 to invert the + side of each channel to generate the - side. It looks like this works fine with the differential inputs.

    Couple of other questions:

    1. I have an external MPG that I would like to connect. The outputs of this are differential, so that will be channel 3 on the KANALOG board. The MPG also has 7 other outputs which indicate the scale and axis. These signals are switch contacts, so they can be any voltage. Where do you recommend I connect these?

    2. I also have 4 pushbutton switches mounted to my new front panel. These will duplicate the on screen buttons for start, reset, stop, and motion stop. I was considering using an arduino board to have these emulate a USB keyboard with the appropriate keys, but would there be an advantage to wiring them directly to KFLOP or KANALOG? My KANALOG opto inputs are already used up.

    Thanks,
    Rick



  10. #10
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    Hi Rick,

    1. I have an external MPG that I would like to connect. The outputs of this are differential, so that will be channel 3 on the KANALOG board. The MPG also has 7 other outputs which indicate the scale and axis. These signals are switch contacts, so they can be any voltage. Where do you recommend I connect these?
    KFLOP JP4 and JP5 have 3.3V I/O with 150ohm pull down resistors. Switching those to 3.3V is one possibility.

    2. I also have 4 pushbutton switches mounted to my new front panel. These will duplicate the on screen buttons for start, reset, stop, and motion stop. I was considering using an arduino board to have these emulate a USB keyboard with the appropriate keys, but would there be an advantage to wiring them directly to KFLOP or KANALOG? My KANALOG opto inputs are already used up.
    I think it is better to connect directly to KFLOP/Kanalog for things like feedhold. In that case any PC/Windows/USB delays can be eliminated.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  11. #11
    Member
    Join Date
    Feb 2011
    Location
    USA
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    I think I have a handle on the axis tuning now.
    The encoders yield 20,000 counts per inch on the X axis.
    The maximum velocity looks good at 60,000 counts per second.
    Maximum Velocity, acceleration, and Jerk are set.

    I'm not too clear on how to set the following error.
    Is this error per unit time, per move, or cumulative?

    Does anyone have suggestions on tuning a bit more?

    I have no filters set up, but the output curve doesn't seem to need it.

    Thanks,
    Rick


    Attachment 341568
    Attachment 341570
    Attachment 341572
    Attachment 341568



  12. #12
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    Hi Rick,

    To set the Max Following Error use the Step Response Screen to Plot Following Error for all your normal move types, sizes, and speeds. Then set the Max Following Error to a number slightly larger than the largest Following Error the occurs normally. The units are Encoder Counts. If the difference between the target Destination and the actual Position ever differs by more than that amount for even an instant the Axis will be disabled.

    For some reason your attachments didn't post properly. Please try attaching them again.

    Regards

    Regards
    TK http://dynomotion.com


  13. #13
    Member
    Join Date
    Feb 2011
    Location
    USA
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    Journeyman 325 retrofit-x-axis-setup-jpgJourneyman 325 retrofit-x-axis-tuning1-jpgJourneyman 325 retrofit-x-axis-vel-output-vs-time-jpgJourneyman 325 retrofit-x-axis-pos-error-jpg

    Second try with attachments...



  14. #14
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    Hi Rick,

    500 counts of error would be 500/20000 = 0.025 inches. I would expect you can do better. What are your requirements? Under what conditions?

    You might add a 2nd order Low pass Filter as the last IIR Filter of 500Hz Q1.4. Then see if you can increase D gain and P gains for less error.

    You might add some I Gain. You will want to increase the Max I to 2000 as well.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  15. #15
    Member
    Join Date
    Feb 2011
    Location
    USA
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    Tom,

    Thanks for the info.

    It's been a couple of decades since my study of S and Z domain math, FIR and IIR filters, so I'm a little rusty.
    I will never forget the brilliance and elegance of Maxwell though.

    Anyway, I implemented the filter as you suggested.
    I have tested numerous values of P, I, and D terms to try and reduce the position error.
    Increasing the P term beyond 4 to 5 results in increased ringing of the output with no benefit to the error. 4 seems to be the highest value for smooth response.
    The D coefficient seems to do very little. Increasing this term above 2 results in an offset between the output 0 and the position 0. I'm not sure if this is a problem or not.
    Adding Integral value seems to only cause more oscillation. I began with 0.0001 and increased. Higher values just oscillate more.

    Adjusting the feed forward values seem to have the biggest impact on reducing the position error.
    I have moved these each up and down. I think I've got the optimum values here.
    The position error is now around 100, instead of 500. Please give me some suggestions on reducing this further.
    100/20,000 = 0.005". If I understand this correctly, this will be 5 mils off during a move at maximum speed?

    As for requirements and conditions, The original controller claimed to be accurate to 0.0001".
    As this is my first and only CNC milling machine, I'm don't know what's normal, but I'd like to get it into a normal range for a good mill.

    Journeyman 325 retrofit-x-axis-pos-error-jpgJourneyman 325 retrofit-x-axis-pos-error-2-jpg



  16. #16
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    Hi Rick,
    Increasing the P term beyond 4 to 5 results in increased ringing of the output with no benefit to the error. 4 seems to be the highest value for smooth response.
    The D coefficient seems to do very little. Increasing this term above 2 results in an offset between the output 0 and the position 0. I'm not sure if this is a problem or not.
    D Gain should help you to increase P Gain with less ringing. D Gain usually needs to be 10-50X higher than the P Gain to have an effect. D Gain will add a dampening effect an will slow down the response (unlike P and I Gain where increasing gains will tend to make the response faster). At some point the D Gain will cause the system to go unstable. Find that point then back off. I don't understand what you mean about an offset. It isn't clear if you added the 2nd Order low Pass filter that I suggested in the last email. It is required to reduce spikes in the output caused by High D Gains.

    Adding Integral value seems to only cause more oscillation. I began with 0.0001 and increased. Higher values just oscillate more.
    Try lower values.

    Adjusting the feed forward values seem to have the biggest impact on reducing the position error.
    I have moved these each up and down. I think I've got the optimum values here.
    It usually best to turn FF off until the feedback gains are optimized. The problem with counting on FF to reduce error is that it is open loop. If anything changes (load, mass, friction, cutting forces) the errors will increase.

    The position error is now around 100, instead of 500. Please give me some suggestions on reducing this further.
    100/20,000 = 0.005". If I understand this correctly, this will be 5 mils off during a move at maximum speed?
    I think your calculations are correct. 60000 counts/sec / 20000 counts/inch = 3ips = 180ipm. At Rapid speeds 5 mills of error may not be an issue. You might test at your max cutting speeds.

    As for requirements and conditions, The original controller claimed to be accurate to 0.0001".
    That's very unlikely.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  17. #17
    Member
    Join Date
    Feb 2011
    Location
    USA
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    Thanks,

    I'll remove the feed forward values and tinker with the PID values some more. I wasn't aware that the D values should be that high.

    Do you have any ballpark targets that I should be trying to get with the following error?



  18. #18
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    Hi Rick,

    Its hard to put a number on error as it is dependent on your system's components and your optimization goals.

    As you can see the error peaks during acceleration. Your acceleration is somewhat high 30 in/sec2 ~ 0.08G. Reducing acceleration is likely to help accuracy while compromising productivity.

    I now notice you are saturating the amplifier (Green plot hits 2000 DAC Counts) during accelerations which is likely the major cause of error. Notice deceleration at the same rate causes little error. It may be that you can change settings in the Amplifier to get a larger range of power.

    Rapids can take advantage of limited Jerk vs the infinity like value you have specified. But that is only useful for rapids not feeds.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  19. #19
    Member
    Join Date
    Feb 2011
    Location
    USA
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    OK, I think I've got her now...

    As you suggested, I reduced the acceleration. This made a good reduction in the error.
    I also tried reducing the jerk until I could feel a difference in the motion, then raised it back some. This also reduced the error some more.
    Tweaking the feed forward velocity and acceleration down to the ten thousandth, made it even better.
    This error holds as I reduce the velocity from 60,000 to 10,000. Still has an error less than 2.
    This should equate to 0.0001 inch at 20,000 counts per inch.

    When the machine is actually milling, the speeds should be less than 10,000 per second.

    Journeyman 325 retrofit-x-axis-pos-error-3-jpg



  20. #20
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Journeyman 325 retrofit

    WOW!

    Regards
    TK http://dynomotion.com


Page 1 of 2 12 LastLast

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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Journeyman 325 retrofit

Journeyman 325 retrofit