Forum Home › Forums › Understanding the Software › LED Colour in Schema in not changing with values in Output Channel
Tagged: Schema : Output Channels
- This topic has 8 replies, 2 voices, and was last updated 2 months, 1 week ago by
rapidscadaaks.
-
AuthorPosts
-
September 12, 2025 at 10:08 am #17018
rapidscadaaks
ParticipantHi
1. I am trying to show LED colour as Red and Green based in On-Off command sent to a relay. Channel number of the output channel is say 1100.
In Schema I added a LED and in properties of LED, output channel 1100 is added. Collections in properties has inbuilt Red for 0 and Green for not 0
Colour of the LED is default colour and not changing with change in Output Channel.
2. Similarly, when I create a Toggle for On & Off with Send Now Command, colour of toggle is not changing.Please help
-
This topic was modified 2 months, 1 week ago by
Mikhail.
September 15, 2025 at 11:02 am #17030
MikhailModeratorHi,
Led and toggle reflect an input channel. Your command should cause a change of an input channel to display its value.September 15, 2025 at 11:05 am #17036rapidscadaaks
ParticipantHi
Please advise to change input channel value using :
1. Command sent to a device
2. Command sent to an output channel which is not attached to any specific device but only for getting value for updating input channelThanks
September 16, 2025 at 3:12 pm #17051
MikhailModeratorHi,
It’s needed to create a function, e.g.public double MyFunc() { SetVal(101, CmdVal); // set value of channel 101 return CmdVal; // return command value }And specify
MyFunc()in the output formula of the channel that is used to send commands.Note: not tested.
September 17, 2025 at 3:45 am #17056rapidscadaaks
ParticipantHi Mikhail
I tried and it did not update the input channel value.
As suggested, I entered the function in output type channel in output formula. This output channel is not connected to any real device.
Server log mentions command queued for sending to clients.
Please help
ThanksSeptember 17, 2025 at 10:50 am #17064
MikhailModeratorHi,
Make sure that the channel 101 is of the calculated type.
Change SetVal toSetData(101, CmdVal, 1)September 17, 2025 at 11:04 am #17068rapidscadaaks
ParticipantHi Mikhail
This works. Thanks.
I have a last follow up question on the subject for understanding :
What is the difference between following the above solution (making a script for a function and calling the function in an output channel) and just using SetData() in an Output/Calculated Channel (as suggested by you in another topic) ?
Thanks for all the help
September 18, 2025 at 12:52 pm #17073
MikhailModeratorHi,
Making a script is preferable to create more complex functions and scenarios. A formula can contain only an expression.September 19, 2025 at 5:11 am #17081rapidscadaaks
ParticipantThanks Mikhail
-
This topic was modified 2 months, 1 week ago by
-
AuthorPosts
- You must be logged in to reply to this topic.