JW

Forum Replies Created

Viewing 15 posts - 61 through 75 (of 142 total)
  • Author
    Posts
  • in reply to: 报警里的 Undefined是什么意思 #9393
    JW
    Participant

    读取或计算得出的Val为NaN的话,会自动设置对于Stat为0,是某个版本开始加入的特性。

    in reply to: 报警里的 Undefined是什么意思 #9392
    JW
    Participant

    不要勾选Input channel的Event on undefined。

    例如Modbus通信偶尔某次获取不到内容,对应通道Stat会变成0,如勾选了上述选项,会出现undefined事件。然后下次通讯成功获取信号后,会出现Normal事件。

    in reply to: Auto control module settings #9387
    JW
    Participant

    tested both solutions, decided to use 2nd one.

    the 1st one is more elegant but create a lot of log in auto control module event canceling the cmd.
    the 2nd one is cumbersome when need to control a lot of relay points, but no other side effects.

    in reply to: Send command with button #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)

    in reply to: How to use Notification plugin? #9272
    JW
    Participant

    For an event triggered by “Event on change”, the alarm message will be “Changed: #Vlaues”, this type of event won’t be in notifications.

    I was just going ask about the crash on Linux server, is there any hope of fixing it or work around it?

    error log of apache, for reference

    [Fri Jul 16 20:42:33.128172 2021] [mpm_event:notice] [pid 4658:tid 140639949528128] AH00489: Apache/2.4.41 (Ubuntu) mod_mono/3.13 configured -- resuming normal operations
    [Fri Jul 16 20:42:33.128242 2021] [core:notice] [pid 4658:tid 140639949528128] AH00094: Command line: '/usr/sbin/apache2'
    [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: The namespace '' is not defined.
    Parameter name: namespaceUri
      at System.Xml.XmlBaseWriter.GetQualifiedNamePrefix (System.String namespaceUri, System.Xml.XmlDictionaryString xNs) [0x0003c] in <f996495ece6841e5bb72faf597645519>:0 
      at System.Xml.XmlBaseWriter.WriteQualifiedName (System.String localName, System.String namespaceUri) [0x0004d] in <f996495ece6841e5bb72faf597645519>:0 
      at System.ServiceModel.Channels.MessageFault.WriteFaultCode (System.Xml.XmlDictionaryWriter writer, System.ServiceModel.EnvelopeVersion version, System.ServiceModel.FaultCode code, System.Boolean sub) [0x000d4] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Channels.MessageFault.WriteTo (System.Xml.XmlDictionaryWriter writer, System.ServiceModel.EnvelopeVersion version) [0x0001a] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Channels.MessageFaultBodyWriter.OnWriteBodyContents (System.Xml.XmlDictionaryWriter writer) [0x00012] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Channels.BodyWriter.WriteBodyContents (System.Xml.XmlDictionaryWriter writer) [0x00000] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Channels.SimpleMessage.OnWriteBodyContents (System.Xml.XmlDictionaryWriter writer) [0x00000] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Channels.Message.WriteBodyContents (System.Xml.XmlDictionaryWriter writer) [0x0001e] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Channels.Message.WriteBody (System.Xml.XmlDictionaryWriter writer) [0x00019] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Channels.Message.OnWriteMessage (System.Xml.XmlDictionaryWriter writer) [0x00059] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Channels.Message.WriteMessage (System.Xml.XmlDictionaryWriter writer) [0x00023] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Channels.Message.WriteMessage (System.Xml.XmlWriter writer) [0x00007] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Channels.WebMessageEncoder.WriteMessage (System.ServiceModel.Channels.Message message, System.IO.Stream stream) [0x000b1] in <5e7508d802c343d7b5ac28643e57b1dd>:0 
      at System.ServiceModel.Channels.Http.HttpRequestContext.InternalReply (System.ServiceModel.Channels.Message msg, System.TimeSpan timeout) [0x0003c] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Channels.Http.HttpRequestContext.Reply (System.ServiceModel.Channels.Message msg, System.TimeSpan timeout) [0x00000] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Channels.Http.HttpRequestContext.Reply (System.ServiceModel.Channels.Message msg) [0x0000d] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Dispatcher.ListenerLoopManager.ProcessRequest (System.ServiceModel.Channels.IReplyChannel reply, System.ServiceModel.Channels.RequestContext rc) [0x0004b] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at System.ServiceModel.Dispatcher.ListenerLoopManager.TryReceiveRequestDone (System.IAsyncResult result) [0x00017] in <9513a2bb927146ddaa343ddc8a95d9c0>:0 
      at (wrapper managed-to-native) System.Runtime.Remoting.Messaging.AsyncResult.Invoke(System.Runtime.Remoting.Messaging.AsyncResult)
      at System.Runtime.Remoting.Messaging.AsyncResult.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00000] in <533173d24dae460899d2b10975534bb0>:0 
      at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <533173d24dae460899d2b10975534bb0>:0 
      at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <533173d24dae460899d2b10975534bb0>:0 
    [Fri Jul 16 20:42:40.322492 2021] [:error] [pid 4663:tid 140639836563200] (70014)End of file found: read_data failed
    [Fri Jul 16 20:42:40.322532 2021] [:error] [pid 4663:tid 140639836563200] Command stream corrupted, last command was 1
    [Fri Jul 16 20:42:40.340810 2021] [:error] [pid 4664:tid 140639929997056] (70014)End of file found: read_data failed
    [Fri Jul 16 20:42:40.340854 2021] [:error] [pid 4664:tid 140639929997056] Command stream corrupted, last command was 1
    [Fri Jul 16 20:42:40.340888 2021] [:error] [pid 4664:tid 140639836563200] (104)Connection reset by peer: read_data failed
    [Fri Jul 16 20:42:40.340922 2021] [:error] [pid 4664:tid 140639836563200] Command stream corrupted, last command was -1
    
    in reply to: How to use Notification plugin? #9267
    JW
    Participant

    Hi Mikhail, I am trying out this module

    what’s the function of <ParamIDs></ParamIDs> tag? couldn’t understand the description of this tag.

    Is it possible to limit the notification to certain channels only? e.g. I have 100 channels that cloud generated events. but I only want the notification module to make sound according to 3 channels.

    Is is possible to have event on status 4 changed?

    in reply to: Event on change while using formula of stat #9145
    JW
    Participant

    thanks Romiros, works perfectly!

    in reply to: Event on change while using formula of stat #9143
    JW
    Participant

    I came up with the following solution.
    One downside is that I can’t see which channels are called in the channel formula, but not a big deal.

    in dictionaries/formulas, declare the arrays I need to use,

    public static int[] lst_1 = new int[]{1};
    public static int[] lst_2 = new int[]{1,2};
    public static int[] lst_3 = new int[]{1,2,3};
    public static int[] lst_4 = new int[]{1,2,3,4};

    then in channels,

    LeakValList(lst_1)
    LeakValList(lst_2)
    in reply to: Event on change while using formula of stat #9135
    JW
    Participant

    Thanks Mikhail.

    what’s the proper way to pass an array to a formula as input, while the size of array is not constant.

    the input is usually multiple channel numbers. e.g. it can be {11,12} or {11,12,13}

    in reply to: Event on change while using formula of stat #9126
    JW
    Participant

    Q1:
    for real/discrete channel, Cnl and Val() are value before and after formula calculation;
    but for calculated real/discrete, what’s the Cnl? last value or same as Val()?

    Q2:
    Is it possible to return Val and Stat at the same time using 1 formula?

    in reply to: Event on change while using formula of stat #9122
    JW
    Participant

    Channel settings:
    the value can be 0,1,2,3
    the stat can be 0,121,122,123
    https://drive.google.com/file/d/1IXNixhZteaGPdD4zrm4qe3Q6wMCXM3lJ/view?usp=sharing

    ———————
    Formulas:

    
    int LeakValList(int [] lst) {
    int na = 0;
    int active = 0;
    int inactive = 0;
    int normal = 0;
    for (int i = 0; i < lst.Length; i++)
    {
    if (Val(lst[i]) == 1) {active ++;}
    else if (Val(lst[i]) == 2) {inactive ++;}
    else if (Val(lst[i]) == 3) {normal ++;}
    else {na++;}
    }
    if (active > 0) {return 1;}
    else if (inactive > 0) {return 2;}
    else if (normal > 0) {return 3;}
    else {return 0;}
    }
    
    int LeakStat() {
    int s = (int) Val();
    if (s > 0) {s = s + 120;}
    return s;
    }
    

    I was using Cnl, now replaced with Val() for stat calculation, but seems the same.

    • This reply was modified 2 years, 10 months ago by JW.
    in reply to: Views #8871
    JW
    Participant

    I encountered this issue too.
    My solution is adding numbering to the beginning of each item to make sure them are in order.
    The pro is the view id don’t need to be in order when you add more views.
    The draw back is the title can become very long is there is many levels.
    e.g.

    1. Overview of all sites
    2. Site A/2.1. Option1
    2. Site A/2.2. Option2
    3. Site A/3.1. Option1
    3. Site A/3.2. Option2
    in reply to: Communication Line bound to server signal limitation #8870
    JW
    Participant

    My Test Result

    When doing 1000,2000,3000,4000 signals per device, every thing works well.

    When doing 5000 signals per device, communicator gets all the signals, but only 318 signals are sent to server. (which is different from 8000 signal test)

    the signals sent to server seems to be uncertain when the limit is exceeded.

    in reply to: Bulk Creation of Devices and Communication Lines #8829
    JW
    Participant

    The method I use is edit the xml files inside the yourprojectname/BaseXML folder. KP.xml is the device table; Incnl.xnl is input channel.

    If you are familiar with xml, you can write a script to generate a complete xml file.

    Or you can make 1 example in the configuration database first, then use a script or text editor to duplicate the lines and replace the content. then copy the lines your generated back to the xml file.

      <KP>
        <KPNum>10</KPNum>
        <Name>Example</Name>
        <KPTypeID>214</KPTypeID>
        <Address>1</Address>
        <CallNum>127.0.0.1</CallNum>
        <CommLineNum>1</CommLineNum>
        <Descr />
      </KP>
    in reply to: Communication Line bound to server signal limitation #8827
    JW
    Participant

    Thanks Mikhail. I checked my other project, 3000 signals per device worked correctly. So surely 2810 is not the limit.
    Will test 4000 and 4500. 4000×2 is much more convenient than 8×1000, and should be enough for most of my projects.

Viewing 15 posts - 61 through 75 (of 142 total)