06-06-2006 04:13 PM
06-07-2006 08:26 PM
Hi Thomas,
You raise a good point, and I'm happy to see that you are wanting to make your LabVIEW code more efficient! In general, you want to avoid building up large arrays in a while loop (as you've already alluded to). I believe a queue is an appropriate data structure to offload the processing of the data to another loop. We usually call this a producer-consumer type architecture, the details of which you can find here:
Application Design Patterns: Producer/Consumer
http://zone.ni.com/devzone/conceptd.nsf/webmain/c54badadd8bbde4286256c5200533b80
You're producer loop will be the code acuiring from the CAN channels using your DLL. The queue will pass data from the producer to the consumer, where you will perform whatever analysis you need.
Have a good one!