Hi !
I have finaly managed to set-up a digital input and output on my KRC2 !
Then I made a little program to check that the output was working, and it works ! Now I can switch a relay on or off at the moment that I please, but I haven't tested the input yet.
I wish there was a "Input listener" component.
I suppose that the only way to integrate inputs at the moment is through a "Custom KRL" component.
Could someone send me a code snipet to see what the correct syntax is ?
Thanks !
Hello,
WAIT FOR $IN[5]
...would wait for input 5 to become true. See also page 99 of the KRC2 Expert Programming manual!
I could make a component for that, if it is helpful for your application!
Best,
Johannes
Hi Johannes,
And thanks for your answer.
I suppose that this code would pause the robot motion until a specific input channel becomes "True".
But what happens if the input is "true" briefly (as an impulse) and not as a continuous state ?
Cheers,
Hello,
Well, the WAIT FOR only waits for the switch to TRUE, it does not matter how long it is. You could make some kind of logic that waits for a few seconds and checks if the value is still TRUE if you need a specific timespan. Or you could solve that in hardware as well on the signal side.
Best,
Johannes