Labview调用Python脚本

Labview程序框图以下:python

Python脚本以下:3d

#!/usr/bin/env python
import sysblog

#Command Line Arguements are stored in list argv
numArgs = len(sys.argv) - 1
sum = 0element

#Iterate through each element and add to the sum
for n in range (1, len(sys.argv)):
  sum = sum + int(sys.argv[n])io

sum = int(sys.argv[1]) - int(sys.argv[2])function

#use the print function to output the sum
print sumimport

脚本.py文件在这种状况下须要放在当前VI的文件目录下。程序

相关文章
相关标签/搜索