DoF - a Robotiq Community
Warning sign
The Dof Community was shut down in June 2023. This is a read-only archive.
If you have questions about Robotiq products please reach our support team.
Etienne_Samson

I know @Enric use a lot of them.

matthewd92

The hardest part is knowing the difference between pause and stop as setting an output to be high when the program is not running goes high when the program is stopped or paused. You will also need to reset the output low by having a background thread running that just keeps that output low when the program is running. The running is straightforward as it goes high when the program is running and low when its not.  You could wire this to a relay and then use the relay to cycle between running and not running on the light tower, this keeps the programming to an absolute minimum as nothing is required to switch between these two states using the relay. 

What we have done is we wire yellow to be NOT running (stopped or paused) and Green to be running.  We then use the red light internally in the program when we want to notify an operator that there is something the robot needs help with, for instance out of raw material or time to take away the finished goods.  We then can control this light and make it blink if we want.  Then if we have different notifications that we want to visually indicate to the operator we can do that through controlling how it blinks.  For instance, I need help, flash the SOS pattern, take material away, long off (2 seconds), short on (1/2 second), give me more material, short off (1/2 second), long on (2 seconds), some other notification, 1 second on, 1 second off.  Obviously you just play around with the timing until you get what you and the operator can decipher with a quick look at the light.

mkoester2

Hello matthewd92,

I realize this is a old post, but I have two lights on a panel box indicating different robot states: a green pushbutton with a LED, and a red LED light. The red light is set to 'High When Not Running' inside the 'Installation' tab on the teach pendant, indicating to the operator either the program is not running or the E-STOP has been pressed.

I am wanting to make the green light pulse (0.5 sec ON, 0.5 sec OFF) to indicate to the operator that the robot is ready to run. Once the pushbutton has been pressed, the green light will turn a solid HIGH, which I understand how to set inside the program. 

What is the best way to set the green light to a flash inside the program? 

Thanks, 


matthewd92 said:

The hardest part is knowing the difference between pause and stop as setting an output to be high when the program is not running goes high when the program is stopped or paused. You will also need to reset the output low by having a background thread running that just keeps that output low when the program is running. The running is straightforward as it goes high when the program is running and low when its not.  You could wire this to a relay and then use the relay to cycle between running and not running on the light tower, this keeps the programming to an absolute minimum as nothing is required to switch between these two states using the relay. 

What we have done is we wire yellow to be NOT running (stopped or paused) and Green to be running.  We then use the red light internally in the program when we want to notify an operator that there is something the robot needs help with, for instance out of raw material or time to take away the finished goods.  We then can control this light and make it blink if we want.  Then if we have different notifications that we want to visually indicate to the operator we can do that through controlling how it blinks.  For instance, I need help, flash the SOS pattern, take material away, long off (2 seconds), short on (1/2 second), give me more material, short off (1/2 second), long on (2 seconds), some other notification, 1 second on, 1 second off.  Obviously you just play around with the timing until you get what you and the operator can decipher with a quick look at the light.

matthewd92

So that I understand correctly, you want the green light to flash when the program is not playing? Or is the program playing and you are just waiting to resume operation for the operator to push the button?

You can simply have a thread that is running in the background with some conditions that start the thread so that when you want the light to flash you start a loop running where the light turns on, waits, turns off, waits.  When the opertor pushes the button you would just need to set whatever flag you are using to flash the light to false and then in the thread you would simply have an else statement where the light then goes solid.  

Here is an example thread that you could use in the program

thread_1():
  if (waitingOnOperator == True):
    set GreenLight High
    wait (0.5)
    set GreenLight Low
    wait (0.5)
  else:
    set GreenLight High
    wait (waitingOnOperator == True)
  end
  sync()
end


In your main program when you get to the point you are waiting on the operator to push the button you would have something like this

waitingOnOperator = True
wait (operatorButton) == High
waitingOnOperator = False

Then when you are waiting for the operator to press the button, line 2 above, you would trigger the thread to flash the light, as soon as the button is pressed the flag would be set low and the thread would advance to the else condition and then wait for the input to be needed again.

In the new polyscope versions you can actually now set an output to flash using the set command so that could simplify the code as well.