09-19-2007 06:09 AM
Hello,
I am doing an application in Labview using USB 6501. To develop the project I have used the virtual instrument USB-6501 Interactive Control.vi. However, what I need to do is receiving and sending pulses of a width of around 5 ms. The shortest pulse I have got at the moment is 250 ms approximately. In the data sheet is said that the minimum high and low pulse width is 100 ns, so it should be no problem. I assume that the error must be in my program, so the question is:
Is there any VI to send pulses of a determined period of time? And if there isn’t, what should I change of the main program to get the desired pulse? Or is it possible that the program causes a delay longer than the width of the pulse?
I hope you can solve my doubts.
Thanks in advance
Vicente
09-19-2007 07:30 AM
Hello Vicente
I had a quick look at the 6501 data sheet to see where you got the 100ns -> this is the shortest pulse that the onboard counter can COUNT and unfortunately counting seems to be the only operation mode of the counter that is supported on this very low price entry level product.
The more powerful devices like USB-6210 etc. support various counter modes like "single pulse" or "pulse train generation" which is probably what you are looking for.
Nevertheless: if you are using LabView it should still be possible to create pulses in the order of a few milliseconds although this is near the limit of what makes sense to do under Windows. Just set and re-set any of your DIOs and put a Wait (5ms) in between. Depending on your CPU power, you will experience quite heavy jitter on your pulses - this is from the Windows-OS (and would practically disappear if you were using LabView RT instead ...).
You could use the "Write Dig Chan.vi" from the LabView Examples as an good starting point.
Keep trying
😉 HU
09-19-2007 10:14 AM
Hi Hurban,
Thanks for your advise. It seems to be a good idea to set and reset the outputs, but how can I get it? In the front panel I don't have that option and in the block diagram I haven't found the place where I should do the changes.
Regards
Vicente
09-19-2007 10:30 AM
09-20-2007 10:01 AM
Hi Hurban,
I have tried to open your example but I can't because I have version 8.0 and the example is in version 8.2. I don't know if it is possible but can you save it in a previous version?Thanks
Regards
Vicente
09-20-2007 12:19 PM
Here is 8.0
🙂 HU
09-24-2007 04:31 AM
Hi Hurban,
Thanks for your example; it is very similar to what I am trying to do. In fact, it uses the same Sub-Vis that my program. However, I think I can’t write simply TRUE and 5 ms later FALSE, because I need to choose exactly the signal that must be changed. I would like to modify the EOT signal, that it’s in pin 15, P2.1. I attach you the original program and all I changed to get my purpose. In the original program there are four Sub-Vis that are the same. I wrote them separately because I will need to change only some signals.
So, could you have a look at the programs? Any possible solution to do it faster?
Thank you very much for your help.
Vicente
09-25-2007 04:58 AM
10-04-2007 11:27 AM
Hi,
Thanks for your suggestions. There isn't any particular reason for using DAQmx Base, I don't know if it matters. I have created four tasks because the original example had four Sub-VIs with identical content. At the moment I have a new version, where I can get a pulse of only 30 ms, although the aim continues being 5 ms. I know it is very untidy and it can be more efficient. However, the delay I think it is not caused by the different opening and closing tasks. Because, if I open one or four Sub-Vis I have the same delay: 30 ms.
PICTURE
To get the pulse I need to change a couple of things. On one side, we need to write to the cluster the new parameters, that is something I can change with the EOT button . On the other hand, we also need to change the input of the ‘Write VI’.
This is the quickest version I have got. However, I don’t know if it might be improved. I think the solution must be inside the
Thanks in advance