03-10-2011 10:24 AM
Hi,
I am using a usb6009 and I am importing two digital 1-5vdc pulse inputs aproximately 0.795ms long. I want to know if there is any way of designing a labview program that can count the time between these pulses using the usb6009.
03-11-2011 03:56 AM
Hi Marcopronto,
I would like to help you with this but I will need a little more information. It should be possible.
1) What sort of time difference are we looking at? Is it expected to be s, ms, us?
2) Are you receiving multiple pulse or just one pulse input?
4) How accurate do your results need to be?
Regards,
Chris
03-11-2011 06:35 AM
Hi Chris,
Dont realy know how this forum works so my alias has changed to coosey from marcopronto..
Anyway I have a system set up like this, two fork light barriers set up in series, a tennis ball will pass both of the barriers triggering two seperate pulses. I want to measure the time between them so I can display a speed reading. The minimum pulse will last .0795ms(miliseconds) at 249ph. The sensors can be set up at a distance of 70m - 150mm and at the max speed and minimum distance the time between pulses will be approximately 1.084ms(miliseconds).
I would like the system to be accurate as possible as it is for a college project.
Regards
Marcus
03-11-2011 06:40 AM
Hi Marcus,
As this is for a college project it would be good to know what you have done already. Have you set up an acquisition task to take in one of the pulses yet?
Best Regards,
Chris
03-11-2011 10:26 AM
Hi Chris,
I am a bit of a novice with Labview, but I think I am able to set up acquisition tasks, by acquisition tasks I mean open up a DAQ in the block diagram window and configure it for a specific input port, I have configured the input range and made it continuous sampling..Is this what you mean by set up acquisition task?
Regards,
Marcus
03-14-2011 04:56 AM
Hi Marcus,
Yes, that's what I meant. I think the easiest solution from a software point of view would be to have both inputs coming in on the same DIO line and then perform a counter period measurement. This could be set up with th DAQ assistant (found in the DAQmx sub palette in LabVIEW) or with lower level DAQmx functions. You should be able to find an example of this in the LabVIEW Examples found through the Help menu.
http://decibel.ni.com/content/docs/DOC-12160
The other option is to read in both digital lines separately and use correlated DIO but I don't think this is an option with the USB-6009.
If you are going with the first option you will need to think carefully about how you connect the system up on the hardware side. If you use a common ground you could protect the gate outputs using diodes.
Regards,
Chris
03-15-2011 04:05 AM
Hi Chris,
I have solved this problem thanks for the help.
Could you tell me where I could fing a simple example of how to output a 5V current with the usb 6009
03-15-2011 04:44 AM
Hi Marcus,
I understand that this is for a college project and standard practise is to not to make full working solutions on these forums. Also, professors and lecturers actively monitor these forums and I wouldn't want them to have any doubts about your work. If I tell you what you will need to consider then you should be able to work out what DAQmx functions you need to use and how to configure them. There are plenty of examples in LabVIEW which you can find through the help menu which you can use for guidance.
Firstly, can I assume you mean a 5V voltage? If you did mean current you wont be able to perform that with the 6009. The things you will need to consider are as follows:
Other things you will need to consider are whether you want to generate data continuously or for a finite period of time. You will definitely be able to find examples of the two in the LabVIEW Examples.
I hope this helps. Please have a go at this yourself and if you run into problems just post back on here with what you have and we can go from there.
Best Regards,
Chris