Adding a
Archiver
Posts: 46,084
my question is this i have a program running a fuel injection system
on a engine, i want to be able to have a sensor moutnedon the engines
crank shaft to indicate every time to start running the program / OR
reset the program (what ever one works best).. my sample program is
below
'{$STAMP BS2}
TB_POS VAR BYTE
X VAR WORD
x0 CON 1000
x1 CON 1500
x2 CON 2000
x3 CON 2500
x4 CON 2750
x5 CON 3000
x6 CON 3250
x7 CON 3500
x8 CON 3750
x9 CON 4000
x10 CON 4250
x11 CON 4500
x12 CON 4750
Main:
PULSIN 8, 1, TB_POS
lookup TB_POS min 5 max 18 - 5,
[noparse][[/noparse]x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12], x
pulsout 1,x
GOTO MAIN
with just the program the way it is right now, it will run endlessly
real fast, but basicly i want it to ither wait for the crank sensor
to trigger it to run then once it runs "MAIN" to wait for the crank
sensor to trigger it once more, etc.. etc... how would i add that
into this program???
Sean...
PS who ever helps me out ill give them a cookie for there trouble :P
on a engine, i want to be able to have a sensor moutnedon the engines
crank shaft to indicate every time to start running the program / OR
reset the program (what ever one works best).. my sample program is
below
'{$STAMP BS2}
TB_POS VAR BYTE
X VAR WORD
x0 CON 1000
x1 CON 1500
x2 CON 2000
x3 CON 2500
x4 CON 2750
x5 CON 3000
x6 CON 3250
x7 CON 3500
x8 CON 3750
x9 CON 4000
x10 CON 4250
x11 CON 4500
x12 CON 4750
Main:
PULSIN 8, 1, TB_POS
lookup TB_POS min 5 max 18 - 5,
[noparse][[/noparse]x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12], x
pulsout 1,x
GOTO MAIN
with just the program the way it is right now, it will run endlessly
real fast, but basicly i want it to ither wait for the crank sensor
to trigger it to run then once it runs "MAIN" to wait for the crank
sensor to trigger it once more, etc.. etc... how would i add that
into this program???
Sean...
PS who ever helps me out ill give them a cookie for there trouble :P