starting my C program, any guidance would be appreciated. - Page 6


Page 6 of 11 FirstFirst ... 3456789 ... LastLast
Results 101 to 120 of 215

Thread: starting my C program, any guidance would be appreciated.

  1. #101
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    252
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    I have gotten the break working, Thank you...

    I now have a question about calculating the Factor of my Spindle so I can use an axis for monitoring the RPM. The encoder I'm using is a BEI RIH 22 incremental encoder. It has a resolution of 2500 cycles, I guess that means counts per/rev? How do I calculate, whatever needs to be calculated, to update my C-program for the correct RPM?

    How do I also change the letter of the axis or insert a new window in screen editor. I watched the Youtube video of entering a new window to see real time feeds, but I couldn't catch how the window was actually put in.

    Attachment is encoder information.

    Attached Files Attached Files


  2. #102
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    I now have a question about calculating the Factor of my Spindle so I can use an axis for monitoring the RPM. The encoder I'm using is a BEI RIH 22 incremental encoder. It has a resolution of 2500 cycles, I guess that means counts per/rev? How do I calculate, whatever needs to be calculated, to update my C-program for the correct RPM?
    There are 4 quadrature transitions in a complete quadrature cycle. So that should be 10000 counts/rev. To verify rotate the spindle one rev and see how much the position changes. If you put 10000 in the KMotionCNC | Tool Setup | Trajectory Planner | Threading Screen KMotionCNC should display RPM correctly.


    How do I also change the letter of the axis or insert a new window in screen editor. I watched the Youtube video of entering a new window to see real time feeds, but I couldn't catch how the window was actually put in.
    Its not clear what you are trying to do. KMotionCNC will already display Spindle RPM.

    Regards
    TK http://dynomotion.com


  3. #103
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    252
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    Its not clear what you are trying to do. KMotionCNC will already display Spindle RPM.
    My spindle count on the A axis also, so I was hoping that I could change the letter to U and make it display the RPM so I can see better. I want to keep A axis free to add a rotary 4th axis later.



  4. #104
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    252
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by Gunmachinist View Post
    I now have a question about calculating the Factor of my Spindle so I can use an axis for monitoring the RPM. The encoder I'm using is a BEI RIH 22 incremental encoder. It has a resolution of 2500 cycles, I guess that means counts per/rev? How do I calculate, whatever needs to be calculated, to update my C-program for the correct RPM?
    This is what I'm confused about when determining my Factor in the c-code; if my encoder count/rev = 10000.
    Would determining the Factor in my C-code be (#define FACTOR (10000/60.0) //10000 counts/sec / 10000 counts/rev = 1 RPS = 60 RPM)?



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

    Default re: starting my C program, any guidance would be appreciated.

    My spindle count on the A axis also, so I was hoping that I could change the letter to U and make it display the RPM so I can see better. I want to keep A axis free to add a rotary 4th axis later.
    Its still not clear.


    This is what I'm confused about when determining my Factor in the c-code; if my encoder count/rev = 10000.
    Would determining the Factor in my C-code be (#define FACTOR (10000/60.0) //10000 counts/sec / 10000 counts/rev = 1 RPS = 60 RPM)?
    yes

    Regards
    TK http://dynomotion.com


  6. #106
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    252
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    Its still not clear.
    My spindle encoder will count on the A axis screen.

    I was want to change the rectangle in the upper left hand corner of the KmotionCNC screen which displays my spindle encoder counts to a U instead of an A.

    I want to make the "U" rectangle in the upper left corner, display the RPM's so I am able to see(visually) better, and I can get all the information I want in one glance without looking all over the screen (ie: X axis, Y axis, Z axis, and speed).

    I want to keep the "A" axis rectangle open to add a rotary 4th axis later.

    How do I insert a new window in screen editor. I watched the Youtube video of entering a new window to see real time feeds, but I couldn't catch how the window was actually inserted and saved.



  7. #107
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    There are 40 User Label Controls available for use. You can't create or insert them, rather you can Show them. You may need to increase the width of the main window and select Show Hidden to be be able to select and modify them. You can not alter the functionality of the main DROs with the Screen Editor.

    Regards
    TK http://dynomotion.com


  8. #108
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    252
    Downloads
    0
    Uploads
    0

    Unhappy re: starting my C program, any guidance would be appreciated.

    Did I just screw up my Kanalog? I had a problem getting my power supply to work all of my 3 air solenoids (even tho only one is active at a time). Original power supply was a 24v .3a so I connected a different power supply (24v 5a) to two of the solenoids. Now everything else still works except anything connected to JP8. I connected the white Neutral wire from power supply to JP6 GND, JP8 #7 to the neutral side of the solenoid, and the + side of the power supply to the + side of the solenoid. I understand that JP8 will only handle 1a but didn't think that the neutral side would supply that to Kanalog.

    Attached Thumbnails Attached Thumbnails starting my C program, any guidance would be appreciated.-jp8-png  


  9. #109
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    The 24V 5A supply should be ok and the wiring description sounds correct except your diagram shows #6 and #7 shorted together which I assume is not the case. Also the direction of the diodes is not shown. If the diode isn't pointing in reverse, from - to +, there could be damage.

    I assume you activated the outputs? 158 and 159?

    You might check with a voltmeter to see what is going on. Connect the black lead to Kanalog GND at Kanalog and check DC voltage at every other point.

    Regards
    TK http://dynomotion.com


  10. #110
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    252
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    The 24V 5A supply should be ok and the wiring description sounds correct except your diagram shows #6 and #7 shorted together which I assume is not the case.
    true, I have 2 air switches at the same location. I just forgot to separate the line.
    Quote Originally Posted by TomKerekes View Post
    Also the direction of the diodes is not shown. If the diode isn't pointing in reverse, from - to +, there could be damage.
    How do I determine that, is the grey facing the + or -?
    Quote Originally Posted by TomKerekes View Post
    I assume you activated the outputs? 158 and 159?
    Yes in the I/O screen. They all worked thursday last week but when I came back friday to continue, nothing.



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

    Default re: starting my C program, any guidance would be appreciated.

    How do I determine that, is the grey facing the + or -?
    Well it depends on the manufacturer of the diode. But most commonly the cathode has some type of a mark.


    starting my C program, any guidance would be appreciated.-diode-terminal-identification-anod-cathode-jpg

    You would want the cathode connected to the + side of the solenoid (in reverse) so it does not normally conduct current from the power supply but rather when the coil is trying to make a reverse voltage spark.

    An analogy I like is an inductor (any coil) is like the mass of a train. Voltage is like force on the train. Current flow is like the speed of the train. When the power supply is connected it is like applying a force to the train which gradually ramps up to speed. Without the diode, if the power supply is suddenly disconnected the current will instantly stop flowing. This is like stopping the train instantly. Which is like hitting a brick wall. Which creates an enormous reverse force (voltage). Which creates a spark. Adding a diode creates a path for the train to coast to a stop instead.

    Regards
    TK http://dynomotion.com


  12. #112
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    252
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Ok, that makes sense Ill check.



  13. #113
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    252
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    1 of the diodes were reversed and I can measure 24v from GRN to JP8.



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

    Default re: starting my C program, any guidance would be appreciated.

    That would be bad. That would allow the full power supply to flow through the diode and into JP8 with unlimited current. Likely blowing out either the diode or the Kanalog Driver.

    The original 0.3A supply might have been small enough not to cause any damage. But I don't see any way it could have worked.

    The JP8 outputs are supposed to "pull" the JP8 pin voltage from 24V down to close to 0V so the solenoid "sees" 24V and turns on. If it is not pulling the pin voltage down to 0V it is likely damaged.

    Regards
    TK http://dynomotion.com


  15. #115
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    252
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    The JP8 outputs are supposed to "pull" the JP8 pin voltage from 24V down to close to 0V so the solenoid "sees" 24V and turns on. If it is not pulling the pin voltage down to 0V it is likely damaged.
    It does show 24v whether or not it's active or not, so I guess Im going to need another board. Dangit



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

    Default re: starting my C program, any guidance would be appreciated.

    It does show 24v whether or not it's active or not, so I guess Im going to need another board.
    You might try using a different Relay Driver Output I would expect only one or possibly 2 to be damaged.

    Regards
    TK http://dynomotion.com


  17. #117
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    252
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Actually, I can't get any of them to work.



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

    Default re: starting my C program, any guidance would be appreciated.

    Maybe you have a wiring mistake. I asked you to measure from Kanalog GND at Kanalog. You said you measured from GRN. I assume that was a typo? Where did you connect to GND? I asked to measure every point in the circuit. You measured at only one point.

    starting my C program, any guidance would be appreciated.-points-png

    Regards
    TK http://dynomotion.com


  19. #119
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    252
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    Maybe you have a wiring mistake. I asked you to measure from Kanalog GND at Kanalog. You said you measured from GRN. I assume that was a typo? Where did you connect to GND? I asked to measure every point in the circuit. You measured at only one point.

    starting my C program, any guidance would be appreciated.-points-png
    I did measure from JP6 GND to JP8 #6 and 7. I went back and measured all the connections like you have put in my drawing, I'm getting 0v between GND and all the neutral (-) connections, I get 24v at JP6 and the (+) side of power supply and at the (+) side of both solenoids. I am getting 0v on JP8 #7 but if I connect it to the air switch, it will activate. If I disconnect #6 and #7 JP8 and reverse the connection, #6 wire which is now connected to #7 JP8 will activate.



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

    Default re: starting my C program, any guidance would be appreciated.

    I don't exactly follow that. Not sure why you couldn't have used my letter markings to be perfectly clear, You didn't tell us if #6 or #7 outputs are active or not so we don't know if the solenoid should activate or not when connected. It also seems to contradict what you measured earlier.

    Regards
    TK http://dynomotion.com


Page 6 of 11 FirstFirst ... 3456789 ... 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

starting my C program, any guidance would be appreciated.

starting my C program, any guidance would be appreciated.