ActiNav - Integrating a signal light
This article describes how to integrate a stack light with an ActiNav program
Introduction
This tech note describes how to integrate a stack light with an ActiNav program. In this example, the stack light signals green for a running program, amber for a program that is running below a set performance level (such as when the parts bin needs refilling), and red for a stopped program.
Prerequisites
- Multi-color Stack-light LED, such as (https://www.mcmaster.com/1577t43)
- Useful link: https://www.mcmaster.com/machine-lights
Wiring
The stack light used here comes with 6 wire leads. We will only use 4 (Yellow for ground, red for red color LED, orange for amber color LED, green for green color LED)
Connect the leads to Digital I/O ports on UR controller as shown
Program
- Logic:
- Green color: Program running as expected
- Red color: Program Stopped
- Amber color: Needs assistance (Either 3 count running average cycle time falls below pre-set value or the present cycle is taking longer than another pre-set value)
- Feel free to modify the program below to suit your needs.
- Set default (start) values for I/O
Initialize variables for the program as shown
Program template is as follows:
Add Before Start Sequence to your program as shown (Initialize variables)
Add the following lines to your Robot Program node.
These lines calculate average cycle time for the last 3 counts using three timer variables (t1, t2, t3). The light will turn Amber when the average exceeds 15 seconds
Add a parallel thread containing additional logic for switching between light colors. This also contains a separate one count timer (timer_2) that monitors the current cycle’s execution time. When the cycle time exceeds 60 seconds, the light is changed to Amber.
Disclaimer
This article was written using a system with a prototype version of ActiNav
Test the program to make sure it works as intended