Retrofit CNC to this saw with kflop?


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

Thread: Retrofit CNC to this saw with kflop?

  1. #1
    Member
    Join Date
    Apr 2007
    Location
    Canada
    Posts
    54
    Downloads
    0
    Uploads
    0

    Default Retrofit CNC to this saw with kflop?

    Hello,

    I've got a very old saw for cutting stone. It originally used steel cable with abrasive slurry. Since I've owned it I have converted it to use diamond wire and have the two motors running off of VFD's so I can control the speeds. The main motor that drives the wire is 10hp, the up/down motor is 0.75 hp going through a gear reduction and a winch... resulting in down feeds speeds of 12-36" per HOUR. I'll be adding a second axis (horizontal) soon and plan to use a similar setup to the down feed, 1 to 2 hp motor controlled by a VFD. Sort of like a foam wire saw.

    I'm new to CNC so trying to figure out if what I want to do is doable. Here is what I'd like to do:
    - Have 2 axis control, expandable to a third (rotating table), but even if I don't get the third axis just the two would be great.
    - I'd be happy with tolerances measured in mm... I'm cutting stone not building space craft.

    So my questions are:
    - The VFD that controls the down feed motor has inputs for speed (0-10v or 4-20mA). If I added a magnetic linear encoder that had the magnetic strip the length of the full axis travel, would that allow me to control the speed and positioning? Since I'm not using servo motors I'm fuzzy on this. Is the feedback sensor all that is needed for positioning?
    - Currently my down feed speed is manually set. The main motor that drives the cutting wire is controlled by a VFD, I can output the amp load to a 0-10v analog output... would like to use that as input into the feed speed (PID?)

    FWIW I'm a software developer (mainly C++) so if I have to I think I should be able to do any C programming needed.

    Here's a video of the saw in operation:


    Thanks for any pointers.
    Greg.

    Similar Threads:


  2. #2
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24216
    Downloads
    0
    Uploads
    0

    Default Re: Retrofit CNC to this saw with kflop?

    I assume from watching the video you just need straight point-to-point, non-interpolated positioning, and no fancy varying cut rates during operation?
    If so, a CNC control per-se may be overkill.
    If you obtain VFD's with encoder feedback and put scales such as Newall type for precise motion speed, and place hermetically sealed limit switches that can be set for cut limits, you could also place calibrated potentiometers on a control panel to set before each cut.
    That would be my interpretation on all you would need, unless I am missing something?
    Al.

    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  3. #3
    Member
    Join Date
    Apr 2007
    Location
    Canada
    Posts
    54
    Downloads
    0
    Uploads
    0

    Default Re: Retrofit CNC to this saw with kflop?

    Hi Al,
    Thanks for the reply. If I understand what you are suggesting, I'd only be able to make straight cuts on each of the two axis, so 90 degree cuts. While that would be a nice start, ideally I'm looking to be able to do more complex cuts.



  4. #4
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24216
    Downloads
    0
    Uploads
    0

    Default Re: Retrofit CNC to this saw with kflop?

    Quote Originally Posted by Greg9504 View Post
    The main motor that drives the wire is 10hp, the up/down motor is 0.75 hp going through a gear reduction and a winch... resulting in down feeds speeds of 12-36" per HOUR. I'll be adding a second axis (horizontal) soon and plan to use a similar setup to the down feed, 1 to 2 hp motor controlled by a VFD. Sort of like a foam wire saw.
    Greg.
    So I am assuming that the VFD's will control the wire speed and if the positioning motors are all around the .75hp then you could fit around the same size gear-reduced servo motors to each axis, Could then the VFD's be sensorless vector with simple manual pot adjust?
    Al.

    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


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

    Default Re: Retrofit CNC to this saw with kflop?

    Hi Greg,

    Really cool (and big) machine. By adding the linear scales I believe that would work. Of course you would need one for each axis. You could then configure the feedback loop such that the winch speeds would be varied to keep the measured axis position following the trajectory. Simple proportional (P) gain may work. As position error increases speed would increase. Probably a very low frequency low pass filter might be added to smooth out the commanded speed.

    Regards

    Regards
    TK http://dynomotion.com


  6. #6
    Member
    Join Date
    Apr 2007
    Location
    Canada
    Posts
    54
    Downloads
    0
    Uploads
    0

    Default Re: Retrofit CNC to this saw with kflop?

    Quote Originally Posted by Al_The_Man View Post
    So I am assuming that the VFD's will control the wire speed and if the positioning motors are all around the .75hp then you could fit around the same size gear-reduced servo motors to each axis, Could then the VFD's be sensorless vector with simple manual pot adjust?
    Al.
    Hi Al,

    I'm hoping to find a solution that allows me to use the existing motors/gearing I have for the axis drives. The 10hp motor that drives the wire is controlled now by a sensorless vector VFD, as is the down feed axis, and I have another VFD and gear motor for the horizontal axis which I'm adding now.



  7. #7
    Member
    Join Date
    Apr 2007
    Location
    Canada
    Posts
    54
    Downloads
    0
    Uploads
    0

    Default Re: Retrofit CNC to this saw with kflop?

    Quote Originally Posted by TomKerekes View Post
    Hi Greg,

    Really cool (and big) machine. By adding the linear scales I believe that would work. Of course you would need one for each axis. You could then configure the feedback loop such that the winch speeds would be varied to keep the measured axis position following the trajectory. Simple proportional (P) gain may work. As position error increases speed would increase. Probably a very low frequency low pass filter might be added to smooth out the commanded speed.

    Regards
    OK, that's reassuring. I assume the kflop with kanalog to get differential encoder support is the ideal option. Just one more question, as I've been reading up on encoders I see there are both incremental and absolute. Is it incremental I want?

    Now thinking of using a draw wire encoder for the vertical axis, as it moves up/down via cable and I may have troubles with the mounting of a magnetic strip encoder.



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

    Default Re: Retrofit CNC to this saw with kflop?

    Hi Greg,

    Yes KFLOP+Kanalog will provide the Analog Outputs and the differential encoder inputs.

    KFLOP only supports incremental encoders unless you do something custom. Incremental encoders require a home sequence or some way to set the current position where absolute encoders know where the axes are on power up. If you need to do something like manually zero at the top of the stock anyway I don't see where there would be a big advantage. Maybe if you need to power down mid way through and resume later.

    A draw wire encoder may work. I've never used them. Probably not as accurate but for your application it might be the right choice.

    Regards

    Regards
    TK http://dynomotion.com


  9. #9
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24216
    Downloads
    0
    Uploads
    0

    Default Re: Retrofit CNC to this saw with kflop?

    Quote Originally Posted by Greg9504 View Post
    Now thinking of using a draw wire encoder for the vertical axis, as it moves up/down via cable and I may have troubles with the mounting of a magnetic strip encoder.
    I have used these to synchronize four jacks required to lift box cars, they were quite successful, this is a link to the type I used but not the actual make.
    https://www.posital.com/en/products/...technology.php
    I also think it may be the answer to your project.
    Al.

    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  10. #10
    Member
    Join Date
    Apr 2007
    Location
    Canada
    Posts
    54
    Downloads
    0
    Uploads
    0

    Default Re: Retrofit CNC to this saw with kflop?

    OK ebay has been kind to me (I think). I've found a draw wire encoder with IP 65 protection, new and cheap with the following specs. Just looking to confirm this is an acceptable encoder? It's a TTL line driver at 5VDC. Only has 11.53 pulses/mm but again I'm not too concerned with accuracy, hoping that kflop/kanalog is indifferent to this, meaning you give it feedback with less resolution and you get less accurate machining... but there is no minimum resolution needed?

    Thanks again.
    Greg.

    measuring range 3000 mm,
    model P96,
    linearity +/- 0,02% FSO,
    incl. incremental encoder
    power supply 5 VDC,
    TTL, A,B,O and inverted,
    resolution 11,53 pulses/mm,
    protection class IP65

    Retrofit CNC to this saw with kflop?-drawwiresensor_2-jpg
    Retrofit CNC to this saw with kflop?-wds-3000-p96_1-jpg



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

    Default Re: Retrofit CNC to this saw with kflop?

    Hi Greg,

    That encoder should be compatible. There is no minimum resolution for KFLOP/Kanalog. But higher resolution helps the servo loop to know the amount of error and the rate the error is changing more precisely.

    Good luck,
    regards

    Regards
    TK http://dynomotion.com


  12. #12
    Member
    Join Date
    Apr 2007
    Location
    Canada
    Posts
    54
    Downloads
    0
    Uploads
    0

    Default Re: Retrofit CNC to this saw with kflop?

    OK it's been a year and I've made enough progress to now want to go ahead with this. Last year I did purchase the draw string encoders I linked to above. I've added my second axis (details below if you are really interested). So I just have a few questions about power supplies, cabling, and distance to my differential encoders:

    Power supplies
    - I need 5VDC for Kflop, from wiki an old PC power supply should do the trick.
    - I need 5VDC to power the differential encoders. Should I power the encoders from JP8 pins 13-16(as shown here)? The specs for the encoders say each has <20mA load, so 40mA max for both. The linked doc says max of 100mA, so should be OK. There is a slight catch, see below about distance to encoders.

    Cabling/Distance
    - Any recommendations for cabling from Kanalog to the encoders? Outdoor rated cat6? The distance from where kflop/Kanalog will be and the encoders are ~ 35', and second ~ 50'. Are there problems having the differential encoders mounted that far away from kflop/kanalog?

    That's it for now. Thanks.

    2nd Axis Configuration for those that are interested:
    Despite being a bunch of junkyard material, the horizontal axis seems to work well and moves effortlessly considering the load (tested at 12000lbs on the cart). The horizontal axis uses part of an old automotive lift (Hofmann model Duolift-GE with 6500 lb capacity), the lift uses a 44mm acme screw with 7mm pitch, has a plastic nut. I need to be able to run the axis really slow, 8" to 60" per HOUR. So I picked up a 1/8 hp motor with a 900:1 gear reduction on it. However this means that moving the cart for positioning the stone prior to cutting is slow. I'm using the VFD to over speed the motor to 7200 RPM, which gives me a positioning speed of 4" per minute. Still slow but workable. The gearmotor is rated to 3600 rpm, I only need to run above that for short times.

    Couple of pictures, and video


    Attached Thumbnails Attached Thumbnails Retrofit CNC to this saw with kflop?-sawrailandtrolley_005-jpg   Retrofit CNC to this saw with kflop?-sawrailandtrolley_012-jpg   Retrofit CNC to this saw with kflop?-sawrailandtrolley_013-jpg  


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

    Default Re: Retrofit CNC to this saw with kflop?

    Hi Greg,

    Amazing machine.

    I need 5VDC for Kflop, from wiki an old PC power supply should do the trick.
    A PC Power supply may work but usually isn't the best choice because it is designed for much higher power (ie 300W vs 10W) and usually isn't isolated from earth GND. Consider a small, regulated, isolated 10W 5V power supply that usually costs around $10.

    I need 5VDC to power the differential encoders. Should I power the encoders from JP8 pins 13-16(as shown here)? The specs for the encoders say each has <20mA load, so 40mA max for both. The linked doc says max of 100mA, so should be OK.
    That should be ok

    Any recommendations for cabling from Kanalog to the encoders? Outdoor rated cat6? The distance from where kflop/Kanalog will be and the encoders are ~ 35', and second ~ 50'. Are there problems having the differential encoders mounted that far away from kflop/kanalog?
    That distance should be usable with differential signals. Make sure to use twisted pairs for each differential signal pair. The wire should be shielded with the shield connected to Kanalog DC GND on the Kanalog end only. Kanalog has moderate termination resistance across the + to - signals on board of 400 ohms. You might want to add additional termination of 180ohms.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  14. #14
    Member
    Join Date
    Apr 2007
    Location
    Canada
    Posts
    54
    Downloads
    0
    Uploads
    0

    Default Re: Retrofit CNC to this saw with kflop?

    Hi,
    OK I have finally got around to trying this on one axis... I think I have a fundamental misunderstanding somewhere with respect to V, A, J and counts, or perhaps the axis moves too slow to get enough information in 3.5 seconds to tune it. Any suggestions appreciated.

    I used this thread here Anilam/ supermax Frankenstein, along with the Wiki as a guide for the steps to take to get an axis up and going.

    I can use the console and issue DAC0 commands and they work as they should (DAC0=-2048 gives me full speed on the motor, DAC0=0 gives 0rpm, and DAC0=2047 gives full speed in opposite direction).

    On the Axis screen Position counts up and down the expected amount, if the axis moves 10mm I get 10mm of counts.

    VFD motor configuration:
    - VFD reference is Analog input in "Joystick mode", which means it accepts -10v to +10v. The analog input is connected to Kanalog DAC0.
    - The VFD gives the user control over acceleration and deceleration times, I have set the acc time to 0.1 second (I've tried 0.5 sec and 1 sec), the acceleration ramp is set to linear. I've used the console screen to test issuing a command -2048 waiting a bit then back to 2047, the response seems reasonable, there are no long delays.

    Based on the what the VFD is telling me the motor is responding well and I'm not see anything that indicates 1 sec to accelerate isn't happening. When I issue a DAC0=-2047 command I see the counts on the axis screen appear to start instantly.
    - Max RPM is 3600.

    The Mechanical configuration:
    - 7mm lead screw
    - 900:1 gear reduction
    - 19:36 chain drive ratio
    - Final ratio = 475:1
    - 3600 rpm @ motor = 7.58 rpm @ screw

    7mm pitch screw, linear distance = 7mm/rev x 7.58rev/min = 53.05mm/min

    Encoder:
    My encoders spec says 11.53 pulses per mm, this seems to equate to ~46.12 counts/mm (11.53 x4) as shown on the Axis Position screen. ie If I zero the axis, then move the axis 10mm and I see approx 461 counts.

    Initial V,A, J settings:
    Velocity setting:
    53.05mm/min / 60secs/min * 46.12 counts/mm = 40.78 counts/sec

    Acceleration setting:
    I've used 1 second for full acceleration as a starting point, so that should mean 40.78 counts/sec2.

    Jerk setting:
    10x acceleration as a start = 400 counts/sec2


    When I start with this with a P of 1 I see very small values being sent to the DAC. I figured it would go right to 2047, changing A and J didn't seem to make a difference until I put the P way up.

    Not really knowing better I've messed around to try to get it to do a move of 10 counts. Since that is about what the system can do 3.5 seconds.

    And it doesn't look pretty, but it at least ends up where it started.
    Attached are screen shots of the plots plus the data.
    I could configure the VFD to run the motor at a max of 7600 RPM (double the current speed) as I've tested it that high, but I would never be cutting at those speeds. But if it would help I can do it.
    Any help appreciated.

    Attached Thumbnails Attached Thumbnails Retrofit CNC to this saw with kflop?-c_p_o_vs_time-png   Retrofit CNC to this saw with kflop?-pe_o_vs_time-png   Retrofit CNC to this saw with kflop?-firstattempt-jpg   Retrofit CNC to this saw with kflop?-xaxis_encoder_006-jpg  

    Retrofit CNC to this saw with kflop?-xaxis_encoder_007-jpg   Retrofit CNC to this saw with kflop?-xaxis_encoder_003-jpg  
    Attached Files Attached Files


  15. #15
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24216
    Downloads
    0
    Uploads
    0

    Default Re: Retrofit CNC to this saw with kflop?

    Quote Originally Posted by Greg9504 View Post


    Cabling/Distance
    - Any recommendations for cabling from Kanalog to the encoders? Outdoor rated cat6? The distance from where kflop/Kanalog will be and the encoders are ~ 35', and second ~ 50'. Are there problems having the differential encoders mounted that far away from kflop/kanalog?
    My choice is Belden 9891 for encoder cable, it is hard to buy in short lengths and expensive, but is has 4 twisted pairs, each pair individually shielded with a overall braid shield. One pair is larger gauge for the power.
    I earth ground my supplies for equi-potential bonding and noise reduction.
    I wouldn't use a PC. P.S. if I were you.
    Al.

    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


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

    Default Re: Retrofit CNC to this saw with kflop?

    Hi Greg,

    I think you are right the machine is so slow that it may be difficult to tune with the 3.5 second max capture rate of the Step Response Screen. For longer times you can capture data to a disk file with a User Program and plot it with something like Excel. See the example CaptureXYMotionPosDest.c.

    From the plots you can see ~1 sec delay between when the output (green) changes until rate of the position (red) starts to show the commanded speed. Possibly due to all the backlash in the system?

    If you did a move of like 40 counts you might see the response to a motion in one direction. But overall it looks to me like it might meet your needs as is.

    With only a P gain of 170 this means that if the Output needs to be at 1700 DAC counts to move at the commanded speed then a steady state position error of 10 counts will be required to get the necessary output. If this is a problem then a tiny amount of I Gain could be used to drive the steady state error to zero over a period of say 10 seconds.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  17. #17
    Member
    Join Date
    Apr 2007
    Location
    Canada
    Posts
    54
    Downloads
    0
    Uploads
    0

    Default Re: Retrofit CNC to this saw with kflop?

    Hi,

    Thanks for the feedback. Yes I'm seeing around 0.7s of delay, I'm not sure if there is much I can do about it. The chain is probably a little lose but not sure if that contributes to the delay.

    I played around a bit more and yes giving it larger counts it does move and come back. Here is a video showing a 30mm move with a ruler, there is a bit of hunting when it returns to 0 (30cm on the ruler), perhaps overshooting by 1/2mm then hunting (my video is not the most accurate method of measuring). I did set deadband range to 4 but left the gain at 1, I'll trying lowering the dead band gain... I assume that is what I should be using to help with the hunting?



    For longer times you can capture data to a disk file with a User Program and plot it with something like Excel. See the example CaptureXYMotionPosDest.c.
    I think I would like to try this, just to get a better idea how things are behaving. After I configured the user program (I haven't looked at running the any C code yet), it will run when I use the move command in the step response screen?

    With only a P gain of 170 this means that if the Output needs to be at 1700 DAC counts to move at the commanded speed then a steady state position error of 10 counts will be required to get the necessary output. If this is a problem then a tiny amount of I Gain could be used to drive the steady state error to zero over a period of say 10 seconds.
    I'm not sure I follow this. Need to think about it some...

    One interesting thing I just tried, I set the VFD up to allow a max speed of 7200 RPM, then only changed the V setting (doubling it to 80). Movement became very unstable. It just continually overshot and hunted back and forth by large amounts. I just went back to max RPM of 3600 and V of 40 instead of trying to make it work. On edit... ok just read what you wrote in the referenced thread above about P gain:

    With a P gain of 1 a change of 1 encoder count will change the DAC output by 1 DAC count (small voltage). With a P Gain of 10 a change of 1 encoder count will change the DAC output by 10 DAC Counts (bigger voltage). So the chances that the system will be able to come to a balance and "sit still" is less.
    So since I increased the max speed of the VFD, with the higher max speed each DAC count results in greater speed change. If I increase the max speed I should decrease the gain. And the reason I needed so much P gain to begin with is because I have relatively low encoder counts compared to typical systems. Now I understand why when I first started to test I was seeing very small DAC output (was using very low gain).


    Eventually my goal is to be able to cut shapes out, like letters. From what you see so far does it look like this is going to work? It will just be 2 axis, the other axis uses the same encoder.

    Thanks.

    Last edited by Greg9504; 08-01-2016 at 11:31 PM.


  18. #18
    Member
    Join Date
    Apr 2007
    Location
    Canada
    Posts
    54
    Downloads
    0
    Uploads
    0

    Default Re: Retrofit CNC to this saw with kflop?

    Quote Originally Posted by Al_The_Man View Post
    My choice is Belden 9891 for encoder cable, it is hard to buy in short lengths and expensive, but is has 4 twisted pairs, each pair individually shielded with a overall braid shield. One pair is larger gauge for the power.
    I earth ground my supplies for equi-potential bonding and noise reduction.
    I wouldn't use a PC. P.S. if I were you.
    Al.
    Thanks Al, I ended up finding some CAT 7 cable on ebay, turns out it is made (or at least warehoused) here in Ottawa. It has a fully braided shield, each pair foil wrapped, drain wire, and is rated for outdoor use. Hyperline | Shielded Twisted Pair Cable (SSTP), Category 7 (600 MHz), 4 pairs, Solid, Outdoor, 23 AWG, FR-PVC - Hyperline it does use solid core wire, so probably not good for something that is in motion.

    I'm using Lumberg 0322 and 0332 series connectors, shielded and IP68 rated, https://ca-en.alliedelec.com/lumberg-0322-07/70151640/

    The power supply is a DIN rail 5VDC 3A, https://ca-en.alliedelec.com/mean-we...20-5/70293828/

    Hopefully the wires and power supply should be good for keeping interference a non issue.



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

    Default Re: Retrofit CNC to this saw with kflop?

    Hi Greg,

    I played around a bit more and yes giving it larger counts it does move and come back. Here is a video showing a 30mm move with a ruler, there is a bit of hunting when it returns to 0 (30cm on the ruler), perhaps overshooting by 1/2mm then hunting (my video is not the most accurate method of measuring). I did set deadband range to 4 but left the gain at 1, I'll trying lowering the dead band gain... I assume that is what I should be using to help with the hunting?
    Its hard to say how much of the hunting is caused by the backlash or by the servo being somewhat unstable. I suspect the 900:1 gear reduction amplifies any backlash in the gears. Adding deadband should help. Using a deadband gain of 1 will not act any different than with no deadband range so try a small gain of 0.1 or 0.

    I'm not sure I follow this. Need to think about it some...

    One interesting thing I just tried, I set the VFD up to allow a max speed of 7200 RPM, then only changed the V setting (doubling it to 80). Movement became very unstable. It just continually overshot and hunted back and forth by large amounts. I just went back to max RPM of 3600 and V of 40 instead of trying to make it work. On edit... ok just read what you wrote in the referenced thread above about P gain:
    Changing the VFD range doubled the loop gain. So you might have reduced the P gain by 1/2 to get similar dynamic response.

    So since I increased the max speed of the VFD, with the higher max speed each DAC count results in greater speed change. If I increase the max speed I should decrease the gain. And the reason I needed so much P gain to begin with is because I have relatively low encoder counts compared to typical systems. Now I understand why when I first started to test I was seeing very small DAC output (was using very low gain).
    Yes I believe that is exactly correct. Again some small amount of I gain usually works well in slow systems like this to drive the error near zero.

    Eventually my goal is to be able to cut shapes out, like letters. From what you see so far does it look like this is going to work? It will just be 2 axis, the other axis uses the same encoder.
    I would think so. How big would the letters be? What precision would you expect?

    Regards

    Regards
    TK http://dynomotion.com


  20. #20
    Member
    Join Date
    Apr 2007
    Location
    Canada
    Posts
    54
    Downloads
    0
    Uploads
    0

    Default Re: Retrofit CNC to this saw with kflop?

    I would think so. How big would the letters be? What precision would you expect?
    I'm hoping for +/- a mm say in a cutting a letter that is 150mm high... I would like to be able to cut much larger shapes too.

    When I saw the move of 300mm go out and return to 0 I figured that was good, but I guess there is more to it than that. Is the difference between the command and position what I see referred to as "following error" and is it that, that determines accuracy?

    I created a C program to log the data over a 300 count move. I've attached the program, and the output data. Can you verify what I've done for the move is similar to what is done on the Step Response screen. I have a delay after the first move, perhaps I shouldn't have that there. I should probably only write every 10th data point (or maybe even less)... as it's 244444 samples. Excel is a bit sluggish plotting the data.

    What I did was save the setup to an C program, load that in thread1, execute it, then loaded the move/log program in thread2 and execute it from within KMotion using the C Program window.

    The attached data and plot are not using any I gain yet. One other thing, the velocity that I'm testing at is the max speed for moving the stone into position (I guess this is called Jog), I would never cut at that velocity. Max cutting speed would be half. Should I try tuning with the Motion Profile - Velocity on the Step Response screen set to the lower cutting speed (20 counts/sec instead of 40 it is now)?

    Thanks again.

    Code:
    #include "KMotionDef.h"
    
    main()
    {	
    	double T0;
    	double* p = gather_buffer;
    			
    	int i,n_Samples = 20 / TIMEBASE;
    	printf("Gathering %d samples...\n",n_Samples);
    	gather.Inject = FALSE;	// Don't inject any Data anywhere
    
    	gather.list[0].type = GATHER_DOUBLE_TYPE;  
    	gather.list[0].addr = &ch0->Dest;
    
    	gather.list[1].type = GATHER_DOUBLE_TYPE; 
    	gather.list[1].addr = &ch0->Position;
    
    	gather.list[2].type = GATHER_FLOAT_TYPE; 
    	gather.list[2].addr = &ch0->Output;
    
    	gather.list[3].type = GATHER_END_TYPE;  
    	
            gather.bufptr = gather_buffer;//(double *)0xfffffffc;   // force more than endbuf    
    	gather.endptr = gather_buffer + 3 * n_Samples;
        
            printf("Zeroing axis\n");
            Zero(0);
    	printf("Starting move...\n");
    	TriggerGather();  // start capturing data	
            Delay_sec(0.2);	
    	MoveRel(0,300); // Start a motion
    	while (!CheckDone(0));
    	printf("First move complete.\n");
    	Delay_sec(0.2);
    	MoveRel(0,-300);
    	while (!CheckDone(0));
    	printf("Second move complete.\n");	
    	while (!CheckDoneGather()) ; // what till all captured
    	printf("Move and capture done, writing data to disk...\n");
    	Zero(0);
    	FILE *f=fopen("d:\\temp\\kflopdata.txt","wt");
    
    	
            if (f!=NULL)
    	{
    		//Sample,Time,Command,Position,Output
    		fprintf(f,"Sample,Command,Position,Output\n");
    		for (i=0; i<n_Samples; i++)
    		{
    			// round times to neaarest servo tick
    			//p[0] = ((int)(p[0]/TIMEBASE + 0.5))*TIMEBASE;
    			fprintf(f,"%d,%f,%f,%f\n",i,p[0],p[1],p[2]);
    			p += 3;
    		}
    		fclose(f);
    	}
    	else
    	{
    		printf("Error opening file.\n");
    	}
    	printf("Finished writing file.\n");
    	
    	
    }


    Attached Thumbnails Attached Thumbnails Retrofit CNC to this saw with kflop?-300countmovandreturnplot-jpg  
    Attached Files Attached Files
    Last edited by Greg9504; 08-04-2016 at 12:05 AM.


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

Retrofit CNC to this saw with kflop?

Retrofit CNC to this saw with kflop?