¿ªÔÆÌåÓý

Locked Re: Timed control of (servo actuated) uncoupler


 

¿ªÔÆÌåÓý


Within the panel, the simplest is to make the "sensor" a momentary action sensor, so it reverts to its original (off) state when the click is removed.? ?But this means the uncoupler being "on" isn't shown.??

If not happy with this visually, and want a visual representation of the uncoupler staying "on" for a period of time, then this(*) should work:??
a)? ?use the momentary sensor icon, and edit it's "level" to a high number in the panel.? ?Then, change the sensor icon to be a transparent square (ie. invisible).? But an invisible icon can still be clicked to cause an action.? ?
b)? ?place the light on the panel, on a level lower than the sensor, and visually underneath the transparent icon.? Set that to have no click action (so it only displays, doesn't respond to click).??

You may find it easier to construct the above in stages, and the final step is to make the two elements overlap each other in the same place.??

?
(* I can think of other ways of achieving the same ).?


- Nigel



------ Original Message ------
From "James Parker" <jwparker@...>
Date 08/09/2024 10:36:04
Subject [jmriusers] Timed control of (servo actuated) uncoupler

I am trying to implement a timed control of an uncoupler, which is actuated by a servo (the servo moves a permanent magnet so it is either near to the track or distant from the track).? The JMRI documentation says that 'lights' are specifically designed for uncouplers, but Im struggling to get the combination of lights/sensors to do what I want.
?
What I want is
1. to push a 'button' (sensor?) on my layout panel to activate the uncoupler (light)
2. for the uncoupler (light) to stay on for a period of time then switch off
3. for the colour of the button (sensor?) to change when I first push it, and then to change back when the uncoupler (light) switches off after the programmed period of time (so the button colour at all times reflects the state of the uncoupler)
?
I can get (1) to work using a sensor which controls the light.? I can get( 2) to work by setting the light controller type to timed on and setting the on duration accordingly.? What I cant do is to get the button(sensor) colour to change back when the uncoupler (light) switches off.
?
Can anyone tell me what I am missing?
?
?

Join [email protected] to automatically receive all group messages.