Image conditions value from other channel

Forum Home Forums New Ideas Image conditions value from other channel

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #2677
    svoicum
    Participant

    Hello!
    Is it possible that the argument 1 and 2 of an image condition be the value of another channel?
    Thanks!

    #2679
    Joao
    Participant

    If I understanded your question, you can create another channel and make a formula with the condition of the other two channels.
    Exemple:
    you need (ch1 and ch2) > 0

    formula of ch3: Val(1)>0 && Val(2)>0 ? 1:0

    Then you just put the channel 3 in the image config

    • This reply was modified 6 years, 6 months ago by Joao.
    #2683
    svoicum
    Participant

    Yes, it is exactly what I want to achieve.
    I have created an Input Channel on my device, that is configured as in the image:
    [img]http://savepic.net/10183185.htm[/img]
    Table definition:
    [img]http://savepic.net/10203667.htm[/img]
    Table view:
    [img]http://savepic.net/10193427.htm[/img]
    In my table, it shows —
    Should I do anything else?

    • This reply was modified 6 years, 6 months ago by svoicum.
    #2685
    svoicum
    Participant

    Nevermind.
    After a full restart of the computer, it now works!
    Thank you for your support!

    #2693
    Joao
    Participant

    I saw in the first print that you are using the type “discrete”. The channels that you use formulas have to be “Calculated Discrete” or “Calculated Real”.

    And in “device” you have to put “Local PC” instead your real device.

    • This reply was modified 6 years, 5 months ago by Joao.
    #2944
    mitesh
    Participant

    Hello,

    I have 4 input channels and i want to give all 4 channels mixing data to another new input channel.

    Example: channel1 channel2 channel3 channel4 result of new channel
    data –> 1 1 1 1 = 1

    and if any one of 4 channels data is zero i should get the result of new channel is zero.
    please help me to come out from this problem.

    #2945
    Joao
    Participant

    You can just add a formula like this in new channel :

    (Val(n1)>0 && Val(n2)>0 && Val(n3)>0 && Val(n4)>0) ? 1:0

    where “nx” is the channel numbers

    • This reply was modified 6 years, 4 months ago by Joao.
    #2947
    mitesh
    Participant

    hello joao,

    I am getting error in SCADA_Server.

    ERROR: Line 505, column 56: error cs0103: The name ‘val’ does not exist in the current context
    ERROR: Line 505, column 70: error cs0103: The name ‘val’ does not exist in the current context
    ERROR: Line 505, column 83: error cs0103: The name ‘val’ does not exist in the current context
    ERROR: Line 505, column 96: error cs0103: The name ‘val’ does not exist in the current context

    after this i am not able to login it show server is unavailable in the browser.

    and also found the SCADA Communicator not communicating.

    #2948
    Joao
    Participant

    the “V” of Val(x) have to be uppercase

    • This reply was modified 6 years, 4 months ago by Joao.
    #2950
    mitesh
    Participant

    Now i am able to login and getting all 4 channel data but i dont see any change in 5th channel. how to know the formula is working or not.

    #2951
    mitesh
    Participant

    hi joao,

    I got the result. Thank you for your support joao.

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