Best practices for real-time LabVIEW ↔ Julia data exchange

You want to call Julia from LabView right? I don’t know much about LabVIEW, if it can call C then it can call Julia in-process. That would be fastest (realtime isn’t about speed really, rather predictability). Shared memory though as fast. From one process to another with Julia, maybe still ok, i.e. with:

I think though LabVIEW0.jl would be ok for you, using ZeroMQ;

The latency of Julia call is about 1-2 ms. 1 MB data transfer (forth and back) in binary format “door to door” - from numeric array in LV back to numeric array in LV, inclusive all necessary data transformations in LV and Julia, takes about 20-25 ms on my notebook. At about 100MB transfer, LV may get out-of-memory (8 GB RAM installed).

Julia CAN do hard-realtime, but then we’re not talking idiomatic Julia code nor able to run on standard hardware (no hard-realtime can); I think you’re talking about soft-realtime, where memory allocations ok, and Julia should be then fine on standard hardware.

ZeroMQ CAN use TCP, or work only on same machine, seemingly better for you. I’m not sure what the package does, or allows all of its options? Maybe all are available to you or at least what you need.

2 Likes