Forum Home › Forums › Development and Integration › Shared variables
Tagged: Shared variables
- This topic has 14 replies, 3 voices, and was last updated 2 years, 9 months ago by Dons.
-
AuthorPosts
-
June 18, 2021 at 1:37 pm #9108DonsParticipant
Hi,
my application gets data from RapidScada and returns a value as double.
Now I want to show this value on the web interface. How can I do it ?
Are there shared variables in Rapid Scada to do this?June 18, 2021 at 8:52 pm #9109manjey73ParticipantAdd this value to the input channel and display it in a table or diagram
June 19, 2021 at 6:12 am #9110MikhailModeratorHi,
and returns a value as double
What communication protocol is used?
June 19, 2021 at 10:36 am #9111DonsParticipantMy application gets and sets data using ScadaData.dll.
To send data I use the SendStandardCommand function.
Now I need a free Input / Output channel as a local variable to be able to write and read the value.June 21, 2021 at 8:47 am #9115MikhailModeratorInput channels work as variables.
Output channels don’t store any data. They declare commands.
Use the existing source code as example.June 21, 2021 at 6:07 pm #9124DonsParticipantSituation 1:
I have an input channel (2000) as an OPC device and an output channel (2001) to write channel 2000 value.This work !
Situation 2: (shared variable)
Ok, I declared an input channel like <undefined device> with the number 5000 and to write it the Output channel is 5001.Read the channel 5000 is not a problem but when I send a standard command on address 5001 nothing happens.
Why ?
June 22, 2021 at 3:37 pm #9134MikhailModeratorCould you provide screenshots of the channel properties for the case #2?
June 22, 2021 at 7:03 pm #9136DonsParticipantJune 23, 2021 at 12:11 pm #9149MikhailModeratorThe output channel 5051 neither has “Command number” nor “Formula”. That’s why it does nothing.
If you want the output channel 5051 to change input channel 5050, you have to use a formula SetVal(5050). And don’t forget to channel input channel type to Calculated discrete/real.
June 24, 2021 at 8:48 pm #9154DonsParticipantMy settings are:
https://drive.google.com/file/d/1w0GY8lgSWRWkXHVkqoiTwmqQ7YukBly3/view?usp=sharing
and
https://drive.google.com/file/d/1Rxg3AKumI39IuDT9w92LCLXYa97qwDds/view?usp=sharing
1 – If the formula is SetVal(5050) the server log gives me the error CS1501.
2 – When the formula is SetVal(5050,33), I send the command on the output channel 5051 and the channel 5050 is set to 33.What is the right formula to set channel 5050 with value from my application ?
June 25, 2021 at 7:22 am #9155manjey73ParticipantSetVal(5050, Cmd)
I’m confused, do you call your application Scada ?
- This reply was modified 2 years, 9 months ago by manjey73.
June 25, 2021 at 8:17 am #9157DonsParticipantMy application sends a command on output channel 5051 with SendStandardCommand function.
Scada server receives data and executes the formula.Formula must sets the value from my application to input channel 5050.
The formula SetValue(5050,Val(5051)) don’t works.
What is the correct formula for doing this
June 25, 2021 at 10:35 am #9158manjey73ParticipantYou pass the value of the channel itself in the command, and you need to pass Cmd or CmdVal, that is, the value of the command
June 25, 2021 at 12:35 pm #9159MikhailModeratorSetVal(5050, Cmd) should work.
June 25, 2021 at 8:33 pm #9160DonsParticipantNow works !!
Thanks so much for the help.
-
AuthorPosts
- You must be logged in to reply to this topic.