Need Help! Problem jig grinding machine. - Page 2


Page 2 of 5 FirstFirst 12345 LastLast
Results 13 to 24 of 51

Thread: Problem jig grinding machine.

  1. #13
    Registered
    Join Date
    Nov 2016
    Posts
    26
    Downloads
    0
    Uploads
    0

    Default Re: Problem jig grinding machine.

    Hi Tom.
    Your code works fine big thanks!
    One small note, when I press the button to start the screen that sets two Persist Variables shutdown KmotionCNC.
    Is it possible to keep running at one time KmotionCNC and Screen that sets two Persist Variables?

    Best Regards.



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

    Default Re: Problem jig grinding machine.

    Hi vadim_cnc,

    The KMotionCNC Screen Editor works as one screen that can be customized in different ways. The KMotionCNC Screen doesn't shut down but rather it changes to look like the other screen.

    You basically have two options:

    #1 put the Variables on the main screen (I thought you already had that) so you have only one screen.

    #2 Add a new button on both screens to switch to the other screen.

    HTH
    Regards

    TK
    http://dynomotion.com


  3. #15
    Registered
    Join Date
    Nov 2016
    Posts
    26
    Downloads
    0
    Uploads
    0

    Default Re: Problem jig grinding machine.

    Quote Originally Posted by TomKerekes View Post
    #2 Add a new button on both screens to switch to the other screen.
    Hi Tom.
    Thank you, realize your option # 2. All transitions running back and forth fine.
    One question. In the Screen Editor, I saw MotionButton style and ToggleButton, if I could use one of these styles in order to:
    For example: press the button and hold it at the same time some BIT were turned on, and when I let go of the button, this BIT immediately switched off.

    P.S.
    I tried to choose those styles, but they work like simple button. Maybe I do something wrong.

    Best Regard.



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

    Default Re: Problem jig grinding machine.

    Hi vadim_cnc,

    We don't have a momentary push button like that (other than the Jog buttons that have a somewhat fixed functionality and are labeled as "Motion Buttons").

    What exactly are you trying to do?

    Regards

    TK
    http://dynomotion.com


  5. #17
    Registered
    Join Date
    Nov 2016
    Posts
    26
    Downloads
    0
    Uploads
    0

    Default Re: Problem jig grinding machine.

    I am trying something like the manual mode, with instant control bits. I also tried to do a BIT turn off via the time or distance. Everything works, but there are bumps.

    P.S.
    I can also implement it in terms of physical buttons.

    Best Regard.



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

    Default Re: Problem jig grinding machine.

    Hi vadim_cnc,

    We added a Momentary button style to drive an IO Bit in the latest Release. See:

    KMotion/KFLOP Test Version 4.34f - Interpreter/Motion Libraries Expanded from 6 to 8

    Regards

    TK
    http://dynomotion.com


  7. #19
    Registered
    Join Date
    Nov 2016
    Posts
    26
    Downloads
    0
    Uploads
    0

    Default Re: Problem jig grinding machine.

    Hi Tom!
    Could you tell us more how the Momentary button style and how rather to use this button style.


    I tried to use the physical buttons with this code, but it looks like he still is not perfect.

    Code:
    #include "KMotionDef.h"
    
    	main() 
    {
    	for (;;)
    	WaitNextTimeSlice();
    	
    	if (ReadBit(145) || ReadBit(144))    // to protect against accidental clicks while working
    		{
    			ClearBit(136);  // opto input
    			ClearBit(137);  // opto input
    		} 
    	if (ReadBit(136)) // opto input, 24V if the physical button is pressed
    		{
    			SetBit(144);
    			ClearBit(145);
    		}
    	else
    			ClearBit(144);
    			ClearBit(145);
    			
    	if (ReadBit (137)) // opto input, 24V if the physical button is pressed
    		{
    			SetBit(145);
    			ClearBit(144);
    		}
    	else 
    			ClearBit(145);
    			ClearBit(144); 
    		
    return 0;	
    }




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

    Default Re: Problem jig grinding machine.

    Hi vadim_cnc,

    Here is a Video showing how the Momentary and Toggle Buttons work.



    Regarding your C Program:

    #1 please indent your programs with spaces properly so they are readable. That would have helped find one of your bugs.

    #2 The "for" statement will loop only the next single statement unless curly brackets {} are used to form a block to repeat. So this code:

    Code:
    for (;;)
        WaitNextTimeSlice();
    loops forever doing nothing. No code after this will be executed.

    #3 You can not Set or Clear Inputs. You only can read them.

    #4 The logic of your code will Set a bit and Clear a bit in the same loop. make sure your logic only sets a bit or clears the bit. Never both.

    HTH
    Regards

    Attached Files Attached Files
    TK
    http://dynomotion.com


  9. #21
    Registered
    Join Date
    Nov 2016
    Posts
    26
    Downloads
    0
    Uploads
    0

    Default Re: Problem jig grinding machine.

    Hi Tom!
    Thank you so much for the video, this is that's what I need.

    Best Regards.



  10. #22
    Registered
    Join Date
    Nov 2016
    Posts
    26
    Downloads
    0
    Uploads
    0

    Default Re: Problem jig grinding machine.

    Hi Tom!
    We trying to quote hydraulic cylinder to axis (for using it in basic main dialog screen), in this regard, there is a question: may I know which direction of the axis (bit or something else, displaying this state)?
    It is associated with the specifics of control hydraulic cylinder: voltage from 0 to 10 volts determines speed of cylinder (flow of oil) and one bit determines direction of cylinder. Is it possible to receive this bit?

    Best regards!




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

    Default Re: Problem jig grinding machine.

    Hi vadim_cnc,

    It isn't clear to me what you are asking. But you can display the state of an input bit with the Label Controls. Just assign two bitmaps to the label and assign the Input Bit Number as the Var parameter and KMotionCNC will automatically toggle between the two bitmaps based on the state of the input. The previous video had examples above each of the Momentary and Toggle Butons.

    If you interface the speed voltage to a Kanalog ADC then you could also display the speed in a DROLabel similar to what is shown here:



    and/or also as a VertBar Graph control. Such as shown here:

    Problem jig grinding machine.-vertbar-jpg

    HTH
    Regards

    TK
    http://dynomotion.com


  12. #24
    Registered
    Join Date
    Nov 2016
    Posts
    26
    Downloads
    0
    Uploads
    0

    Default Re: Problem jig grinding machine.

    Hi, Tom!
    I try to explain what I meant. Cylinder's drive have only 0...10 V control of speed and driving direction of cylinder is switching of two valves, which controls by high or low signal. Could it be implemented diagram on following picture?
    Problem jig grinding machine.-hydraulic-cylinder-jpg

    Thanks!

    Attached Thumbnails Attached Thumbnails Problem jig grinding machine.-hydraulic-cylinder-jpg  


Page 2 of 5 FirstFirst 12345 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

Problem jig grinding machine.
Problem jig grinding machine.