ni com Channels The Next Evolution of Dataflow

























- Slides: 25
ni. com
Channels: The Next Evolution of Dataflow Matt Surridge CLA Application Engineering Specialist National Instruments ni. com
The Vision Driving Lab. VIEW Reduce Artificial Complexity Tool for Scientists & Engineers as productive as Spreadsheet for Financial Analysts ni. com
The Evolution of G: Channels Communicate Between Parallel Loops ni. com
Channels Write Endpoint ni. com Channel Connection Read Endpoint
Create a Channel ni. com
Create a Channel, cont’d ni. com
Stream Channel Example
Tag Channel Example
Multi-stage Multi-rate FIR Filter 4 sub. VI instances & 2 loops all execute in parallel filter stage normal re-entrant sub. VI ni. com
FIR Filter read 0 or more samples per while loop iteration ni. com write one sample per while loop iteration
Other Popup Items ni. com
Replicate A Stream ni. com
Channel Probe
Stream Channel Endpoints ni. com Write Read Write Multiple Read Multiple Write Scheduled Read Scheduled Write With Abort Read With Abort
Tag Channel Endpoints ni. com Write Read Write Scheduled Read Scheduled Write With Abort Read With Abort
Messenger Channel Endpoints Write Read Write Scheduled Read Scheduled Write With Abort Read With Abort Write Ack Read Ack With Abort ni. com
Messenger Ack Usage Write and Read, no ack Write and wait for ack Read and ack last message Write and wait for ack later Read and ack sooner Use of ack can be message dependent ni. com
Stream Abort Usage normal abort from stop producer ni. com abort from consumer error abort from consumer
Channel Message Handler
Measure And Log panel top-3 level top-4 bottom levelabstraction UI behavior top-2 level abstraction top level top-1 level abstraction ni. com
Questions? ni. com
FAQs 1. How can I tell what’s a Channel and what’s a regular wire? Subtle diffs: asymmetric coloring, invisible tunnels, flanges at sub. VIs. 2. Won’t Channels make diagrams too confusing? Actually, less confusing because fewer references are needed. 3. Aren’t Channels changing data flow as we all learned it? They augment existing (synchronous) data flow with asynchronous flow. 4. I know how to use the built-in queue; isn’t it sufficient? Yes. But Channels are easier to construct and see the communications. 5. Channels are for beginners; why should I care about them? They make it easier to do what is already possible. Probes help debug! 6. Can I hide Channels, or all wires except Channels? Not yet. This is a subset of being able to show levels of abstraction. ni. com
FAQs 7. Can Channels be used in a built application? Yes. 8. What are the performance impacts of Channels? Channels are implemented using sub. VIs with very efficient algorithms. 9. Can I bundle Channels together? Channels are not data and cannot be put in data containers. 10. What happens if two nodes are connected by both a wire and a Channel? Wire means sequential, Channel implies parallel. Likely to deadlock. 11. When do I use a Tag versus a Stream? Depends. Use a Tag instead of a global, a Stream instead of a queue. 12. What is the biggest drawback of Channels? Easier to tackle more complex apps, but communication is hard. ni. com
Channel Implementation Details …resource/Channels/Stream/ Stream. lvlib channel direction Write Endpoints Read Endpoints )Channel. vi support VIs )Channel. ctl …Lab. VIEW Data/2016(64 -bit)/Extra. VILib/Channel. Instances/Stream-dbl/ Stream-dbl. lvlib ni. com Element. ctl