Problem with Digital Input


#1

Hi!
I have simply script:

SetPayload(25, {10,NaN})
DO(16,1)
while true do
if DI(15)==1 then
MovJ((P1))
MovJ((P2))
DO(16,0)
end
end

…and the problem is when I press button on Input 15 the script run 2 or 3 or 4 times.
What is wrong? I need when I press button script must run only once.

P.S.
…sorry for my english :slight_smile:


#2

SetPayload(25, {10,NaN})
DO(16,1)
while true do
if DI(15)==1 then
MovJ((P1))
MovJ((P2))
DO(16,0)
Sync()
end
end


#3

Thank’s it’s works! :slight_smile: