Display and Set the String Value for tag

Forum Home Forums Understanding the Software Display and Set the String Value for tag

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #4107
    Avatarcatcute
    Participant

    Hi,

    I have a Input channel (Calculated real , ASCII text), then I create a output channel to set string text for input channel use formular:SetVal(222, CmdVal),but when I set string value, it is display:”Incorrect command value.”! Can you suggess the solution for this.

    #4109
    MikhailMikhail
    Moderator

    Hi,
    Provide screenshots please.

    #4111
    Avatarcatcute
    Participant

    Pls check link:

    #4112
    Avatarcatcute
    Participant
    #4113
    Avatarmanjey73
    Participant

    You use a standard command, and it takes numeric values. Probably it is necessary to use a binary command and convert the string representation to hex with a formula ?Maybe that’s the reason.

    #4117
    MikhailMikhail
    Moderator

    Most likely.

    #4120
    Avatarcatcute
    Participant

    Hi, command type of output channel change to binary. Error of Scada server as below:
    —-
    2018-08-11 08:08:41 <HN3521><SYSTEM><ACT> Users are read from the configuration database
    2018-08-11 08:08:41 <HN3521><SYSTEM><ACT> Formulas are read from the configuration database
    2018-08-11 08:08:41 <HN3521><SYSTEM><ERR> Error compiling the source code of the formulas:
    Line 602, column 103: error CS0029: Cannot implicitly convert type ‘double’ to ‘byte[]’
    See the file C:\SCADA\ScadaServer\Log\CalcEngine.cs with the source code
    2018-08-11 08:08:41 <HN3521><SYSTEM><ERR> Normal program execution is impossible.

    —> How can I solve this problem?

    #4124
    MikhailMikhail
    Moderator

    Your formula is incorrect for binary command. It have to return array of bytes. Instead of CmdVal you need CmdData variable. I can write you a correct formula for a fee. Creating formulas is out of free support.

    #4129
    Avatarcatcute
    Participant

    Hi, thanks, I will try fisrt!

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