LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Global Waveform Buffer Based On Time Stamp Architecture?

I have a situation that requires multiple devices to read from a single DAQ channel and am in need of some architecture/implementation advice.  I am reading 3 analog channels, from which multiple independent VI's must read at various times based upon the integer representation of a digital port.

For example:

    VI "A" reads from all analog channels upon user event "view" button
    VI "B" reads from all analog channels when the digital port = 2.
    VI "C" reads from all analog channels when the digital port = 4

My idea was:
    All 3 analog channels are ALWAYS being logged to a buffer of 10 minutes of data (200Hz)
    Start/end times are logged to global timestamps upon rising/falling edge of the port value changing
    Upon the falling edge, a global boolean turns on that triggers a user event on VI "A" for processing of the data

Example Situation:
    1. The digital port changes from 0 to 2 which triggers a write to a global "start" timestamp
    2. The digital port changes from 2 to 4 which triggers a write to gloabal "end' timestamp, the global boolen to turn true, and then a global "start" timestamp is written to
    3. VI "A" begins processing the data form the waveform between "start" and "end" time
    4. During this, the user selects the "view" button in VI "A" which waits "n" seconds and then copies the last "n" seconds of data from the global waveform

I am not sure if my architecture is the best approach, but it is the only I could think of with multiple independent VI's reading from the same DAQ.

Please advise with any advice.

Thanks!
CLA, CTA
0 Kudos
Message 1 of 2
(2,698 Views)

Hi LVB,

My understanding from you post is that you want to acquire analog data and do different analysis on this data based on the digital port value. If this is the case, I would suggest using sub-VI’s only for the data analysis, and parallel processing to store/process the data.

 

I would avoid using different VI’s to do the analog acquisition for a few reasons. Only one analog task can be running at a time, and having multiple VI’s doing the acquisition may cause errors depending on how things are set up. I also believe that you code will run faster and more efficient by doing the acquisition in one loop, and the processing in another.

If you have further questions, please let me know if you already have a card that you are going to use, or are also looking for help choosing this as well. I could not address the timestamp issue, as I did not fully understand what it was being used for. I may suggest, along with parallel processing, using one of the timing VI’s such as ‘get date/time in seconds’ if you are wanting to record when all of your data is being acquired.

David L.
Systems Engineering
National Instruments
0 Kudos
Message 2 of 2
(2,672 Views)