Add Digital Output Before and Behind every Linear movement

Started by ziqiuhuang, August 18, 2023, 03:18:44 AM

Previous topic - Next topic

ziqiuhuang

Hi, Johannes,
I try to add 1 line of out put before and behind every line of G-code generated linear movement command. How can I realize it?
Can you offer me some help?
And I may need 4 output 1 line, I don't know how to combine output in 1 line.
Looking forward to your reply!
Thank you very much!
Best regards,
Ziqiu

Johannes @ Robots in Architecture

Hello,

Can you clarify that a bit? Assuming that you import G-code, you usually end up with a list of let's say 5 LIN commands. When you add an IO command before and after it would look like below:

From...
LIN {X...]
LIN {X...]
LIN {X...]
LIN {X...]
LIN {X...]
To...
$OUT[1]=TRUE
LIN {X...]
$OUT[1]=FALSE
$OUT[1]=TRUE
LIN {X...]
$OUT[1]=FALSE
$OUT[1]=TRUE
LIN {X...]
$OUT[1]=FALSE
$OUT[1]=TRUE
LIN {X...]
$OUT[1]=FALSE
$OUT[1]=TRUE
LIN {X...]
$OUT[1]=FALSE

Is that really what you are looking for?
Best,
Johannes

ziqiuhuang

Hi, Johannes,
You are right! It is what I try to achieve.
But I have too many commands, will that be okay for kuka|prc
Best regards,
Ziqiu

Johannes @ Robots in Architecture

Hello,

In that case, here is an example!

Best,
Johannes

ziqiuhuang

Thank you, Johannes,
That helped a lot.
Thank you very much!
Best regards,
Ziqiu