04-21-2010 01:56 PM
I have a global variable(120 array of cluster) where I store all my data that need to be logged. I am trying to create a report by entering the username,serial no and date as the first portion in the file. Then I need first 60 array from the cluster after that few text indicating some user actions then 60 to 120 index from the global cluster. For eg the file should look like this.
Username:
Serial Name:
Date:
Timestamp PortNumber PFR VFR Mode TP
0
1..
30
Cards swapped by the user
31
32...
60
Inside my stack sequence struture I tried to handle it but on my final sequence I didn't know how to change the index on the global cluster to read from 31 instead writing the same value again starting from 0 index. I would really appreciate some help.
Thanks
Solved! Go to Solution.
04-21-2010 02:01 PM
romesh wrote:...but on my final sequence I didn't know how to change the index on the global cluster to read from 31 instead writing the same value again starting from 0 index. I would really appreciate some help.
Thanks
Just use an Add node to add a constant of "30" to whatever comes out if the "i'.
Ben
04-21-2010 02:39 PM
04-21-2010 02:52 PM
From your reply I have to assume you are using auto-indexing tunnels (I can't look at code right but I'll still try and help).
Turn off the auto-indexing tunnels and index the array explicitly using Index Array where the index was from what I described previously.
If that was the only thing controlling the number of iterations, then you will have to pass the right number to teh "N" of the For Loop.
If that does not help, I'll stop replying and let someone that can look reply.
Ben
04-21-2010 03:06 PM
I tried to remove auto indexing the global array cluster on my for loop and it complains that "Source cluster of 1D array of cluster of six elements and sink is cluster of six elements. I tried to use index array vi and connect my global array cluster through the index vi but this time it complains that "source is cluster of 6 elements and sink 1D array of double".
04-21-2010 04:40 PM
When disabling indexing, you have to add an Index Array function to do the indexing. Start indexing at 60. Wire a constant 60 to N. The attached vi shows what Ben was suggesting.