Send command with button

Forum Home Forums Understanding the Software Using Formulas Send command with button

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #9380
    Dons
    Participant

    My variable is so configured:

    Input channel = 11094
    Output Channel = 21094

    Output channel is an OPC Device

    I can set a new value with Scada server generator with command 21094 without problems.

    Now I need to configure a button to set the variable value.

    My settings are:
    https://drive.google.com/file/d/1BB3jknGEMXYPqGcSXScBH1KqZO56aU9h/view?usp=sharing

    https://drive.google.com/file/d/18jNd9xtNyu1A5jsMYLQx4A-gx0kxE_6z/view?usp=sharing

    … but nothing happens.

    Where is the problem ?

    #9382
    Mikhail
    Moderator

    Hello,
    The settings look OK. Check in ScadaServer.log that commands are received by the server app.

    #9383
    Mikhail
    Moderator

    Screenshot of the input channel can be useful

    #9384
    Dons
    Participant

    Input channel

    If I send a command on 21094 output channel, input channel 11094 is updated and the value is sent to the opc server. (OK)

    If the output channel(60000) fornula is SetVal(11094,5) , only the local variable changes but doesn’t send the value to opc server.

    #9386
    JW
    Participant

    changing the value of input channel doesn’t send command to linked output channel.

    if you need auto sync, you will need auto control module.

    if you just want to send cmd to device and set value of an input channel at the same time once you press a button, you can create a formula

    int CmdExample(int c, int v)
    {
    SetVal(c,v);
    return v;
    }

    set the device and cmd number of out channel 60000 same as out channel 21094
    and enable formula of out channel 60000,
    CmdExample(11094,5)

    #9394
    Mikhail
    Moderator

    I recommend to change channel type of the channels that are set only from formulas to the Calculated Discrete (or Calculated Real) type.

    To send command according to some conditions and actions, Automatic Control Module is needed.

    #9395
    Mikhail
    Moderator

    As I understand your case, command should be sent by button click. In this case Auto Control Module is not required. But you should correctly set the Command Number and Device fields of the output channels. Device is related to the OPC server.

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