Need Help! K-flop with two probe inputs?


Results 1 to 4 of 4

Thread: K-flop with two probe inputs?

  1. #1
    Member
    Join Date
    Jun 2012
    Location
    US
    Posts
    74
    Downloads
    4
    Uploads
    0

    Default K-flop with two probe inputs?

    Hey,

    I am currently building a dedicated expansion/connection PCB for my CNC build and need your input.
    As we all know, Mach3 has only one pin assigned for a probe.
    I have 2 probes, one is a touch plate, the other is a digitizing probe.
    Digitizing probe for x/y probe, set them zero, change tool to endmill, touch plate for z origin, that's the idea.

    This is challengins. They act reversly. Touch plate is ACTIVE HIGH & digitizing probe is ACTIVE LOW.
    I once had an external circuit to combine them in serial chain and gives only one input to Mach3 BoB.
    I can do this again, however, as I am building a custom PCB for my KFLOP at the moment, I wish to avoid this hassle if there is another choice.

    My question is this :

    Is it possible to have two probe inputs seperately into Kflop - doing this is easy, I know, one is active high, one is active low
    and let KFLOP-plugin combines them as one input and delivers to Mach3 software? - this part is the real question.

    I am not sure if my intention is correctly expressed.
    I haven't dig into configuration files of Kflop yet.
    Sorry to ask questions without studying myself first.
    If anybody tried this before or knows inside of kflop config files, please give me a short answer of YES/NO.

    regards,
    Kevin

    Similar Threads:


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

    Default Re: K-flop with two probe inputs?

    Hi Kevin,

    You might have KFLOP perform a logic operation on two inputs to set a single virtual I/O bit. Then configure the Mach3 Probe bit and notification C program to watch for the virtual bit. The logic operation will need to be in a loop that gets executed continuously. Such as the following will set virtual bit 48 if input 0 goes high or if input 1 goes low:

    Code:
    #include "KMotionDef.h"
    
    main()
    {
    	for(;;)
    	{
    		if (ReadBit(0) || !ReadBit(1))
    			SetBit(48);
    		else
    			ClearBit(48);
    	}
    }
    HTH
    Regards

    Regards
    TK http://dynomotion.com


  3. #3
    Member
    Join Date
    Jun 2012
    Location
    US
    Posts
    74
    Downloads
    4
    Uploads
    0

    Default Re: K-flop with two probe inputs?

    Hi Tom,

    Great answer! That's exactly what I needed to know!
    Always appreciate your endless support.
    So there is a way to do it by logic, thank you very much. Now I can delete all components related to probes

    * Is that code already a working version or do I have to add lines for assigning probe bits myself?

    regards,
    Kevin



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

    Default Re: K-flop with two probe inputs?

    Hi Kevin,

    Not sure exactly what you mean. The example just specifies inputs 0 and 1 as inputs. You will need to change those to what ever inputs you are using.

    Regards

    Regards
    TK http://dynomotion.com


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

K-flop with two probe inputs?

K-flop with two probe inputs?