09-07-2010 10:42 AM
I need to transfer a large array from one sequence to next sequence in stacked sequence structure. I made a property node in next sequence, it works. But I did not feel it is the best way to do it. Please advice if any better way to do this job. Thanks
09-07-2010 10:45 AM
Using a stacked sequence structure is never a good way to program anything and using a property node just makes it worse. Use a flat sequence structure if you must use any type of sequence structure and just wire from one frame to another. Better would be to use a state machine and pass the value with a shift register.
09-07-2010 10:49 AM - edited 09-07-2010 10:50 AM
If you really feel you must use a stacked sequence (and under almost all instances you shouldn't) a property node is about the worst way to transfer data, large or small. It causes the code to execute in the User Interface thread, usually slowing the execution drastically, and sets you up for possible race conditions. Why aren't you (if you really feel you must use a sequence structure) just wiring the data wire to the frame, where you have right clicked and created a "sequence local" it is created in and then wiring it in the one it needs to be? To understand why a stacked sequence isn't a great idea do a search on sequence structures, or state machines ( a better construct).
09-07-2010 11:05 AM
You already received the correct answers above... 😄
Still, your question is not clear at all. Please try to describe the problem in more detail, maybe attach a simple VI that shows the main points.
@detech wrote:
I need to transfer a large array from one sequence to next sequence in stacked sequence structure. I made a property node in next sequence, it works.
Are you trying to transfer data between "frames" of the same sequence structure or between two different sequence structures that are data dependent?
As has been mentioned, to retain data between frames of the same sequence, use sequence locals.
Anyway, I am absolutely sure there is a better way to do all this. If you show us your code, we can point you in the right direction. 😄