Digital Multimeters (DMMs) and Precision DC Sources

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI 4070 Set own trigger

My apologies if this is a very obvious question, but I'm new to DMM's and labview software.

Essentially, I have a PCI 4070 DMM, and I am trying to use it to replace an oscilloscope that is currently measuring the voltage response of a pressure gauge.

Using labview 8.0, I've tried modifiying the "Triggered Waveform" example VI, to not much avail. What I would like to do is trigger the waveform acquisition at a voltage specified by the user. It seems to me that this should be relatively easy to implement with some kind of user defined input and a greater than value. Is there a trigger block that triggers the acquisition from a boolean input? Or, am I viewing this from entirely the wrong perspective?

Ultimately, I'd also like to acquire data for a set amount of time before and after the trigger; while that's a long way down the line from an understanding point of view, any thoughts on how to do that would be helpful too!

Many thanks in advance...
0 Kudos
Message 1 of 4
(7,564 Views)
Hi ad_c
 
It seems like you have an interesting problem here and essentially you are thinking about it the right way too. However the way that I am looking at it if you would like to trigger an acquisition when a certain voltage is reached then you will have to be acquiring the data beforehand to read back the voltage in the first place. A better way of doing this might be to acquire your data continuously. Then when you read back your voltage limit you could trigger the data to be logged/saved or processed. I would recommend putting this into a producer consumer design pattern you could acquire in one loop and only when your limit was hit could you then start notifying and triggering your bottom loop to log the data.
 
This pattern could then be modified to log into a buffer and when triggered save for example the last 10 seconds of buffer and the next 10. this fould give the triggering at peak function that you mentioned.
 
Can you post the code that you have so that I can take a look and try to get a better understanding of what you want and how is the best way to appr
 
 
Graham Green

Sr. Product Marketing Manager

National instruments
0 Kudos
Message 2 of 4
(7,550 Views)
Thank you Graham, that's very helpful.

Could you clarify what you mean by "producer consumer design pattern"?

I'm still tinkering with the code, so at the moment it looks pretty much the same as the continuous waveform acquisition example code. When  I get a bit further with it, I'll post it so suggestions can be made / problems fixed!

Many thanks
Ad__C
0 Kudos
Message 3 of 4
(7,535 Views)
Hi
 
The producer consumer design pattern allows you to run two loops in parallel. Each may run at different speeds but they will use the same information. This will mean that you can for example acquire data in one loop and then at the program's discretion decide whether to pass the data recorded into a second loop to be processed, stored, etc. Your second loop may run slower but the data would be stored in a FIFO (first in first out) queue so nothing would be lost.
 
This can be found by selecting new and then instead of black VI select producer consumer. (see attached picture). i would recommend looking at this design pattern along with the master slave above it and think about when you want to be acquiring your data and how often. If you can define your inputs and outputs first then think about not only the speed of those inputs but at what stage in your program you will need to be acquiring and/or saving. Have a play with it and if you have any further questions drop me a post and I shall see what I can do.
 
best regards
Graham Green

Sr. Product Marketing Manager

National instruments
0 Kudos
Message 4 of 4
(7,529 Views)