12-08-2010 09:25 AM
Dear All.
Help Me...
English is not very good. Google translator is used.
How do I pass an array of strings?
Please refer to the VB program
===========================================
Private Sub m_btn_Click()
Dim nReturn As Long
Dim sPpid As String
Dim sMdln As String
Dim sSoftRev As String
Dim nCount As Long
Dim saCCodes(2) As String
Dim naPCount(2) As Long
Dim saPNames(10) As String
sPpid = "PPID001"
sMdln = "Mdln"
sSoftRev = "Rev001"
nCount = 2
saCCodes(0) = "1"
naPCount(0) = 5
saPNames(0) = "Param001"
saPNames(1) = "Param002"
saPNames(2) = "Param003"
saPNames(3) = "Param004"
saPNames(4) = "Param005"
saCCodes(1) = "2"
naPCount(1) = 5
saPNames(5) = "Param006"
saPNames(6) = "Param007"
saPNames(7) = "Param008"
saPNames(8) = "Param009"
saPNames(9) = "Param010"
nReturn = m_XGem.GEMReqSend(sPpid, sMdln, sSoftRev, nCount, saCCodes(0), naPCount(0), saPNames(0))
If (nReturn = 0) Then
Call Me.AddMessage("[EQ ==> XGEM] GEMReqSend successfully")
Else
Call Me.AddMessage("[EQ ==> XGEM] Fail to GEMReqSend (" & nReturn & ")")
End If
End Sub
=================================================
nCount, naPCount enough saCCodes, saPNames value must be sent.
How to handle an array of strings in LabView is impatient.
I want to VB program implemented in LabView.
12-08-2010 09:28 AM - edited 12-08-2010 09:30 AM
Hi,
you handle an array of strings the same way as an array of numbers
There are a lot of functions in the Array palette!
Please be more specific on what you're trying to do.You want to pass an array, but what's the target?
And you don't need to cry in the thread topic!
12-08-2010 09:40 AM
12-08-2010 10:05 AM
Sounds like you need to read some of the LV tutorials:
http://zone.ni.com/devzone/cda/tut/p/id/7571
12-08-2010 06:14 PM
psCCode, pnParamCount, psParamNames is StringArray.
The first pointer to an array of string values I want to pass.
In the first string of EXGemVb GEMRspPPmt should proceed with an array value.
VB program, the value of the results is attached.
12-08-2010 06:29 PM - edited 12-08-2010 06:30 PM
GEMReqPPFmtSend is a description.
===================================
GEMReqPPFmtSend (sPpid As String, sMdln As String, sSoftRev As String, nCount As Long, psCCode As String, pnParamCount As Long, psParamNames As String) As Long
Parameters
Name , Type desc
======================================
sPpid , String , Process Program ID
sMdln, String, Equipment Model Type
sSoftRev , String , Software Revision
nCount, Long, CCode Array of Count
psCCode, String, CCode Array of the first Item pointer
pnParamCount, Long, ParamCount Arrayof first the Item pointer
Parameter in the CCode gaesuim each ParamCount
psParamNames, String, ParamName Array pointer of the first Item
ParamName the ParamCount Array of Array Size Total number of information is the sum of all.
=======================================
12-08-2010 06:32 PM - edited 12-08-2010 06:39 PM
Have you actually tried to right click on the according node parameter and select Create->Constant or Create-Control??
And I don't see any string array in the parameter list. That are all simple strings and the VB code in your first post clearly shows that the call to the function only indexes the first element of those arrays to be passed to the function, not the entire array.
If the function really reads arrays despite being declared as only taking strings then it is using some weirdo VB trickery and there will be no way to replicate that in LabVIEW.