04-11-2009 03:29 PM
Hi,
I've been working on this VI with lots of help from GerdW (see here http://forums.ni.com/ni/board/message?board.id=170&message.id=401189&jump=true#M401189)
but I've got the stage where I'm trying to implement a producer/consumer architecture to eliminate overwrite errors, so I thought I'd start a new message thread.
I'm at a loss for what to try next and I need to have this working on Tuesday. It seems like the subVI which looks after the software triggering is causing the processor to slow down, but I don't see how I can take this out of the producer loop. The background is that I'm collecting data from an impact event, and I need to synchronise this data with a high speed camera, so I'm using the trigger signal from the camera to trigger the VI to collect data.
At this stage it all appears to "work", except for the overwrite errors that occur after about 1 second of data collection. Can anyone offer any suggestions? (I'm attaching the VI and subVI here).
Thanks,
Claire.
04-12-2009 12:21 PM
Hi Claire,
as you continued your thread here I give you a small update on the main vi. see comments in the block diagram.
Maybe I find some time to check the subvi too...
General note: when you need indicators only for debugging you may delete them and use probes. This will greatly improve readability of your code...
04-12-2009 12:31 PM
Hi GerdW, I'm not sure if there was supposed to be a VI attached here with your comments (it's not showing on my browser?) ? Could you please re-post ?
Thanks,
Claire.
04-12-2009 12:38 PM - edited 04-12-2009 12:39 PM
04-12-2009 12:45 PM
Hi GerdW, thanks for the attachment, I'll start looking at it right now. Yup online Easter Sunday... I've got experiments starting Tuesday morning (PhD work with a surgical aspect so no chance to fix things as we go) and I need to have two VIs working by then...besides it's pouring with rain here, so not really any point to be outside 🙂
Cheers,
Claire.
04-12-2009 01:54 PM
Hi GerdW, I've fixed up what you had noted, thanks for the info on the string format, much neater 🙂
I've taken out that true/false loop in the producer loop - I didn't realise that it was just doubling the loop in the consumer loop.
Its still having overwrite errors - I think it must be a problem with the subVI holding up the process, but I don't think I can shift this to the consumer loop (or maybe I can?). The purpose of the subVI is to trigger the data acquisition appropriately - maybe it can go in the consumer loop if that loop essentially ends up "stock-piling" the data.
The other thing I'm worried about is that if the data isn't getting saved to file as it goes, there's always a risk of losing it all...I tried putting the write to spreadsheet into the green loop and the while loop, but that didn't have the effect of saving data regardless of overwrite error. Where would i need to put the write block to ensure it is writing as it goes?
Hope your work is going well,
Claire.
04-12-2009 04:41 PM