Change Led colour

Forum Home Forums Understanding the Software Change Led colour

Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #4710
    jeff
    Participant

    Hi,

    I want to change the led colour according to the conditions.
    1. if (Val(1007) = Val(1015))
    {Led Green;}
    else
    {Red}
    2. if (Val(1001)=Val(1002) && Val(1007)=Val(1015))
    {Led Green;}
    else if (Val(1001)=Val(1002) && Val(1007)!=Val(1015))
    {led yellow;)
    else if (Val(1001)!=Val(1002) && Val(1007)=Val(1015))
    {led yellow;)
    else if (Val(1001)!=Val(1002) && Val(1007)!=Val(1015))
    {led red;)

    May I know how to do it in Rapid Scada.

    Thank you.

    Jeff

    #4714
    Mikhail
    Moderator

    Hi,
    Create a new input channel of calculated type which uses a formula to calculate a number of color. Then use this channel in a scheme component to switch led color.

    #4716
    Muhd Afham
    Participant

    Hi,
    How to create a led condition based on value from different channel. As example, if the value channel 1 is less than value in channel 2, led turn to red. if the value in channel 1 and channel 2 is equal, the led turn to green.

    It is possible to do it using Rapid Scada?

    Thank you.

    #4724
    Mikhail
    Moderator

    Hi,

    It is possible to do it using Rapid Scada?

    Yes, you should create an extra input channel of the calculated type and use a forumula. For example: Val(1) < Val(2) ? 0 : 1

    #4757
    jeff
    Participant

    Hi,

    Can you explain how the formula work as you shown in (example: Val(1) < Val(2) ? 0 : 1)?
    How to set condition in rapid scada scheme for the led indicator regarding to the formula above?

    Thank you.

    #4760
    Mikhail
    Moderator

    Val(n) is described here.

    Expression a ? b : c is usual for C++/C# and means if a then return b else return c

    #4761
    Mikhail
    Moderator

    How to set condition in rapid scada scheme for the led indicator regarding to the formula above?

    You need to create an new exrta channel in Administrator and bind a led to the new channel.

    #4792
    jeff
    Participant

    Sorry for late reply and thanks for your explanation. I get it and it works. Thank you.
    Can I do it for 2 conditions?

    #4794
    Mikhail
    Moderator

    Can I do it for 2 conditions?

    Yes.
    a ? b ? c : d : e

    I forget how the above works ))

    #4799
    jeff
    Participant

    Thank you very much.
    Hopes it work. Thanks again.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.