02-29-2008 02:00 PM
02-29-2008 02:52 PM
Hey Clint,
Can you explain better what you want? What I understand is that you have an array of strings in LabVIEW and one in TS and you want to compare the two? Is that right?
What is the purpose of comparing them? Do you want to compare 1 element? Or would you like to see if the entire arrays are equal? And if so are you using it as a condition for something?
Where are you getting the data from?
If you have two local arrays you could do this wherever conditions are accepted: Locals.Array1 == Locals.Array2 and that will see if they are equal.
Let me know some more details and I'll help you find the best solution.
Thanks
03-03-2008 05:17 AM
03-03-2008 06:25 AM - edited 03-03-2008 06:28 AM
03-03-2008 10:36 AM
03-03-2008 11:08 AM
Maybe I'm making more out of this than need be. I have a PXI Chassis w multiple PXI Cards. I found an example (Develop Zone) that you could query the cards over the back plane and find out their slot #. I would look in MAX and verify that the returned slot # corresponded to the card I expected in that slot. MFG was happy with this and I called it my "Health and Well ness Check". It verified I could at least talk to a card before I began the Self Test. I knew the slot from MAX and used that in TS to compare what I read in a LV Coded Module. If they were equal the test passed. I was able to do this with all my cards expect the PXI8433/2. It returned COM3 and COM4 ( an Array of Strings) , not just Slot 1 or not just slot 2. Thinking I could just do like an numericarray check only with strings I was happy. But you can't. This is where I am now. I can save a lot of grief if I can just some how query the PXI8433/2 to make sure its "alive" before I do the self test. Other wise I have to parse the string to get each of the com ports out of the string returned.
Go ahead make my day,
Clint
03-03-2008 11:25 AM
BTW
I understood your first sentence and was lost after that !!
03-03-2008 11:28 AM
03-03-2008 12:14 PM
Locals
.ReturnedArray == Locals.CompareArray ? Step.DataSource = True : "Step.Result.PassFail"This assumes you have two local string arrays called ReturnedArray and CompareArray. My VI returns an array that gets assigned to ReturnedArray. CompareArray contains the values I want to compare the returned array with.
The VI simply asks for two strings and then the user click the Done button to return the two strings as an array back to TS.
This is very much a hack but it seems to be working.
Let me know if you have any troubles or questions.
03-04-2008 05:35 AM
Basically, yes.
Someone posted a TS Seq earlier that I haven't tried yet either.