Echelon LNS Manual de usuario Pagina 241

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 368
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 240
LNS Programmer's Guide
227
Private Sub lcaObjectServer_OnMsgMonitorPointUpdateEvent( _
ByVal msgMonitorPoint As Object, _
UpdateType As Integer, _ByVal inputDataPoint As Object, _
ByVal outputDataPoint as Object, _
ByVal srcAddress As Object)
If msgMonitorPoint.Name = sensorMsgMonPoint _
AND UpdateType = lcaMonitorEventTypeMsgRequest Then
outputDataPoint.Value = myResponseData
End If
End Sub
Controlling Message Points
You can send application messages to a device using MsgMonitorPoint objects. To
obtain a MsgMonitorPoint to use to send a single application message to a device, call
the AppDevice object's GetMessagePoint() method. This returns a
MsgMonitorPoint object that you can use to send application messages to the device.
You can do so by writing to the MsgMonitorPoint object's OutputDataPoint or
RequestDataPoint properties.
You can use the OutputDataPoint property to send a message that does not require a
response to the device. To send an application message to a device using this property,
set the DataPoint object's Value property to the value that you want to pass to the
device. All DataPoint objects returned by the OutputDataPoint property have their
AutoWrite property set to True, so the data will be automatically written to the device.
You can use the RequestDataPoint property to send a message that requires a
response to a device. The response can be requested as a synchronous response, or as an
asynchronous OnMsgMonitorPointUpdateEvent event that is triggered when the
response is received. To send the request message, set the DataPoint object's Value
property to the desired value. To request a synchronous response, call the
MsgMonitorPoint object's SendMsgWait() method. In this case, the response will be
returned by this method as a DataPoint object. To request an asynchronous response,
call the DataPoint object's Write() method. The response message will be returned via
the OnMsgMonitorPointUpdateEvent event.
As of LNS Turbo Edition you may send an application message to multiple devices using
group or broadcast addressing. To do this you must first define a dynamic message tag on
the AppDevice object that represents your application’s Network Service Device. Once
you have done so, connect this message tag to input message tags on all destination
devices. Then, create a permanent message monitor point on the Network Service Device
that specifies the new dynamic message tag as the monitor target. These tasks are
described in the Adding Message Monitor Points to a Monitor Set section earlier in this
chapter. Once you have performed them, you can then open the monitor set, and use the
message monitor point to send application messages from the Network Service Device to
the devices that are connected to the dynamic message tag.
Developing Remote Monitor and Control Applications
Monitor and control applications often need to run on a different PC than the PC running
the LNS Server, and sometimes need to be able to function when the LNS Server is not
attached to the network, or becomes unavailable due to a loss of power or other failure.
To support this, LNS allows Independent client applications to open networks in server-
independent mode. Independent client applications do not require the LNS Server to be
Vista de pagina 240
1 2 ... 236 237 238 239 240 241 242 243 244 245 246 ... 367 368

Comentarios a estos manuales

Sin comentarios