Forum Home › Forums › New Ideas › Image conditions value from other channel
- This topic has 10 replies, 3 voices, and was last updated 6 years, 9 months ago by mitesh.
-
AuthorPosts
-
October 23, 2017 at 1:44 pm #2677svoicumParticipant
Hello!
Is it possible that the argument 1 and 2 of an image condition be the value of another channel?
Thanks!October 23, 2017 at 6:22 pm #2679JoaoParticipantIf 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) > 0formula 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, 10 months ago by Joao.
October 24, 2017 at 9:03 am #2683svoicumParticipantYes, 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, 10 months ago by svoicum.
October 24, 2017 at 10:01 am #2685svoicumParticipantNevermind.
After a full restart of the computer, it now works!
Thank you for your support!October 24, 2017 at 4:58 pm #2693JoaoParticipantI 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, 10 months ago by Joao.
December 13, 2017 at 9:49 am #2944miteshParticipantHello,
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 = 1and 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.December 13, 2017 at 11:36 am #2945JoaoParticipantYou 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, 9 months ago by Joao.
December 13, 2017 at 12:20 pm #2947miteshParticipanthello 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 contextafter this i am not able to login it show server is unavailable in the browser.
and also found the SCADA Communicator not communicating.
December 13, 2017 at 12:23 pm #2948JoaoParticipantthe “V” of Val(x) have to be uppercase
- This reply was modified 6 years, 9 months ago by Joao.
December 13, 2017 at 12:52 pm #2950miteshParticipantNow 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.
December 13, 2017 at 1:33 pm #2951miteshParticipanthi joao,
I got the result. Thank you for your support joao.
-
AuthorPosts
- You must be logged in to reply to this topic.