Forum Home › Forums › Understanding the Software › ScadaSchemeEditor – Button use
- This topic has 18 replies, 3 voices, and was last updated 7 years ago by
leon.
-
AuthorPosts
-
July 30, 2018 at 5:26 am #4068
leon
ParticipantHi
I want to control ON/OFF separately with two buttons.
Action is set to send command now
It does not send commands according to command type(ON or OFF)
Will only send 0 (OFF)Action is set to send command
working normallyIs it where I set the error?
July 30, 2018 at 4:12 pm #4071Mikhail
ModeratorHi,
You should write a formula of an output channel which determines what commands to send depending on the current state.July 30, 2018 at 10:22 pm #4072leon
ParticipantHi
Can you demonstrate the formula settings?
Let output channel on or off or reverse settings.Is there an article that can learn Formulas?
I have seen Using Formulas(roadmap) still don’t know how to use it.July 31, 2018 at 5:47 am #4073manjey73
Participantexample in the formula base: NOT
public double NOT(double val) { bool boolVal = val > 0; return Convert.ToDouble(!boolVal); }
In the output channel, write NOT (Cmd) and your command on the button will be changed to the opposite. Works only with 0 or 1 that actually follows from the name of the formula.
It is not quite clear what you want to do with the separation of the buttons ?
July 31, 2018 at 5:53 am #4074manjey73
ParticipantOr you can use the standard command buttons from this database
Sometimes the device should be fed not 0 or 1 but for example 256 or 512, then using the values for commands 1 and 2 additionally in the output channel multiply by 256 using the formula Cmd*256
-
This reply was modified 7 years ago by
manjey73.
July 31, 2018 at 11:35 am #4076Mikhail
ModeratorOther way:
Assume you have an input channel #100 for state of your machine.
In this case formula for an output channel can be: Val(100) > 0 ? 0 : 1Article about using formulas is http://doc.rapidscada.net/content/en/software-configuration/using-formulas.html
August 1, 2018 at 5:47 am #4078leon
ParticipantHi manjey73
Thank you very much, so I can understand why it is 256.
https://imgur.com/a/M6i0G0EAugust 1, 2018 at 5:49 am #4079leon
ParticipantHi Mikhail
Thank you very much for your demonstration.
I have read Article about using formulas because I don’t understand the rules of formula.
Need some simple arithmetic examples to reference.-
This reply was modified 7 years ago by
leon.
August 1, 2018 at 6:56 am #4081manjey73
ParticipantI do not know what you have for the relay fee, I bought Chinese with Modbus in the documentation which was specified as on and off.
256 – off, 512 – on, 768 – toggle
I always gave the command 1 and multiplied by 768 and the relay changed its state. In other boards can be on different. Therefore, I try not to buy boards, which do not have a description, and then here on the forum there was an example when the Chinese mixed up the sequence of bytes of the checksum in ModbusAugust 1, 2018 at 8:45 am #4082leon
ParticipantSystem architecture
https://imgur.com/a/iqtz0F5I found that it can be to on
Val(n)* 1-
This reply was modified 7 years ago by
leon.
August 1, 2018 at 9:13 am #4084leon
ParticipantNew question
Can I define different buttons using different formulas in the same Number (19)?
https://imgur.com/a/K6Gfpt1Can I omit the password?
https://imgur.com/NGl3BMG-
This reply was modified 7 years ago by
leon.
August 1, 2018 at 11:01 am #4086manjey73
Participantin WEB Main menu-Configuration-Require password when sending command
August 1, 2018 at 2:46 pm #4087Mikhail
ModeratorPlease create different topic for different questions to avoid mess.
August 1, 2018 at 2:47 pm #4088Mikhail
ModeratorCan I define different buttons using different formulas in the same Number (19)?
A set of buttons is fixed for an output channel.
August 2, 2018 at 2:07 am #4089leon
ParticipantHi manjey73
Thank you for your hot reply. -
This reply was modified 7 years ago by
-
AuthorPosts
- You must be logged in to reply to this topic.