Skip to main content

Call Py Method

adminLess than 1 minute

Call Py Method.vi

Call a python function and recieve python return data. To add function arguments before calling methods, please use Add Argument.vi before calling functions.

To get the return data, please use the following vis after calling functions:

Pop_Return_Object.vim
Pop_Return_Object x2, x3 and x4.vim

pykit-for-labview.lvlib:Call Py Method.vi
pykit-for-labview.lvlib:Call Py Method.vi
type
descriptions
cdatavalrefPykit Session In
specifies a reference to the Python session.
cstrMethod Name
specifies the name of the Python function to call. (def $Method Name)
The function name should be asign in the imported py script.
cfxdtArgument Object In
contains the arguments of the function. If the Python function does not have parameters, leave Argument Object In unwired.
cerrcodeclsterror in
error in can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs.
Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.
type
descriptions
idatavalrefPykit Session out
returns a reference to the Python session.
ifxdtArgument Object Out
contains the return data of the Python function. If the Python function does not return any value, leave Argument Object Out unwired.
ierrcodeclsterror out
contains error information.
Last update:
Contributors: ZHUO DIAO