Mikhail

Forum Replies Created

Viewing 15 posts - 106 through 120 (of 6,218 total)
  • Author
    Posts
  • in reply to: Input Chanel Size and string format #17515
    Mikhail
    Moderator

    The above formula useful for constant strings.
    If you need to set a string channel manually, use the output formula SetUnicode(). Input formula is empty.

    public byte[] SetUnicode()
    {
      if (ArrIdx == 0)
      {
        string s = CmdData == null ? "null" : Encoding.UTF8.GetString(CmdData);
        int dataSize = Channel.DataLen ?? 1;
    
        for (int i = 0; i < dataSize; i++)
        {
          string part = Substring(s, i * 4, 4);
          SetData(CnlNum + i, EncodeUnicode(part), 1);
        }
      }
    
      return CmdData;
    }
    

    SetAscii() can be developed in a similar way.

    in reply to: Obtain channel data #17514
    Mikhail
    Moderator

    Hello,
    In a channel formula, use the Channel property. It provides access to the channel properties of the current channel.
    There is no function to get properties of a channel by its number from scripts. This is available in the source code of a module.

    in reply to: Input Chanel Size and string format #17509
    Mikhail
    Moderator

    Set the Data Length property of a channel.
    Channel of length 1 can contain up to 4 Unicode characters.
    If channel length > 1, virtual channels are created in memory. So the number (ID) of the next channel must be the number of the current channel + data length.

    in reply to: Universal / pre-made / generic popup like motor #17506
    Mikhail
    Moderator

    All the above ideas can work.
    A popup can be opened by an action script, or by changing a link URL.

    in reply to: rapidgate #17505
    Mikhail
    Moderator

    Hi,
    Sure
    Link
    It is also can be found from here https://rapidscada.org/product/documentation/ then Additional documentation.

    in reply to: Required to write a formula for a command #17504
    Mikhail
    Moderator

    Hi,
    Thank you for the update.

    in reply to: Universal / pre-made / generic popup like motor #17499
    Mikhail
    Moderator

    A popup is a separate view that has its own view ID. There is an old good mechanism named scheme templates that is also supported by mimics. It allows to use only one MotorPopup.mim file for similar popups.
    Example of the view arguments in the Views table: cnlOffset=200&titleCompID=4

    I suppose, you should add an export property to the faceplate to be able to set the view ID. By clicking the button the action script is executed to open a popup having the specified view ID.

    in reply to: String read and write operations #17498
    Mikhail
    Moderator

    🙂

    in reply to: Required to write a formula for a command #17497
    Mikhail
    Moderator

    Hi,
    1. In the channel properties, clear the formulas.
    2. In the Modbus template, remove nodes under the Commands node. Add a group of elements which is enough for reading and writing.

    Mikhail
    Moderator

    🙂

    in reply to: Universal / pre-made / generic popup like motor #17485
    Mikhail
    Moderator

    If you tell me more about what you plan to implement, I will try to guide you.

    in reply to: Universal / pre-made / generic popup like motor #17483
    Mikhail
    Moderator

    Probably, you mean this document. It is not translated. Of course, we will prepare docs for mimics later.

    Also useful:
    Mimic Examples.zip
    MyFaceplate.zip

    • This reply was modified 3 months, 1 week ago by Mikhail.
    in reply to: Required to write a formula for a command #17482
    Mikhail
    Moderator

    What is the channel type?
    Does the channel tied to a physical device?

    in reply to: Basic Scada Functions #17480
    Mikhail
    Moderator

    To open something in a popup, you should create a view. It may be a hidden view to exclude it from the tree.

    in reply to: Basic Scada Functions #17478
    Mikhail
    Moderator

    Hi,
    Faceplates are supported by new mimic diagrams.

    1. A faceplate (and any component) has the “On click” property that can be used to specify an action executed when the faceplate is clicked. Including an action to open another view in a popup.

    2. If you need, for example, 2 buttons for different actions on a faceplace, it is more complex. In this case it’s needed to create new exported properties in the template. To be honest, I haven’t tried it yet.

    • This reply was modified 3 months, 1 week ago by Mikhail.
Viewing 15 posts - 106 through 120 (of 6,218 total)