Hi Amit,
What C Program are you using and want to change? Please Post it.
Regards
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
Hi Amit,
What C Program are you using and want to change? Please Post it.
Regards
Regards
TK http://dynomotion.com
Regards
Amit Kumar
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
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
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
Hi Amit,
Did you test if the input is working?
Regards
Regards
TK http://dynomotion.com
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
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
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
Hi Amit,
See the article KFLOP Inputs Floating High
HTH
Regards
Regards
TK http://dynomotion.com
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
Hi Amit,
Sorry I don’t understand what you want to do.
Regards
Regards
TK http://dynomotion.com
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.But there was another way mentioned that we can do from C program also.How can i DO that ? Waiting for your kind reply.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.
Regards
Amit Kumar
Hi Amit,
If there is no connection then it doesn't matter.As i know that kflop inputs of JP7 pins are floating high and low even if there is no input connected.
We recommend you fix the problem in hardware.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.
Please read my last email which explains how to do that.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
Regards
TK http://dynomotion.com
Hi Amit,
So what happens in each case?
Regards
Regards
TK http://dynomotion.com