Load a 32-bit LabVIEW library in 64-bit Python
This example shows how to access a 32-bit LabVIEW library from 64-bit Python.
Labview32
is the 32-bit server and
Labview64
is the 64-bit client.
The source code of the LabVIEW program is available here.
Attention
This example requires that a 32-bit LabVIEW Run-Time Engine is installed and that the operating system is Windows.
Create a Labview64
client to communicate
with the 32-bit labview_lib32 library
>>> from msl.examples.loadlib import Labview64
>>> labview = Labview64()
Calculate the mean and the sample variance and standard deviation of some data, see
stdev()
>>> data = [1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> labview.stdev(data)
(5.0, 7.5, 2.7386127875258306)
Calculate the mean and the population variance and standard deviation of data
>>> labview.stdev(data, 1)
(5.0, 6.666666666666667, 2.581988897471611)
Shutdown the 32-bit server when you are done communicating with the 32-bit library
>>> stdout, stderr = labview.shutdown_server32()