Forum Home › Forums › Questions in Native Languages (Experimental) › Questions in Chinese. 中文问题技术交流 › 报警里的 Undefined是什么意思
- This topic has 10 replies, 4 voices, and was last updated 3 years, 1 month ago by Zeus.
-
AuthorPosts
-
August 4, 2021 at 6:41 am #9327xdwokcnParticipant
楼主您好,如题,经常出现莫名其妙的报警,显示Undefined
August 5, 2021 at 7:19 am #9340ZeusParticipant方便发一下截图么? undefined 是数据的状态
August 5, 2021 at 9:28 am #9349ZeusParticipant数据 有value 和status 0代表undefined
August 9, 2021 at 2:11 am #9379zzzParticipant就是没有值,指定时间的数据集没有采集到这个指标的值,通讯出错之类的。
可能是因为Double类型不能为空,所以用此状态表示读数无意义,
若没记错公式计算值若无意义,需要设置Undefined状态,否则即使返回NaN,界面照样显示为0。August 11, 2021 at 1:05 am #9385ZeusParticipant你可以在公式里对state进行赋值 代码含义如下
/// <summary>
/// Не определён
/// </summary>
public const int Undefined = 0;
/// <summary>
/// Определён
/// </summary>
public const int Defined = 1;
/// <summary>
/// Архивный
/// </summary>
public const int Archival = 2;
/// <summary>
/// Ошибка в формуле
/// </summary>
public const int FormulaError = 3;
/// <summary>
/// Изменён
/// </summary>
public const int Changed = 4;
/// <summary>
/// Недостоверен
/// </summary>
public const int Unreliable = 5;/// <summary>
/// Аварийное занижение
/// </summary>
public const int LowCrash = 11;
/// <summary>
/// Занижение
/// </summary>
public const int Low = 12;
/// <summary>
/// Нормализация
/// </summary>
public const int Normal = 13;
/// <summary>
/// Завышение
/// </summary>
public const int High = 14;
/// <summary>
/// Аварийное завышение
/// </summary>
public const int HighCrash = 15;/// <summary>
/// Вход разрешён
/// </summary>
public const int InPermitted = 101;
/// <summary>
/// Выход разрешён
/// </summary>
public const int OutPermitted = 102;
/// <summary>
/// Доступ запрещён
/// </summary>
public const int AccessDenied = 103;
/// <summary>
/// Повреждение ШС
/// </summary>
public const int WireBreak = 111;
/// <summary>
/// Снят с охраны
/// </summary>
public const int Disarm = 112;
/// <summary>
/// Поставлен на охрану
/// </summary>
public const int Arm = 113;
/// <summary>
/// Тревога
/// </summary>
public const int Alarm = 114;August 11, 2021 at 11:37 am #9392JWParticipant不要勾选Input channel的Event on undefined。
例如Modbus通信偶尔某次获取不到内容,对应通道Stat会变成0,如勾选了上述选项,会出现undefined事件。然后下次通讯成功获取信号后,会出现Normal事件。
August 11, 2021 at 11:39 am #9393JWParticipant读取或计算得出的Val为NaN的话,会自动设置对于Stat为0,是某个版本开始加入的特性。
August 25, 2021 at 2:32 am #9423xdwokcnParticipant不好意思,好久没有光顾论坛了,是这样,我的项目由于ModBus通信不稳定,经常会有部分设备短时间无法通信,但是过一会又好了,但是这是RapidScada就会报Unreliable错误,而且会大面积报,我的想法是,有没有一种方法就是设备通信有问题的时候不去报警,只是纯粹的当位置变化的时候才报警。
September 1, 2021 at 3:42 am #9477ZeusParticipant你是轮询么?是不是用了串口服务器
October 5, 2021 at 9:07 am #9552JWParticipant可以考虑以下几个措施同时采用
1. 对应的Channel不勾选Event on undefined;
2. Instance -> Server -> Saving parameters -> Unreliable on inactive 选择 disable, 或者根据需要设置1小时等长时间;
3. 对应的Channel设置以下公式,如果返回值是nan,会保留上一轮的值而不更新返回的值。
double.IsNaN(Cnl)?Val():Cnl
October 6, 2021 at 1:55 pm #9553ZeusParticipant66666
-
AuthorPosts
- You must be logged in to reply to this topic.