在Python下调用Labview

 

    •   安装hoplite

 

    •   安装python_labview_automation

 

  • Demo
from labview_automation import LabVIEW

lv = LabVIEW()
lv.start()
with lv.client() as c:
    control_values = {
        "DBL Control": 5.0,
        "String Control": "Hello World!",
        "Error In": {
            "status": False,
            "code": 0,
            "source": ""
        }
    }
    indicators = c.run_vi_synchronous(
        vi_path, control_values)
    print(indicators['Result'])
    error_message = c.describe_error(indicators['Error Out'])
lv.kill()

 

 

posted @ 2017-10-26 16:43  ystwyfe  阅读(4054)  评论(0编辑  收藏  举报