12-06-2011 02:03 AM
Hi, everyone! I am new to labview programming.
Recently I have been trying to realize a function to trigger(or start) the third party device to do acquisition. I want to use the DAQmx to acquire one channel signal(which is continous pulse signal). And use this DAQmx acquired signal to trigger the third party device. I want each pulse signal to start the third party device to do acquisition.
Could someone give me some advice or suggestions? I would be grateful for any of your help. Thanks in advance.
12-07-2011 07:52 PM
You have not provided very much information. That makes it almost impossible for someone to help you.
One of the things you need to learn is correct terminology. DAQmx is a set of drivers for data acquisition hardware made by NI. DAQmx by itself does not acquire a signal. You also need the hardware device. While DAQmx is used with LabVIEW, it is not part of LV.
Now let me try to address your questions. What kind of signal does the third party device require for triggering? Is it a physical signal like a voltage or current? Is it a message transmitted via USB, Ethernet, or tin cans and a string? What is the timing of the signal you are acquiring? How much latency can you tolerate between the acquired signal and the trigger to the third party device? Do you need to do any signal processing or analysis on the acquired signal to generate the trigger?
Lynn
12-08-2011 09:39 PM
Hi, Lynn
Thank you very much. I am glad to get your reply. First I am sorry for my lack of knowledge of Labview. I will learn and be more careful of using the terminology.
I have "NI PCI-6052E" as the hardware device. And I use "BNC-2120" connector block to connect the trigger source. I useonly one channel of 6052E to acquire the signal. This trigger signal actually is periodic pulse signal of voltage ranging from 0 to 5V. The pulse voltage is 0V, all other are 5V.
I give my answers to your questions as followings.
What kind of signal does the third party device require for triggering?Is it a physical signal like a voltage or current?
The third party device actually doesn't have to use this pulse trigger to start, I just want to make a customized trigger to sync the third party device with the pulse signal. And each pulse make the device start working. This pulse trigger is a voltage signal that can be linked to 6052E by BNC connectors.
Is it a message transmitted via USB, Ethernet, or tin cans and a string?
I am sorry, I don't get this. I guess it transmitted by BNC.
What is the timing of the signal you are acquiring?
I used the sample clock in DAQmx timing function.
How much latency can you tolerate between the acquired signal and the trigger to the third party device?
I actually can control the interval time between each pulse. I require this interval time to be more than 1s and during this time the third party device can do acquisition itself. So the latency I think should be in the range of ms.
Do you need to do any signal processing or analysis on the acquired signal to generate the trigger?
The trigger signal is pulse signal. Actually I don't know much about signal processing, I don't know what kind signal is better for my application. If you have any better idea, please let me know.
Thanks a lot.
Yu
12-09-2011 09:07 PM
Yu,
Thank you for providing more details. Some things are still not clear to me, probably becasue I did not clearly ask the right questions.
What is the voltage required by the third party device to sync it to the pulse signal? Is it a 5 V signal or something else? What is the minimum required duration of the sync signal? Milliseconds? Microseconds?
What is the duration of the 0 V part of the pulse signal?
Lynn
12-10-2011 03:49 AM
Hi, Lynn
Thank you for your reply.
I am sorry that I didn't tell that the third party device didn't have physical connector to receive the pulse signal. So what I mean is to make a software trigger according to the signal acquired by 6052E to start the device.
This pulse signal is actually coming from AFM scanning signal, the scanning route is like zigzag pattern point by point. I want to control the interval time between each point to be in the range of 1-3 seconds. After detecting each pulse I would like to start the third party device to do acquisition for a time of less than 1-3seconds.
I tried to use the DAQmx read to get one sample at one channel to catch the pulse voltage, but I failed to do that. Do you know is there a better way to catch the pulse signal? I think the duration of the 0V is in the range of us.
Thanks,
Yu
12-10-2011 06:22 PM
Yu,
OK.
Let me summarize what I think you want.
1. You are attempting to capture a pulse signal which goes from 5 V to 0V once every 1 to 3 seconds. The duration of the 0 V portion of the pulse is in the range of microseconds.
2. After capturing the pulse you will generate a software signal to the third party device. You have not specified how LabVIEW will communicate the software trigger to the third party device.
You cannot reliably capture the pulse with an analog input on the 6052E, unless the signal is low for several hundreds of microseconds. You might be able to trigger the analog input with the pulse and use the fact that an acquisition was triggered to detect the pulse. I do not know what triggering capability the 6052E has. You might also be able to use the counter to capture the pulses.
Lynn
12-10-2011 08:12 PM
Hi, Lynn
You are right. Your summary is what I mean.
So you think by only one channel in the 6052E it is not enough to capture the pulse signal. Does this mean I need a external clock to do timing? Could you also give me some examples about how to do this or how to use the counter to capture the pulses?
Thank you very much.
Yu
12-10-2011 09:24 PM
Yu,
The 6052E has a maximum sampling rate of 333 kS/s. If your pulses have a duration at 0 V of less than 3 microseconds ( = 1/333 KHz), you cannot be sure of capturing every pulse. If your pulses stay low for 10 us or more, then you can be confident that you will capture them.
An external clock would not help.
One way of using the counter would be to count the pulses. Read the counter 1000 times per second, if you can. If the count is zero, no pulse occurred. When the count is 1, a pulse was counted. One thousand readings per second would give you the pulse time within 1 millisecond plus any read latency. If ten milliseconds is good enough, read the counter 100 times per second.
Lynn
12-11-2011 07:11 AM
Hi, Lynn
Thanks a lot for your great help. I kinda got some idea from your explanation. I will try the counter to see what I can get.
Yu