LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stacked sequence to flat sequence

Nooooooooooo!
 
Don't insert extra code!!!!! Delete that ("To U32") again and just right-click the diagram constant and select representation...U32! 🙂


Message Edited by altenbach on 05-08-2008 11:49 AM
0 Kudos
Message 11 of 15
(1,070 Views)
oh yeah..
thanks
Best regards,
Krispiekream
0 Kudos
Message 12 of 15
(1,062 Views)
can you help me with this one..
i tried not to use stacked sequences, but case 1 and 2 always run before case 0 when I replaced stacked sequences by no sequences at all.
i dont have any subvi in this problem so i dont know how to run the wire..
so instead of avoiding the stacked sequences. i have to put it in there to make it run the way i wanted to run..
can someone give me a pointer?
thanks

p.s--yeah...i have too many local variables. i am working my way on getting rid of them. Smiley Wink











Message Edited by krispiekream on 05-09-2008 07:22 PM
Best regards,
Krispiekream
Download All
0 Kudos
Message 13 of 15
(1,034 Views)
Whew!!! It might be easer to just start conding from scratch. 😮
 
There is really no way for us to troubleshoot something like that from a few pictures. Your code is way too convoluted, and many operations could be done with no loops at all. You cannot delete the sequence yet, because you don't have a data dependency that ensures that stuff occurs in the desired order. You first need to create data dependencies!
 
For example:
  • The two while loops in frame #0 are just a "spreadsheet string to array" with a comma as delimiter and a 1D integer array as type.
  • Never do string operations on full paths (frame 0). Use exclusively "strip path" and "built path"
  • replace the two "max position" globals with a wire connecting the source to the sink, this ensures data dependency so the FOR loop has no race condition.
  • Let me guess what's in the other case of the small case structure in the lower left corner of the FOR loop. 😄 If it is a FALSE constant, delete the entire case structure!
  • The entire FOR loop is probably not needed.
  • Why do you need to read the SN table global with each iteration of the FOR loop? Is there really a possibility that it changes? That global belongs before the loop so you need to read it only once!
  • Why is the code in the FOR loop vertical instead of horizontal, there is plenty of space!
  • You can force the code in frame #2 to wait until the FOR loop has finished by using a data dependency. e.g. place the TRUE inside the FOR loop (not indexing) and wire it from ther to the global. Now it MUST wait until the FOR loop has finished due to the data dependency.

Overall, this code is a real mess. I would not re-use it. It's not worth it.

0 Kudos
Message 14 of 15
(1,027 Views)
thanks for the advice again altenbach...
i thought that the code is not as bad as you think....but i am not the expert so i guess you are right..
u that codes is not yet a mess to me. the other while loop is more of a headache..but yeah..after following your advice, my codes are looking readable to me know..
thanks again..

Best regards,
Krispiekream
0 Kudos
Message 15 of 15
(973 Views)