Need Help! How to wire Active High proximity sensor to kflop JP7


Results 1 to 18 of 18

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

  1. #1
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default 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

    Similar Threads:
    Regards

    Amit Kumar


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

    Default 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

    Regards
    TK http://dynomotion.com


  3. #3
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default 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
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default 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

    Regards
    TK http://dynomotion.com


  5. #5
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default 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
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default 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

    Regards
    TK http://dynomotion.com


  7. #7
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default 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
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

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

    Hi Amit,

    Did you test if the input is working?

    Regards

    Regards
    TK http://dynomotion.com


  9. #9
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default 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
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default 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

    Regards
    TK http://dynomotion.com


  11. #11
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default 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

    Last edited by amitkumar171; 01-10-2018 at 10:07 AM.
    Regards

    Amit Kumar


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

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

    Hi Amit,

    See the article KFLOP Inputs Floating High

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  13. #13
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default 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
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

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

    Hi Amit,

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

    Regards

    Regards
    TK http://dynomotion.com


  15. #15
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default 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
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default 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

    Regards
    TK http://dynomotion.com


  17. #17
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default 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
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

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

    Hi Amit,

    So what happens in each case?

    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

How to wire Active High proximity sensor to kflop JP7

How to wire Active High proximity sensor to kflop JP7