585,931 active members*
4,613 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Dynomotion/Kflop/Kanalog > How to wire Active High proximity sensor to kflop JP7
Results 1 to 18 of 18
  1. #1
    Join Date
    Aug 2017
    Posts
    112

    How to wire Active High proximity sensor to kflop JP7

    Hi everyone,

    I am using JIGO proximity sensor that are active high, but in kflop c program the program is to detect active low then start homing.

    How to change the program to detect active high and then start homing.

    Which function should i change in c program of homing to change or reverse the proximity probability.

    Waiting for your kind reply.


    Thank You
    AMIT KUMAR
    Regards

    Amit Kumar

  2. #2
    Join Date
    May 2006
    Posts
    4045

    Re: How to wire Active High proximity sensor to kflop JP7

    Hi Amit,

    What C Program are you using and want to change? Please Post it.

    Regards
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Aug 2017
    Posts
    112

    Re: How to wire Active High proximity sensor to kflop JP7

    Quote Originally Posted by TomKerekes View Post
    Hi Amit,

    What C Program are you using and want to change? Please Post it.

    Regards
    Hi tom,

    here is the program that i want to modify it according to my Active high proximity sensors.

    And all the proximity i want to be connected to JP7 io bits IObit 0 to IObit 7.

    Waiting for your kind reply.

    Thank You
    AMIT KUMAR
    Attached Files Attached Files
    Regards

    Amit Kumar

  4. #4
    Join Date
    May 2006
    Posts
    4045

    Re: How to wire Active High proximity sensor to kflop JP7

    Hi Amit,

    Strange it seems your program is already written for active high sensors.

    But in C Programming '!' is the NOT operator. Remove it to wait for the opposite polarity and wait until the input goes low.

    change:

    while (!ReadBit(10)) ; // loop until IO bit goes high

    to:

    while (ReadBit(10)) ; // loop until IO bit goes low

    Regards
    TK
    http://dynomotion.com

  5. #5
    Join Date
    Aug 2017
    Posts
    112

    Re: How to wire Active High proximity sensor to kflop JP7

    Quote Originally Posted by TomKerekes View Post
    Hi Amit,

    Strange it seems your program is already written for active high sensors.

    But in C Programming '!' is the NOT operator. Remove it to wait for the opposite polarity and wait until the input goes low.

    change:

    while (!ReadBit(10)) ; // loop until IO bit goes high

    to:

    while (ReadBit(10)) ; // loop until IO bit goes low

    Regards
    Hi tom,

    I tried it it is now working.

    DO i have to put all the proximity sensors for X, Y, Z in init file .

    i Mean bit allocation for that like limit bit setting first then homing it if yes then tell me how to make it work ?

    waiting for your kind reply.


    THANK YOU
    Amit Kumar
    Regards

    Amit Kumar

  6. #6
    Join Date
    May 2006
    Posts
    4045

    Re: How to wire Active High proximity sensor to kflop JP7

    Hi Amit,

    Sorry I don't understand the question.

    No initialization is required for KFLOP inputs. They default as inputs.

    Regards
    TK
    http://dynomotion.com

  7. #7
    Join Date
    Aug 2017
    Posts
    112

    Re: How to wire Active High proximity sensor to kflop JP7

    Quote Originally Posted by TomKerekes View Post
    Hi Amit,

    Strange it seems your program is already written for active high sensors.

    But in C Programming '!' is the NOT operator. Remove it to wait for the opposite polarity and wait until the input goes low.

    change:

    while (!ReadBit(10)) ; // loop until IO bit goes high

    to:

    while (ReadBit(10)) ; // loop until IO bit goes low
    this is not working i tried it reversing it ,

    Proximity is not working if i reverse it.
    Regards

    Amit Kumar

  8. #8
    Join Date
    May 2006
    Posts
    4045

    Re: How to wire Active High proximity sensor to kflop JP7

    Hi Amit,

    Did you test if the input is working?

    Regards
    TK
    http://dynomotion.com

  9. #9
    Join Date
    Aug 2017
    Posts
    112

    Re: How to wire Active High proximity sensor to kflop JP7

    Quote Originally Posted by TomKerekes View Post
    Hi Amit,

    Did you test if the input is working?

    Regards
    Yes tom

    Input is working,

    But when I put something metal piece in front of the proximity then it starts homing. And after removal of that metal piece homing stops.

    Because all proximity are active high.

    And program is for active low.

    I tried using your method of changing program to detect active high signal. But after that no proximity is working.

    Waiting for your kind reply.


    Thank you
    Amit Kumar

    Sent from my Lenovo K50a40 using Tapatalk
    Regards

    Amit Kumar

  10. #10
    Join Date
    May 2006
    Posts
    4045

    Re: How to wire Active High proximity sensor to kflop JP7

    Hi Amit,

    Your responses are confusing and unclear. Please add more details into what you are doing and what happens.

    There may be noise on your signal. Your sensor may not be properly going high and low. I suspect your sensor has the following problem:

    With metal piece on sensor - it is high.

    With metal piece removed - the sensor pulses high and low (for example 99% low 1% high).

    Therefore when you change the program too stop when the sensor is high it will always stop immediately whether or not there is metal present.

    There are simple tests to prove whether this is a problem or not. You might disconnect the input and set the Bit as an output high and low to test if your program then always works correctly.

    To remove noise from the input you might add a 0.1uF capacitor to GND right at the input to KFLOP.

    Regards
    TK
    http://dynomotion.com

  11. #11
    Join Date
    Aug 2017
    Posts
    112

    Re: How to wire Active High proximity sensor to kflop JP7

    Hi Tom
    Thankyou for your reply.

    I am now facing a problem in proximity detection, where in I have connected the signal wire of the sensor to pin JP7-13, and the pin JP7-14 is not connected to any signal wire, but in Digital I/O table it is displaying both the pins i.e JP7-13 and JP7-14 as high signal and in the presence of any obstacle in front of the sensor it is displaying low signal, for both the pin(JP7-13 & 14).

    since we are using encoder I/O bits i.e JP7-13 &14 as an input for proximity sensor, it looks like both of them are been grouped.We also tried using other pins in the encoder I/O bits( (7/8)(9/10),(11/12),(13/14) ) but the result remains the same.So please provide us a proper solution which can help us to over come this problem as soon as possible.Waiting for your reply.

    Regards
    Amith
    Regards

    Amit Kumar

  12. #12
    Join Date
    May 2006
    Posts
    4045

    Re: How to wire Active High proximity sensor to kflop JP7

    Hi Amit,

    See the article KFLOP Inputs Floating High

    HTH
    Regards
    TK
    http://dynomotion.com

  13. #13
    Join Date
    Aug 2017
    Posts
    112

    Re: How to wire Active High proximity sensor to kflop JP7

    Quote Originally Posted by TomKerekes View Post
    Hi Amit,

    See the article KFLOP Inputs Floating High

    HTH
    Regards

    Hi tom , i figured out proximity option and all proximities are detecting.

    now i am facing a problem that i want to home the machine at its center

    as i am having proximities in Xmax , Xmin, Ymax, Ymin.

    Now which program i have to home the machine in center Machine coordinate X0, Y0, at machine center of tool tip.


    Waiting for your kind reply.

    Thank You

    AMIT KUMAR
    Regards

    Amit Kumar

  14. #14
    Join Date
    May 2006
    Posts
    4045

    Re: How to wire Active High proximity sensor to kflop JP7

    Hi Amit,

    Sorry I don’t understand what you want to do.

    Regards
    TK
    http://dynomotion.com

  15. #15
    Join Date
    Aug 2017
    Posts
    112

    Re: How to wire Active High proximity sensor to kflop JP7

    Quote Originally Posted by TomKerekes View Post
    Hi Amit,Sorry I don’t understand what you want to do.Regards
    Hi tom, As i know that kflop inputs of JP7 pins are floating high and low even if there is no input connected.So how can i reduce this signal noise of JP7 input pins using C Program .I have seen article from your website that how to reduce noise of JP7 pins.I dont want to add 0.1uF capacitor to signal and GND.
    KFLOP inputs are very fast and therefore susceptible to narrow noise glitches. KFLOP doesn't have selectable digital filtering. It is usually best to fix the source of the noise problem in hardware. Otherwise you might reduce the frequency of the problem but not eliminate it entirely. You might add a Filter Capacitor (such as a 0.1uf ceramic capacitor) from the KFLOP input pin to the KFLOP GND (in very close proximity to KFLOP). To filter the inputs in software you can do so with a User Program that samples the input, performs some filtering algorithm, and sets/clears a KFLOP Virtual I/O Bit (ie bits 48-63) based on the result. Then configure the KFLOP Axis to monitor the Virtual Inputs rather than the real inputs. The ExternalButtons.c example shows how multiple inputs can be monitored and debounced using a single non-blocking loop using a state driven approach. See the Debounce() function, how it's used, and the 3 global variables needed for every input to keep track of the states of the input.
    But there was another way mentioned that we can do from C program also.How can i DO that ? Waiting for your kind reply.
    Regards

    Amit Kumar

  16. #16
    Join Date
    May 2006
    Posts
    4045

    Re: How to wire Active High proximity sensor to kflop JP7

    Hi Amit,

    As i know that kflop inputs of JP7 pins are floating high and low even if there is no input connected.
    If there is no connection then it doesn't matter.

    I have seen article from your website that how to reduce noise of JP7 pins.I dont want to add 0.1uF capacitor to signal and GND.
    We recommend you fix the problem in hardware.

    But there was another way mentioned that we can do from C program also.How can i DO that ? Waiting for your kind reply
    Please read my last email which explains how to do that.

    Regards
    TK
    http://dynomotion.com

  17. #17
    Join Date
    Aug 2017
    Posts
    112

    Re: How to wire Active High proximity sensor to kflop JP7

    Quote Originally Posted by TomKerekes View Post
    Hi Amit,

    Strange it seems your program is already written for active high sensors.

    But in C Programming '!' is the NOT operator. Remove it to wait for the opposite polarity and wait until the input goes low.

    change:

    while (!ReadBit(10)) ; // loop until IO bit goes high

    to:

    while (ReadBit(10)) ; // loop until IO bit goes low

    Regards
    Hi tom,

    I tried it it is not happening.
    Regards

    Amit Kumar

  18. #18
    Join Date
    May 2006
    Posts
    4045

    Re: How to wire Active High proximity sensor to kflop JP7

    Hi Amit,

    So what happens in each case?

    Regards
    TK
    http://dynomotion.com

Similar Threads

  1. Proximity sensor wiring
    By Lindzr in forum Automation Technology Products
    Replies: 2
    Last Post: 08-16-2017, 01:29 AM
  2. Replies: 3
    Last Post: 04-01-2017, 05:25 PM
  3. CRP's Proximity Sensor Kit
    By rwskinner in forum Avid CNC
    Replies: 5
    Last Post: 02-12-2014, 04:07 AM
  4. BB does not read +5 from proximity sensor
    By crane550 in forum DIY CNC Router Table Machines
    Replies: 3
    Last Post: 03-25-2012, 02:01 PM

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
  •