- Posts: 1943
- Thank you received: 0
Machine warning lights (Red, Amber, Green)
Thats cool. Definately going to do this to mine. I think while it is moving, the green light should not flash. so when it is moving via the step, the green light should stop flashing and be on until the step completes. No?
That is way cool.
Please Log in to join the conversation.
racedirector wrote: Ooooh I am liking this as it it similar to what I want to do. However mine differs in the light bit. I am after the ability to flash a light (basically pulsing an output) to signify different machine status. I have a BD679 attached to pin 14 on my BOB that handles the flashing side of it, its the flashing/pulsing the output in linuxcnc that has me stumped.
If you could live with just changing the frequency of the flashing, you could extend this code to use multiple siggens set for different frequency (eg, slow = error1, medium = error2, fast = error3)
Please Log in to join the conversation.
- racedirector
- Offline
- Elite Member
-
- Posts: 218
- Thank you received: 0
Please Log in to join the conversation.
- beltramidave
- Offline
- Premium Member
-
- Posts: 84
- Thank you received: 0
That is cool. Could you post your completed hal code for this?
Please Log in to join the conversation.
beltramidave wrote: Rodw,
That is cool. Could you post your completed hal code for this?
I didn't want to distract from the flashing lights too much so I posted it on my build thread here
Please Log in to join the conversation.
bevins wrote: Todd,
Thats cool. Definately going to do this to mine. I think while it is moving, the green light should not flash. so when it is moving via the step, the green light should stop flashing and be on until the step completes. No?
That is way cool.
I kind of like it the way it is. To me, the flashing light is telling me you can't walk away from it yet as while its running, its going to stop again soon. My goal was to be able to monitor the system from a distance.
Please Log in to join the conversation.
The good thing LUT5 is that it is very easy to change the behaviour.
The bad thing about LUT5 is that it is a bit hard to understand.
LUT5 lets you combine 5 inputs to give 1 output, and the relationship between the inputs and the outputs is completely flexible, you define the output state for each of the 32 possible input states.
(You can feed the output of a LUT5 to another LUT5 if you need more inputs)
(You can feed the output of the LUT5 to one of its own inputs if you need a state-aware behaviour, such as a toggle)
In this case I would wire-up each LUT5 exactly the same. With flash on input0 and the machine states on the other inputs. One neat thing that this lets you do is have the lights flash in antiphase, if you set the output true when the pulse is true for one light (+ other conditions) and true when pulse is false for a different light (plus condition inputs)
If you are a programmer and I tell you that the 5 inputs are converted to a value from 0 to 32 and that is used to pick one bit from the 32-bit "parameter" value that defines the LUT5 then it will be instatntly obvious how to use it.
If you are not a programmer then you might like to use this online tool I made:
docs.google.com/spreadsheets/d/1_VlL39jU...E3JitvLzs/edit#gid=0
Please Log in to join the conversation.
I think some of the warning mast lights (some have 4 and 5 lights eg they also have a white and/or blue light) are driven by logic signals rather than individual wires so I suspect that LUT5 would have a place with this hardware.
Please Log in to join the conversation.
andypugh wrote: I would probably do this with a LUT5 component for each light.
The good thing LUT5 is that it is very easy to change the behaviour.
The bad thing about LUT5 is that it is a bit hard to understand.
LUT5 lets you combine 5 inputs to give 1 output, and the relationship between the inputs and the outputs is completely flexible, you define the output state for each of the 32 possible input states.
(You can feed the output of a LUT5 to another LUT5 if you need more inputs)
(You can feed the output of the LUT5 to one of its own inputs if you need a state-aware behaviour, such as a toggle)
In this case I would wire-up each LUT5 exactly the same. With flash on input0 and the machine states on the other inputs. One neat thing that this lets you do is have the lights flash in antiphase, if you set the output true when the pulse is true for one light (+ other conditions) and true when pulse is false for a different light (plus condition inputs)
If you are a programmer and I tell you that the 5 inputs are converted to a value from 0 to 32 and that is used to pick one bit from the 32-bit "parameter" value that defines the LUT5 then it will be instatntly obvious how to use it.
If you are not a programmer then you might like to use this online tool I made:
docs.google.com/spreadsheets/d/1_VlL39jU...E3JitvLzs/edit#gid=0
oooooh! thats interesting.....But my head hurts thinking about it....
Please Log in to join the conversation.
bevins wrote:
andypugh wrote: I would probably do this with a LUT5 component for each light.
The good thing LUT5 is that it is very easy to change the behaviour.
The bad thing about LUT5 is that it is a bit hard to understand.
oooooh! thats interesting.....But my head hurts thinking about it....
Bevins, I think Andy and Todd should have a code writing shootout and those of us with headaches can pick the winner! What do you think?
Please Log in to join the conversation.
