From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-26-2009 06:26 PM
Dear Lab View discussion group members,
I would like to request some advice about how to stop sampling of two different signals simultaneously. I have been able to confirm they start sampling at the same time (based on time stamp on loop first call), but the waveform time for my two signals is vastly different. The AE signal always samples for the correct time, but the load signal always shows about 1.5 to two seconds longer acquisition time.
it must have to do with the vastly different sampling rates ( 500 Khz vs. 1000 Hz). I can't get my head around why the load acquisition loop would run so much longer though even though each loop iteration should be about .001 + 10 micro seconds (acquisition rate plus buffer that NI adds).
I tried to use timed loops, but the result is the same. in this case I wired the loop iteration value (dt) to be...
(signal acquisition rate)*(number of samples to acquire)
I also tried to use notefiers and master slave configuration ( where load loop was the slave and a notefier was sent every time 500 iterations of the AE loop were accomplished). This did not results in simultanous stops either.
My ultimate objective is to get two files and then compare spikes in my AE signal to when a specific load occurred. I will then count the number of spikes occuring within certain load ranges and generate a histogram.
I will be out of the office next week, returning July 6. I will reply to any posts at that time.
thank you
Alfonso
Solved! Go to Solution.
06-26-2009 06:32 PM
06-26-2009 06:42 PM
Dennis,
I am trying to sample acoustic emission signals (voltage) and a load signal (voltage)
AE signal is being acquired with NI 9221 compact DAQ card at 500 to 600 Khz
load signal is being acquired with a PCI 6221 at 1000 to 2000 Hz
I know NI 9221 can not aquire load and AE simultaneously at different rates, or I would do that.
REgards,
Alfonso
06-27-2009 03:28 AM
I can not see that you need two separate loops. Also skip the software timing. I guess that is causing your trouble. Just put the the NI-6221 reading into the loop running the NI-9221 read. Perhaps put them into a frame so both are read before data is written to file. I think also are pulling data from your NI-9221 buffer to often. You read the buffer 500 times pr second. Perhaps lover this to 50 times pr second. So each time you read the NI-9221 pull 10000 samples from the buffer, and 40 from the NI 6221 buffer. And for the timing just skip it. Stop your loop then you have run it 100 times. Assuming you read 10000 samples from the NI-9221 on each iteration you will then have read 100x10000 samples equal to two second of data
07-06-2009 09:56 AM
Thanks for your reply Coq Rouge,
I will try to implement your suggestions. One problem I had when trying to integrate the read operation in one loop was the AE signal read kept giving me an error that the data was no longer available and kept crashing the system.
Would this have to do with how many times are read from the buffer?
I need very high acquisition rates for the acoustic emission data acquisition as events occur very rapidly.
Regards
07-07-2009 02:37 PM
The error message that you are getting comes from not reading your buffer fast enough. This happens because new data overwrites the old data before you can read it. You can prevent this by increasing the amount of data that you read every time you perform a read.
Nick Keel
Applications Engineering
National Instruments
07-07-2009 06:41 PM
NAKeel,
I have implemented a read operation of my two independent acquisition events in the same loop. The load acquisition is taking place normally. But the AE acquisition is not taking place at all. not sure where the problem is. When running the VI in slow motion to debut, the first call goes though OK. But there is no data for the AE acquisition.
Do you have any suggestions?
I did not wire the samples to read input to the read VI in hopes Lab View would regulate the samples read and timing automatically.
I have attached the new VI
07-08-2009 03:23 PM
What hardware are you using? You have two analog input start tasks, which will only work if you have an S-series card. Can you run the AE task if it is all by itself in the VI (i.e. no other tasks)?
Nick Keel
Applications Engineering
National Instruments
07-08-2009 06:33 PM
NAKeel,
the hardware I am using is
CDaq 9221 for fast acquisition of acoustic emission signals
PCI 6221 for slower load acquisition (M series)
either of the acquisitions works fine in a loop alone. However, when combined, the AE stops acquiring.
Thanks in advance for any suggestions.
07-09-2009 10:52 AM
The problem you were getting came from having the wrong device name specified for the AE channel. You were getting error 200220. Once I updated the name to a valid device the VI ran properly. Did you switch computers or change the order of your devices in MAX? Try reselecting your device input to your create channel VI and it should work properly.
Nick Keel
Applications Engineering
National Instruments