Need help adding proximity switch protection to hydraulic cylinder actuation
hello everybody,
can me code below please?
it's small program control hydrolic cilinder operate in , out.
1 potmeter use time/distance out,if time/distance reached goes in.
1 potmeter giving waitingtime next cycle , on.
i have done allot of reading forum's , projects find out want.
maybe difficult arduino starter me......
the code below works but, want put somekind of securety in use of proximity switch.
like reference "see" when cilinder in.
here code
regards everybody
moderator edit: real [font=verdana][[/font]code] [font=verdana][[/font]/code] tags added
moderator edit: title made more meaningful (nick gammon)
can me code below please?
it's small program control hydrolic cilinder operate in , out.
1 potmeter use time/distance out,if time/distance reached goes in.
1 potmeter giving waitingtime next cycle , on.
i have done allot of reading forum's , projects find out want.
maybe difficult arduino starter me......
the code below works but, want put somekind of securety in use of proximity switch.
like reference "see" when cilinder in.
here code
regards everybody
code: [select]
int potpin1 = a0; // select pin liftheight potmeter
int potpin2 = a1; // select pin wait potmeter
int potvalue1 = 0; // variable
int relaispin = 12; // select pin relais 12
// int proxpin =10; // select pin proximity sensor new
// int startbutton = 9; // select pin startup new
void setup() {
pinmode(relaispin, output); // declare relaispin output
pinmode(potpin1, input); // declare 1 potmeter input
pinmode(potpin2, input); // declare 2 potmeter input
// pinmode(proxpin, input); //declare proxpin input new
// pinmode(startbutton, input); //declare startbutton new
}
void loop() {
potvalue1 = analogread(potpin1); //
digitalwrite(relaispin, high); //
delay(potvalue1+50); //
digitalwrite(relaispin, low); //
potvalue1 = analogread(potpin2); //
delay(potvalue1+150); //
}
moderator edit: real [font=verdana][[/font]code] [font=verdana][[/font]/code] tags added
moderator edit: title made more meaningful (nick gammon)
quote
1 potmeter use time/distance out,if time/distance reached goes in.
is potentiometer defining time or distance? time , distance , not same thing.
quote
what want put somekind of securety in use of proximity switch.
and problem is?
what going trigger proximity switch? supposed happen when proximity switch triggered?
for safety, these:
delay(potvalue1+50); //
delay(potvalue1+150); //
have got go. won't able read proximity switch while donothingbuthandleinterruptsforawhile() call happening.
look @ blink without delay example.
Arduino Forum > Using Arduino > Programming Questions > Need help adding proximity switch protection to hydraulic cylinder actuation
arduino
Comments
Post a Comment