Escolar Documentos
Profissional Documentos
Cultura Documentos
Agenda
Challenges of Network Communication Common Communication Paradigms
Network Shared Variable
New Features in LV 2010
Network Streams
Questions
Communication Paradigm 1
Latest Value or N Values
Only care about the most recent data Data loss is acceptable Relatively low throughput and latency requirements Typically 1 writer and 1:N readers
Logging
Update HMI
Update HMI
Client/Server Architecture
Machine 1
Client Readers Var 1 Var 2 Client Writers Var 1
Machine 2
Server
Var 1 Var 2
Machine 3
Client Readers Var 1
Client/Server Architecture
Machine 1
Server
Var 1
Machine 1
Server
Var 1
Machine 2
Client Readers Var 1
Client Readers
Var 1
Client Writers
Var 1
10
Runtime / Programmatic
Build Specs (Windows) Deploy/Undeploy Library VI server methods ( Windows, remote RT and local Windows targets) DSC Module (Windows)
11
Connection Management
Client reconnections are performed automatically by the communications protocol Errors and warnings generated when reading/writing:
Variable hasnt been deployed to the server Client attempts to read a Variable that has never been written to since it has been deployed to the server Client connection hasnt yet been established or has become disconnected
Client reader receives latest value written to the server upon connection (if any)
12
Connection Management
Machine 1
Client Writers Var 1
6 5 4 3 2
Machine 2
Server
Var 1
6 2 1
Machine 3
Client Readers Var 1
13
Connection Management
Static Variable Node
Each instance of the node on the diagram establishes a separate client connection Client connections are established before diagram execution begins
Dynamic API
Each Open Node creates a unique client connection
Connection can be performed synchronously or asynchronously
Reads and Writes using a reference not generated through an Open Node share the same connection
14
Dynamic API
Need to scale to large number of variables More explicit management over connections Decouple system configuration from runtime code
15
16
17
18
Communication Paradigm 2
Data Streaming
Potentially large data sets Data loss isnt acceptable Typically 1 writer and 1 reader Throughput is more important than latency
`
19
20
Machine 2
Client Readers Var 1
21
Machine 2
Client Readers
Var 1
4 5 6 7 1 2 3 4
22
Machine 2
Client Readers Var 1
3 4 1 2
Var 1
3 4 1 2
Var 1
3 4
23
Machine 2
Client Readers Var 1
24
Network Streams
26
Machine 2
Reader Endpoints
Endpt 1 Endpt 4
Reader Endpoints
Bill
Writer Endpoints
Ted
27
Connection Management
Connections are established once compatible reader and writer endpoints are created Order of creating endpoints isnt important
Creating endpoints acts like a network rendezvous
Connection Management
Reconnections
Performed automatically by the protocol in the background (will retry forever) Preserve lossless nature of data stream Will error if endpoints cant resynchronize Active endpoint initiates reconnection upon a disconnect
29
Machine 2
Reader Endpoint
5 4 3 2 1 5 4 3
31
32
Machine 2
Reader Endpoint
3 2 1
33
Machine 2
Reader Endpoint
3 2 1
3 2 1
34
Buffer Management
Each endpoint buffer can be independently sized Buffers are allocated when the endpoint is created Non-scalar elements are allocated as needed through read and write calls (arrays, clusters, and strings)
Buffer of Scalar Elements Buffer of NonScalar Elements
1 2 3
35
Communication Paradigm 3
Commands
Small data sets Data loss isnt acceptable Typically 1 writer and 1:N reader Latency is more important than throughput
Configure Start Stop
`
Done Stop
Done Stop
36
37
38
Summary of Recommendations
Latest Value
Network Variable
Data Streaming
Network Streams Buffered Network Variable
Distributed streaming to numerous clients Can tolerate losing data during bad network conditions
Commands
Network Streams TCP Palette Network Variable
Can tolerate losing the occasional command Latched commands
39
Questions?
41