Multi color led indicator light
Moderator: cnckeith
-
- Posts: 45
- Joined: Mon Sep 27, 2021 9:28 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: St. Petersburg, FL
Multi color led indicator light
Merry Christmas Eve everyone. I have a question maybe someone more electronics advanced than me can answer. I purchased a multi color led indicator panel light I'm going to use on the front of my electronics enclosure for my cnc router. Originally I had drilled a 22mm hole for a selector switch but plans changed as they always do and that selector switch is going to be used along with a push button in a project box closer to the machine. So to fill that 22mm hole, that's where I decided to add the multi color led. Essentially my plan is to use it like a stack light and set an output for a green light, amber light, and red light. The issue is that in order to get an amber (yellow) light, I have to combine 2 wires to get that color as shown in the picture. I'm wondering if 2 diodes would allow me to get that amber (yellow) light indicator for an idle state. If it's too much of a pain to do I can just use blue which is a single wire and blue can be my idle color. Just curious.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
Re: Multi color led indicator light
That should work just fine.
If you needed to save an output relay, you could have the PLC program do the logic, so that it turns on both red and green whenever amber is called for. However, that would require that you edit your PLC program.
If you needed to save an output relay, you could have the PLC program do the logic, so that it turns on both red and green whenever amber is called for. However, that would require that you edit your PLC program.
1 user liked this post
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 45
- Joined: Mon Sep 27, 2021 9:28 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: St. Petersburg, FL
Re: Multi color led indicator light
It's funny that you say that because I was wondering if that was possible. I just couldn't figure out how to do so. Messing with the PLC program is a bit over my head. I was looking through the main acorn plc file in notepad ++ but couldn't figure out what to change or how to implement that. I definitely would like to not have to use another output just to turn the led amber when turning on the red & green would give me the same thing in my situation.
The only other thing I will say I'm not fond of is why they make the lights flash every couple seconds. I'm not sure how many cycles those on-board relays can handle, but I think I'd rather have the lights stay on than to click on and off and on and off.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Community Expert
- Posts: 3475
- Joined: Tue Mar 22, 2016 10:03 am
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: Yes
- Oak CNC controller: Yes
- CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192 - DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Boston, MA
- Contact:
Re: Multi color led indicator light
IIRC, Acorn wizard already has output definitions for a stack light.
Cheers,
Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
1 user liked this post
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
Re: Multi color led indicator light
Yes, it does. It just does not do what he wants.
Somewhere around line 5550 in an Acorn PLC program:
Change to read:
Then put "RedLight" and "GreenLight" on outputs, and leave "AmberLight" unassigned so that it remains as a memory bit.
Somewhere around line 5550 in an Acorn PLC program:
Code: Select all
;-----------------------------------LightStack---------------------------------
;Blink Lights, On 5 Seconds, Off 1 Second
IF True THEN SET LightTurnOnTimer
IF LightTurnOnTimer THEN SET LightTurnOffTimer
IF LightTurnOffTimer THEN RST LightTurnOnTimer, RST LightTurnOffTimer
;Set Lights on Machine Status
IF SV_JOB_IN_PROGRESS && (LightTurnOnTimer || (SV_MACHINE_PARAMETER_890 == 1)) THEN (GreenLight) ; If job running normally then greenlight on
IF !SV_JOB_IN_PROGRESS && !SV_STOP && (LightTurnOnTimer || (SV_MACHINE_PARAMETER_890 == 1)) THEN (Amberlight) ; If not in job and not in fault then yellow light on
IF SV_STOP && (LightTurnOnTimer || (SV_MACHINE_PARAMETER_890 == 1)) THEN (RedLight) ; if in fault then red light on
;---------------------------------End LightStack-------------------------------
Code: Select all
;-----------------------------------LightStack---------------------------------
;Set Lights on Machine Status
IF !SV_JOB_IN_PROGRESS && !SV_STOP THEN (Amberlight) ; If not in job and not in fault then yellow light on
IF SV_JOB_IN_PROGRESS || AmberLight THEN (GreenLight) ; If job running normally then greenlight on
IF SV_STOP || AmberLight THEN (RedLight) ; if in fault then red light on
;---------------------------------End LightStack-------------------------------
1 user liked this post
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 45
- Joined: Mon Sep 27, 2021 9:28 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: St. Petersburg, FL
Re: Multi color led indicator light
Thank you sir. I'll look deeper into this and obviously create a copy of the working untouched plc file.cncsnw wrote: ↑Tue Dec 24, 2024 4:16 pm Yes, it does. It just does not do what he wants.
Somewhere around line 5550 in an Acorn PLC program:Change to read:Code: Select all
;-----------------------------------LightStack--------------------------------- ;Blink Lights, On 5 Seconds, Off 1 Second IF True THEN SET LightTurnOnTimer IF LightTurnOnTimer THEN SET LightTurnOffTimer IF LightTurnOffTimer THEN RST LightTurnOnTimer, RST LightTurnOffTimer ;Set Lights on Machine Status IF SV_JOB_IN_PROGRESS && (LightTurnOnTimer || (SV_MACHINE_PARAMETER_890 == 1)) THEN (GreenLight) ; If job running normally then greenlight on IF !SV_JOB_IN_PROGRESS && !SV_STOP && (LightTurnOnTimer || (SV_MACHINE_PARAMETER_890 == 1)) THEN (Amberlight) ; If not in job and not in fault then yellow light on IF SV_STOP && (LightTurnOnTimer || (SV_MACHINE_PARAMETER_890 == 1)) THEN (RedLight) ; if in fault then red light on ;---------------------------------End LightStack-------------------------------
Then put "RedLight" and "GreenLight" on outputs, and leave "AmberLight" unassigned so that it remains as a memory bit.Code: Select all
;-----------------------------------LightStack--------------------------------- ;Set Lights on Machine Status IF !SV_JOB_IN_PROGRESS && !SV_STOP THEN (Amberlight) ; If not in job and not in fault then yellow light on IF SV_JOB_IN_PROGRESS || AmberLight THEN (GreenLight) ; If job running normally then greenlight on IF SV_STOP || AmberLight THEN (RedLight) ; if in fault then red light on ;---------------------------------End LightStack-------------------------------
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 45
- Joined: Mon Sep 27, 2021 9:28 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: St. Petersburg, FL
Re: Multi color led indicator light
Merry ACTUAL Christmas Day. Yeah I tried that code you provided CNCSNW and unless I'm doing something wrong which may very well be the case, it's not working. I beginning to think that because the "GreenLight" is assigned to and output and the "RedLight" is assigned to an output that I can't define it to turn both the Green and Red on to give me the Amber (Yellow) color for this fancy multicolor led panel light I bought. I figured the code would look like this, however I'm not a programmer so I honestly have no idea what I'm doing.
https://www.automationdirect.com/adc/sh ... ml1-159-30
Code: Select all
;-----------------------------------LightStack---------------------------------
;Blink Lights, On 5 Seconds, Off 1 Second
;IF True THEN SET LightTurnOnTimer
;IF LightTurnOnTimer THEN SET LightTurnOffTimer
;IF LightTurnOffTimer THEN RST LightTurnOnTimer, RST LightTurnOffTimer
;Set Lights on Machine Status
IF SV_JOB_IN_PROGRESS && (LightTurnOnTimer || (SV_MACHINE_PARAMETER_890 == 1)) THEN (GreenLight) ; If job running normally then greenlight on
IF !SV_JOB_IN_PROGRESS && !SV_STOP && (LightTurnOnTimer || (SV_MACHINE_PARAMETER_890 == 1)) THEN (GreenLight && RedLight) ; If not in job and not in fault then yellow light on
IF SV_STOP && (LightTurnOnTimer || (SV_MACHINE_PARAMETER_890 == 1)) THEN (RedLight) ; if in fault then red light on
;---------------------------------End LightStack-------------------------------
https://www.automationdirect.com/adc/sh ... ml1-159-30
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 281
- Joined: Wed Jan 01, 2020 2:40 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: Multi color led indicator light
Could you use two relays and have the 24V to common and the Red/Green inputs to NC of the relays, both relays off would give you yellow, then open (actuate) the desired relay to give you the red or green indicator?jasonstewart81 wrote: ↑Wed Dec 25, 2024 3:40 pm Merry ACTUAL Christmas Day. Yeah I tried that code you provided CNCSNW and unless I'm doing something wrong which may very well be the case, it's not working. I beginning to think that because the "GreenLight" is assigned to and output and the "RedLight" is assigned to an output that I can't define it to turn both the Green and Red on to give me the Amber (Yellow) color for this fancy multicolor led panel light I bought. I figured the code would look like this, however I'm not a programmer so I honestly have no idea what I'm doing.
For example
Relay 1 on, Relay 2 off = Green
Relay 1 off, Relay 2 on = Red
Relay 1 off, Relay 2 off = Yellow
This could be use with the NO contacts as well, logic would just be reversed.
1 user liked this post
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 45
- Joined: Mon Sep 27, 2021 9:28 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: St. Petersburg, FL
Re: Multi color led indicator light
Ahhhh. I think I understand what you're saying. Essentially the moment I power up the Acorn and start CNC12 the Yellow light would be on and if a program is running it'll turn on whatever output # that's set for (GreenLight). Then if there's a fault, whatever output # that's set for (RedLight) will be on, but if the machine is idle, both relays will be off and the 24v that's on the common of the relay will pass to the normally closed on both the output for the (GreenLight and RedLight) thus sending 24v to the 2 wires needed to give me that "Yellow" color. I'm going to have to draw this out on my notepad to visualize this and see if that works. I really feel like there must be a way to turn on both outputs to give me the yellow light, I just don't know code and what the proper symbol usage is to make that happen.RogDC wrote: ↑Wed Dec 25, 2024 4:40 pmCould you use two relays and have the 24V to common and the Red/Green inputs to NC of the relays, both relays off would give you yellow, then open (actuate) the desired relay to give you the red or green indicator?jasonstewart81 wrote: ↑Wed Dec 25, 2024 3:40 pm Merry ACTUAL Christmas Day. Yeah I tried that code you provided CNCSNW and unless I'm doing something wrong which may very well be the case, it's not working. I beginning to think that because the "GreenLight" is assigned to and output and the "RedLight" is assigned to an output that I can't define it to turn both the Green and Red on to give me the Amber (Yellow) color for this fancy multicolor led panel light I bought. I figured the code would look like this, however I'm not a programmer so I honestly have no idea what I'm doing.
For example
Relay 1 on, Relay 2 off = Green
Relay 1 off, Relay 2 on = Red
Relay 1 off, Relay 2 off = Yellow
This could be use with the NO contacts as well, logic would just be reversed.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 45
- Joined: Mon Sep 27, 2021 9:28 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: St. Petersburg, FL
Re: Multi color led indicator light
Yeah, I think I'm just going to eliminate the use of the yellow light all together and use the green and red light. Green means go, red means stop. Simple as that. Trying to figure out how to eliminate the use of a 3rd output and use just the 2 outputs to turn red and green on to give me yellow is just hurting my brain. 
(Note: Liking will "up vote" a post in the search results helping others find good information faster)