Странная работв скрипта

Интегрованная среда разработки (IDE) промышленных приложений.

Странная работв скрипта

Сообщение k-shultz » Чт авг 10, 2017 5:37 pm

Добрый день. Помогите пожалуйста разобраться.
В Galaxy создал свой объект.
В нем есть Predefined Script с условием While Showing.
Там происходит присвоение переменных типа:
SetCustomPropertyValue("VALUE",VAL_REF+".PV",true);
SetCustomPropertyValue("IS_HI",VAL_REF+".Hi.InAlarm",true);
SetCustomPropertyValue("IS_HIHI",VAL_REF+".HiHi.InAlarm",true);
SetCustomPropertyValue("IS_LO",VAL_REF+".Lo.InAlarm",true);

После этого пытаюсь написать булевскую логику
Dim Var1 as Boolean;
Var1=IS_HIHI and not IS_HI;
Далее присваиваю Var 1 определенной в объекте переменной
BLINK=Var1;

Почему этот участок кода после Dim не работает никак?
Отслеживаю изменение IS_HI и IS_HIHI они меняются, но переменная BLINK всегда false

Пишу по другому
If Is_HIHI and not IS_HI then
Blink=true
else
Blink=false
endif;
тоже никакой реакции по переменной Blink, в чем дело? Почему не работает скрипт, в мануалах ничего не нашел.
k-shultz
 
Сообщения: 2
Зарегистрирован: Чт авг 10, 2017 4:56 pm

Re: Странная работв скрипта

Сообщение Larrrik » Чт авг 10, 2017 5:46 pm

При вызове данного метода в Вашем случае нужно задавать значение последнего параметра равным False:
SetCustomPropertyValue("VALUE",VAL_REF+".PV", false);
SetCustomPropertyValue("IS_HI",VAL_REF+".Hi.InAlarm", false);
SetCustomPropertyValue("IS_HIHI",VAL_REF+".HiHi.InAlarm", false);
SetCustomPropertyValue("IS_LO",VAL_REF+".Lo.InAlarm", false);
Larrrik
 
Сообщения: 40
Зарегистрирован: Вт авг 26, 2014 6:47 pm

Re: Странная работв скрипта

Сообщение k-shultz » Чт авг 10, 2017 6:43 pm

поменял на false. Ситуация не изменилась
k-shultz
 
Сообщения: 2
Зарегистрирован: Чт авг 10, 2017 4:56 pm

Re: Странная работв скрипта

Сообщение Генератор зла » Вт авг 15, 2017 11:18 pm

L00091226: When the OnShow symbol script contains external references the data may not be available at run time due to a timing issue. For example, this can occur with the ArchestrA symbol method SetCustomPropertyValue. To resolve this issue, Application Server 3.1 SP2 has enabled a configurable OnShow symbol script timeout to allow external references to resolve in the following sequence of events:
The data is subscribed and the symbol will be drawn disabled.
A timer triggers for the OnShow script with a user-configurable maximum wait time.
The timer callback execute. It checks for initialization of all data references.
Data Callbacks occur for all subscribed data references.
The timer callback executes. It checks references and proceeds to execute the scripts.
The symbol is enabled, then the OnShow script executes followed by triggering the timer for the While Showing script.
Named scripts become eligible for execution as soon as OnShow completes.
OnShow will not wait for Invalid references and custom "---" properties to resolve. If the external data does not become available within the configured timeout, the OnShow script will still execute but will place a message in the Logger that not all references have been resolved. Because WhileShowing and named scripts will be blocked until OnShow executes, some events may be missed. For example, the named script OnDataChange will not run during the time OnShow is delayed even if the data point is changing.

When you select the OnShow predefined script, the Data Timeout text box displays in place of the usual Trigger Period text box. Use the following parameters to configure the Data Timeout:

The default for new graphics is 1000ms.
The default for migrated graphics is 0ms.
Maximum value permitted is 30000ms.
Minimum value permitted is 0ms.
Only integers are valid.
--------------------------------
784344
References from a graphic embedded in another graphic may resolve incorrectly when the SetCustomPropertyValue action script is used to change the embedded graphic to a different owning object.
-------------------------------
https://okmgcs.km.invensys.com/gcs/inde ... iewlocale=
--------------------------------
Vita est dolor.
Генератор зла
 
Сообщения: 2860
Зарегистрирован: Вс янв 23, 2011 5:08 pm


Вернуться в Development Studio & FactorySuite A²

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 3

cron