02-08-2007 09:49 AM - edited 02-08-2007 09:49 AM

Message Edited by therealkilkenny on 02-08-2007 03:49 PM
02-12-2007 10:08 AM
Hi Phil,
It seems that you're on the right track for approaching this project. All your while loops will be run in separate threads as long as you don't wire any dependencies between them (ie. wiring an output from one loop to an input in another loop).
The question of whether you should use synchronization such as queues or notifiers depends on whether you care about data being overwritten and/or duplicated. Basically, queues ensure no data is overwritten or duplicated (eg. Producer/Consumer model), and notifiers ensure no data is duplicated (eg. Master/Slave model). For example, you could enqueue elements in your fast loop and dequeue elements in your slow loop. This would mean all data that was acquired by your fast loop would be displayed on your front panel by your slow loop.
There doesn't seem to be any reason why you should use a state machine based on your project description. I would recommend using queues or notifiers based on how you want to display your data on the front panel. Another recommendation is that you might want to separate your fast loop into two loops: one for acquiring data, and one for analyzing/storing data. This is because analyzing/storing data usually takes a lot of CPU processing and might delay your data acquisition when used in the same thread.
Let me know if this helps and if you have any other questions.
Regards
Way S.
NI UK Applications Engineer
02-13-2007 07:57 AM