LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

overwrite errors - attempt at producer/consumer with software trigger

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.

 

0 Kudos
Message 1 of 7
(3,554 Views)

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...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,528 Views)

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.

0 Kudos
Message 3 of 7
(3,526 Views)

Hi Claire,

 

here are both subvis with some cleanups...

 

Edited: you're really online on Easter Sunday? Ehm, me too Smiley Sad I Forgot the attachment in the first post...

Message Edited by GerdW on 04-12-2009 07:39 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(3,523 Views)

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.

0 Kudos
Message 5 of 7
(3,516 Views)

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.

0 Kudos
Message 6 of 7
(3,510 Views)

Hi Claire,

 

have a nice Easter!

 

Avoid building big arrays in the consumer loop - this may lead to memory problems and slow down your app.

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(3,505 Views)