02-17-2016 11:47 AM
@RTSLVU wrote:I am not sure why you would need to use the shift registers.
All the data is already in the Queue, let is stay in the Queue until you need to save it, don't unload the Queue into shift registers then save the data from the shift registers. That seems rather redundant.
You have a time stamp and you know (or should know) the time then the save command is sent (t)
Once you get the save command start de-queing data from the Queue and just save the time span you want (t-1 through t+1) and then clear the queue for next time.
I agree this would be a better solution. However, the trigger condition is calculated from two consecutive data blocks. So you need to get two data blocks in order to decide whether we have or not a trigger condition. Well, you could do this calculation in the Producer loop, but I do not like to do anything else but only the DAQ in the Producer loop...Ok, at this rate this should not be the problem, but if we do this calculation in the Producer (maybe also involving a shift register to be able to compare two blocks of data), what is the advantage?
02-19-2016 02:41 AM - edited 02-19-2016 02:42 AM
Thanks a lot for your help guys!
The suggestions have helped to deepen my understanding of the various functions within LabVIEW, especially Queue, Clustering, Shift registers and Timestamps.
I'm sure you would like to hear that I have managed to implement the code and it works as desired! (insofar as my limited testing goes)
I was unable to use the Save sub Vi, but I think this might be due to my LabVIEW software. Therefore, I had to implement it using the longer method
Again, I would just like to express my thanks! I was getting discouraged for a while with the problem 🙂
02-19-2016 02:48 AM
@Anexe wrote:
I was unable to use the Save sub Vi, but I think this might be due to my LabVIEW software. Therefore, I had to implement it using the longer method
No, it is not the software, it is the user 😉
I have attached the subVI, use it in your main vi.
02-19-2016 03:53 AM
Haha, thanks a lot for that!
I really appreciate it 🙂