LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

index array

hi, i have an inputstring
and the input is something like this

SetTempCycle Cycle=On Start=37.0 End=35.0 Inc=5.0 HiLim=42.0 LoLim=35.0 Dir=1 NumCycles=1 TimeOut=12 Output=Off Oven=1 Front=12 Back=4

so basically, of index 0, i set TempCharMode = On,
                         index 1, i set TempStart=37
                         index 2, i set TempEnd = 35
                         index 3, i set TempInc=5
                         index 4, i set HiTempLimit=42
                         index 5, i set LoTempLimit= 35
                         index 6, i set Dir=1 (positive direction)
                         index 7, i set NumTempCycles=1
                         index 8, i set Timeout=12
                         index 9, i set TempOutput=Off
                         index 10, i set Oven=1
                         index 11, i set Front=12
                         index 12, i set Back=4

is there a way for me to do anything with index array to let me set

SetTempCycle Cycle=On Start=37.0,42,35 End=35.0 Inc=5.0 HiLim=42.0 LoLim=35.0 Dir=1 NumCycles=1 TimeOut=12 Output=Off Oven=1 Front=12 Back=4

i don't know if my question is clear. I don't even know if it is possible to do so..
i want to set TempStart  as an array of = 37, 42, 35, etc.... and not just 37 as indicated in my picture..












Message Edited by krispiekream on 04-22-2008 01:49 PM
Best regards,
Krispiekream
Download All
0 Kudos
Message 1 of 16
(3,887 Views)
Best regards,
Krispiekream
0 Kudos
Message 2 of 16
(3,881 Views)
Hi krispiekr…,
sorry but i don´t understand what you want. Can you show what you need?
 
TIP: If you index the same array you only need to connect the first index, if it not starts with "0". After that you can resize the index vi, so you need only one block. Smiley Wink
 
Mike


Message Edited by MikeS81 on 04-22-2008 09:00 PM
Message 3 of 16
(3,875 Views)
Hi Krispie,

Are you looking for more functionality than what you posted, or for a more compact method?
Jim

LV 2020
Message 4 of 16
(3,866 Views)


i don't know if my question is clear. I don't even know if it is possible to do so..
i want to set TempStart  as an array of = 37, 42, 35, etc.... and not just 37 as indicated in my picture..


Not, it is not clear at all, however everything is possible in LabVIEW. 😄
 
Where do the extra values come from (42, 35)? Do you just want to make a new string or an entire array?
 
Overall, you code looks unmanageably complicated. Way too many stacked sequences, local variables, and unneeded and duplicate code (e.g. index array is resizeable, so you only need one instance).
Message 5 of 16
(3,863 Views)
the extra values 42, and 35 is what i want in
TempStart...
I currently have 37 only....
what can i do to allow 42, and 35 into TempStart

Best regards,
Krispiekream
0 Kudos
Message 6 of 16
(3,850 Views)
Are you saying that you have a 2D array of setpoints?  Otherwise when start temp was 35, end temp would also be.  You are still leaving out a lot of detail about what you need to do.
Jim

LV 2020
Message 7 of 16
(3,847 Views)
basically, i am doing a temperature cyclying of a chamber..

first, i SetTempCycle Cycle=On Start=37.0 End=35.0 Inc=5.0 HiLim=42.0 LoLim=35.0 Dir=1 NumCycles=1 TimeOut=12 Output=Off Oven=1 Front=12 Back=4
it start temperature at 37. increment by 5. the next temperature would be 42. then it will go back down to 37 if its inc by 5. then i have to change inc=2 so that the next value will be 35.
if end=35 therefore, the program will end once the cycle of temp 35 is over.


i wanted to know if is there anyway for me to set TempStart=37, 42, 35 for instant.
but i dont want it to limit to just 3 values.

TempStart= 37,
42,35,50,43,40, etc...whatever i type into
SetTempCycle Cycle=On Start=37.0,42,35,50,43,40  End=35.0 Inc=5.0 HiLim=42.0 LoLim=35.0 Dir=1 NumCycles=1 TimeOut=12 Output=Off Oven=1 Front=12 Back=4



right now, it is only set at 37.

once i am able to do that. i can look more into the loop of changing the temperature.


Best regards,
Krispiekream
0 Kudos
Message 8 of 16
(3,840 Views)
Hi krispiekr…;
either you can create your whole line as often as you need it with all different temperatures, or you change your coding so that the temperature is not only one value, but an array which will index in a loop.
Mike
Message 9 of 16
(3,830 Views)
You need to make "tempstart" an array instead of a scalar.
 
You string array element already has the values as a comma seperated list, so all you need to do is get the array element, use "spreadsheet string to array" with "," as delimiter, "%f" as format and a 1D DBL array as type. Try it! 
Message 10 of 16
(3,829 Views)