02-19-2024 07:09 AM
Hii
i need to assign Index array to the values and matching with selective string array in Labview
for example [0] =500 it should be Assigned matched to with the string array "Apple" so the input should be Apple [0] and output is 500 [ Apple[0]=500]
so i dont have the idea of logics regarding this
if there are any Example Vi Kindly Provide it would be much helpful for us in developing in project we are in very tight stage kindly support .
Solved! Go to Solution.
02-19-2024 07:12 AM
Hi siddhu,
@siddhu01 wrote:
i need to assign Index array to the values and matching with selective string array in Labview
for example [0] =500 it should be Assigned matched to with the string array "Apple" so the input should be Apple [0] and output is 500 [ Apple[0]=500]
So you want to replace an array element? What about using ReplaceArraySubset?
02-19-2024 09:42 AM
@siddhu01 wrote:i need to assign Index array to the values and matching with selective string array in Labview
for example [0] =500 it should be Assigned matched to with the string array "Apple" so the input should be Apple [0] and output is 500 [ Apple[0]=500]
so i dont have the idea of logics regarding this
if there are any Example Vi Kindly Provide it would be much helpful for us in developing in project we are in very tight stage kindly support .
Sorry, your description is not clear at all. Is "apple" the label of the string array or one of the values? Is "500" a numeric value or a string with three letters? How many arrays do you have, how big are they, and where do they come from?
As a first step, attach a simplified version of your VI and explain the problem. What does your image show? (Does not look like anything LabVIEW related.)
To store key/value pairs, you could use a map instead of an array.
02-19-2024 09:42 AM
It's not really clear to me what you are trying to accomplish.
Based on your description, it sounds like you want to take the contents of an array of numerics, named "Index" and copy them to an array of strings, called "Apple".
If that is what you want, you can do it like this:
02-19-2024 11:07 PM
Hii Gerd
acutally yes i need to replace array element into array subset to find values by using along with index .
For example
Apple - String
[1]- index number
500- Value
so i need the index number to be assigned both String and Value so that i can able to search string along with index
is there are similar Concepts pls provide the vi example it would be much Helpful
02-19-2024 11:32 PM - edited 02-19-2024 11:57 PM
Hi Alten
i have updated the image above as u can see the string array Rte_SchM_rt_min has unsigned long [6] which mean each index have seperate values
for example [0] = 0 or any values so i need to implement [0] has 0 values and need to assigned with string array Rte_SchM_rt_MIN
Finally it should be like Rte_scHm_rt_min[0] =0
this method i need to implement in labview kindly support on this .
02-20-2024 12:21 AM
Hi siddhu,
@siddhu01 wrote:
for example [0] = 0 or any values so i need to implement [0] has 0 values and need to assigned with string array Rte_SchM_rt_MIN
Finally it should be like Rte_scHm_rt_min[0] =0
this method i need to implement in labview kindly support on this .
Use array functions like InitArray or ReplaceArraySubset!
@siddhu01 wrote:
Hi Alten
i have updated the image above as u can see the string array Rte_SchM_rt_min has unsigned long [6] which mean each index have seperate values
So there is an array of 6 integer values with a label of "Rte...": you need InitArray and an array indicator with the correct label.
What have you tried and where are you stuck?
02-20-2024 12:45 AM - edited 02-20-2024 12:46 AM
Hi Gerd Thanks for the Response
2. So there is an array of 6 integer values with a label of "Rte...": you need InitArray and an array indicator with the correct label.
What have you tried and where are you stuck?
actually i am new to LabVIEW so i don't know to implement this idea i have tried with Mutiple methods like combine the index number with specific value and match with string array but its doesn't work so kindly help on this !!
02-20-2024 02:27 AM
Hi siddhu,
@siddhu01 wrote:
What have you tried and where are you stuck?
actually i am new to LabVIEW so i don't know to implement this idea i have tried with Mutiple methods like combine the index number with specific value and match with string array but its doesn't work so kindly help on this !!
When you are new to LabVIEW then I recommend those Training resources offered at the top of the LabVIEW board!
I really don't understand your "multiple methods": how did you "combine index number with specific value"? Why/how do you "match with string array"?
What exactly "doesn't work"?
Please show your code!
(Please attach real code aka VIs. When you use a recent LabVIEW version then I recommend to downconvert the code using File->Save for previous. I prefer LV2019.)
02-20-2024 05:07 AM
@siddhu01 wrote:
Hii Gerd
acutally yes i need to replace array element into array subset to find values by using along with index .
For example
Apple - String
[1]- index number
500- Value
so i need the index number to be assigned both String and Value so that i can able to search string along with index
is there are similar Concepts pls provide the vi example it would be much Helpful
I still have no idea what you are trying to accomplish.