LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

about this VBScript

Hai to all,
i have some dobuts,
----------------------------------------------------
Call Main
Function Main
dim oLv ' LV application Objekt
dim oVI ' VI Objekt
dim sVIPath ' Pfad des VIs
dim sIONames(3) ' Namen der VI Bedien- und Anzeiegelemente
dim sIOValues(3) ' Werte der VI Bedien- und Anzeiegelemente

sVIPath = "D:\LabVIEW_VBScript\VBS_VI\mathe.vi"

' Eingänge des VIs
sIONames(0) = "Numeric"
sIONames(1) = "Numeric 2"
' Ausgänge des VIs
sIONames(2) = "Summe"
sIONames(3) = "Produkt"

' Werte an die Eingänge übergeben
sIOValues(0) = "2"
sIOValues(1) = "10"

' LabVIEW öffnen
set oLV = CreateObject("LabVIEW.Application")

' eine Referenz auf das VI holen
' object.GetVIReference(viPath,
[password, resvForCall, options])
set oVI = oLV.GetVIReference(sVIPath)

msgbox "VI Statring"

' VI starten
' object.Call2([paramName, paramVals, openFP, closeFPAfterCall, suspendOnCall])
call oVI.Call2(sIONames, sIOValues, true, true)

' Ergebnisse anzeigen
msgbox sIONames(2)&" : "&sIOValues(2)&vbcrlf&sIONames(3)&" : "&sIOValues(3)
End function
-----------------------------------------------

in this function i getting some function

"set oVI = oLV.GetVIReference(sVIPath)"
what is "GetVIreference" it is VBScript Reserve Word or, LabVIEW Word.

"call oVI.Call2(sIONames, sIOValues, true, true)"
in that also Call2?
I am confusing what is two function?
please give the your valable answers.
if you want you can download this complete document. Here i am attaching in zip format, ie. Script and VI
0 Kudos
Message 1 of 2
(2,464 Views)
srq: 204233

hello,
"GetVIReference()" is a method of LabVIEW ActiveX.
It returns a reference to a LabVIEW-VI;
The VI object oVI has several methods;

one of these methods is "call2" which calls the VI and you can pass some parameters to it, as mentioned in the comment.

If you browse the LabVIEW help and search for "ActiveX, VI class methods", you will find further information.

regards,
Robert H.
National Instruments
0 Kudos
Message 2 of 2
(2,464 Views)