Robots in Architecture Forum

KUKA|prc - parametric robot control for Grasshopper => Support => Topic started by: Xylotica on August 13, 2016, 12:16:29 PM

Title: No "Input" component ?
Post by: Xylotica on August 13, 2016, 12:16:29 PM
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 !

Title: Re: No "Input" component ?
Post by: Johannes @ Robots in Architecture on August 13, 2016, 04:02:36 PM
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
Title: Re: No "Input" component ?
Post by: Xylotica on August 15, 2016, 03:21:39 PM
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,
Title: Re: No "Input" component ?
Post by: Johannes @ Robots in Architecture on August 15, 2016, 03:25:29 PM
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