Shared variables

Forum Home Forums Development and Integration Shared variables

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #9108
    Dons
    Participant

    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?

    #9109
    manjey73
    Participant

    Add this value to the input channel and display it in a table or diagram

    #9110
    Mikhail
    Moderator

    Hi,

    and returns a value as double

    What communication protocol is used?

    #9111
    Dons
    Participant

    My 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.

    #9115
    Mikhail
    Moderator

    Input channels work as variables.
    Output channels don’t store any data. They declare commands.
    Use the existing source code as example.

    #9124
    Dons
    Participant

    Situation 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 ?

    #9134
    Mikhail
    Moderator

    Could you provide screenshots of the channel properties for the case #2?

    #9136
    Dons
    Participant
    #9149
    Mikhail
    Moderator

    The 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.

    #9154
    Dons
    Participant

    My 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 ?

    #9155
    manjey73
    Participant

    SetVal(5050, Cmd)

    I’m confused, do you call your application Scada ?

    Existing Formulas

    • This reply was modified 2 years, 9 months ago by manjey73.
    #9157
    Dons
    Participant

    My 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

    #9158
    manjey73
    Participant

    You 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

    #9159
    Mikhail
    Moderator

    SetVal(5050, Cmd) should work.

    #9160
    Dons
    Participant

    Now works !!

    Thanks so much for the help.

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