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
    catcute
    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
    Mikhail
    Moderator

    Hi,
    Provide screenshots please.

    #4111
    catcute
    Participant

    Pls check link:

    #4112
    catcute
    Participant
    #4113
    manjey73
    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
    Mikhail
    Moderator

    Most likely.

    #4120
    catcute
    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
    Mikhail
    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
    catcute
    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.