Зарегистрирован: Feb 16, 2007 Сообщения: 123 Рейтинг: +7/-0 Откуда: Енакиево
Добавлено: Чт 08 Ноя, 2007 7:32:32 Заголовок сообщения: RSVIEW SE и Events
Доброго времени дня, коллеги.
Вопрос касается RSVIEW SE.
Кто сталкивался, поделитесь. Как работает обработчик событий (Events) в RSVIEW SE в частности команда Display.
Задача такая: при наступлении события вызывать окно на RSVIEW SE Client.
Заранее всех благодарю за помощь.
Существует распределенная система server – client. Client находится на удаленных рабочих станциях. Необходимо, чтобы дисплей вызывался на конкретном компьютере.
При переходе в True на Client - e в ответ на команду Display в Diagnostic List читаем Download и все...
Существует распределенная система server – client. Client находится на удаленных рабочих станциях.
Сервер не знает про клиентов - его задача ответить клиенту (грубо - не важно какому).
maxim писал(а):
... Необходимо, чтобы дисплей вызывался на конкретном компьютере.
"Конкретный компьютер" может быть выключен (или не подключен как клиент) - что дальше должен делать сервер (даже если сервер умеет включить нужный экран на конкретном компьютере)?
Понятно. А если мы будем говорить не про одного конкретного клиента, а про всех подключенных клиентов, сможет ли сервер вкючить экран на клиентах при наступлении события?
Вы же знаете, что в клиент-серверных системах все events исполняются не на клиенте, а на сервере. Поэтому, чтобы выполнить какую-то команду на клиенте по событию на сервере, нужно либо менять логику управления, либо использовать какие-нибудь специальные механизмы.
Вот что есть в Knowledge Base по этому поводу:
Цитата:
ID 22007
How to trigger a command on an SE client from an HMI server.
Question
How to trigger a command on an SE client from an HMI server
Answer
Background
In some RSView SE applications, there may be a need to execute a command on a client when an event occurs. Some examples of this would be displaying an alarm summary screen when an alarm occurs, play a wave to alert an operator of an alarm condition, or displaying a warning screen when communications are lost.
Since the Event Detector is designed to automatically execute commands when certain conditions are met, one might think that a Display command issued from an Event Detector would be the way to accomplish this goal. However, the Display command does not contain a mechanism to run a command at a remote client.
Therefore, any command run by an Event Detector will execute at the HMI server hosting the event file, not at a client. Depending on the command, that command may or may not be valid when issued at the HMI server. For example, if a Display command is executed from the Event Detector (or a command line), the following warning will appear:
The command 'Display' is ignored when issued from the development environment or an HMI Server
Solution:
The following technique will allow a command or macro to run on a client. Please note that since VBA is single-threaded, your application should only run one script at a time. VBA will queue up requests but there are variable limits to what it can hold in the queue. In general, VBA scripts should be short and to the point rather than continuously-running semi-applications.
Use an Event Detector to set a memory tag to 1. Alternatively, create an object (for example a button or an object with Touch animation) that sets the tag.
Create a numeric display that monitors the tag in step 1.
Right-click it and select "Property Panel".
Make sure the "ExposedToVBA" property is set to "VBA Control".
Close the Property Panel and right-click the numeric display. Select "VBA Code".
In the Change event for this numeric display, add the following code:
Код:
Private Sub NumericDisplay1_Change()
On Error GoTo ErrorHandler
If Not IsError(NumericDisplay1.Value) Then
If NumericDisplay1.Value = 1 Then
ExecuteCommand "command string"
End If
End If
Exit Sub
ErrorHandler:
LogDiagnosticsMessage Err.Description, ftDiagSeverityError
End Sub
For example, to display a graphic called "Popup", the syntax would be ExecuteCommand "Display Popup". Since this will execute on the client, no error will occur. Other RSView SE commands or macros can also be called in this way.
Вы не можете начинать темы Вы не можете отвечать на сообщения Вы не можете редактировать свои сообщения Вы не можете удалять свои сообщения Вы не можете голосовать в опросах
Smart Solutions VDT GmbH | Friedrich-List-Allee 38, D-41844 Wegberg-Wildenrath, Germany Tel.: +49 2432 933 57 83 | e-Mail: office@vdt-solutions.de Все товарные знаки и торговые марки являются собственностью их владельцев.
При использовании материалов сайта ссылка на данный сайт обязательна. Открытие страницы: 0.126 секунды