Universal Robots Forum

How to control with a child node of the program

Hi, there

I am making software to control external devices with URCaps.

What I want to do:

  1. The program stops
  2. Resume the program
  3. Wait for a specific signal*1
  4. Detect the signal and move the robot

*1:
The process to wait for a specific signal is realized using the socket in the generateScript of the ProgramNodeContribution, but it is in a child node (whiteChildren) that I want to control
By the way, it can receive changes in the state of the program.

Is there any good idea.

Thanks in advance.

How about this for changing to pause?

Thank you for your reply.

I want to wait for a specific signal after the program is restarted while running a child node.
Is it possible to include the process?

Code:
public class ExampleProgramNodeContribution implements ProgramNodeContribution {

・・・

@Override
public void generateScript(ScriptWriter writer) {

・・・

writer.writeChildren(); ←

・・・

}

・・・
}

I am sorry. I’m not sure what to do in detail.
Can you upload the image of child nodes built on polyscope?

Does it mean that robot is restart after “stopping” or “pause”?

I want to wait for a specific signal after the program is restarted while running a child node.

Thank you for your quick reply.

It is only “pause” .


Line 4 is the my command.
Lines 5 to 10 are child nodes and basically only move command.

The program pauses on a child node.
I want the robot to move after waiting for a signal when pressing Resume and describe the process internally.

Thank you.

How about this?
It is possible to start after signal turning on if you add waitnode between waypoints.

Or, do you want robot to pause on the way to next position?

test

Yes, I do.
Pause and resume at any time.
The waitnode is called when the program resumes.
And, I want to put the node in the code, rather than creating it graphically.

@Override
public void generateScript(ScriptWriter writer) {

・・・

writer.writeChildren(); ← Call the waitnode when program resumed in the writeChildren

・・・

}

I see.
But it is very difficult to be realized in child node.

If I do same thing, I edit program for pausing by using “thread”.
For resuming, i use I/O setting such as below.

I also thought it was maybe difficault.

OK, I will refer.

Thank you very much.

Please do your best.
As another way, I have ever used RTDE and Dashboard to start and resume by digital IOs.