Hi! I am a PCI-6602 user, I have some trouble using the VI file provided by the DAQ-traditional.
I opened the VI "CTR Pulse Config.vi", and input the parameters as seen in the attachment:
I am using LabView 7.0.
My problem is, if I input a number greater than 16777215, then it will show error 10137 -- invalid period.
Could anyone explain to me why this happens?
I am asking this, because I want to make a pulse with longer pulse width.
Great question! Based off of the screenshot that you had attached, you are using the internal timebase of 20MHz. (Note: Your device is also capable of 100kHz and 80MHz timebase settings.) The PCI-6602 has a 32-bit resolution, which means there is a maximum count of (2^32) - 1 counts, and thus the maximum time you can count is (2^32 - 1) / 20MHz. So, the counter will be able to send a maximum pulse width or delay of 214.75 seconds because of the 32-bit resolution and 20MHz minimum base clock.
Phase 1 is actually the number of timebase source edges the counter counts to produce the first phase of a pulse; Phase 2 is the number of timebase source edges the counter counts to produce the second phase of a pulse; therefore, the clock is defined by (2*16777215/20MHz)^-1 = 0.5960Hz and will have a maximum pulse width or delay of 1.6778 seconds. This seems like it should work, since 1.6778 < 214.75 seconds. But what is 16777215? 16777215 = (2^24) -1. It appears as if your device is being treated as a 24-bit device, as opposed to a 32-bit.
I've simulated your device on my own machine and used the Create Channel CO Pulse Ticks.vi with DAQmx. It worked as a 32-bit device and did not generate this error. The limits on the input were 2 to (2^32)-1. I haven't tried it with traditional DAQ, yet, but I will first thing tomorrow.
1. Make sure that you are using a PCI-6602.
2. In MAX, under traditional DAQ devices, confirm that the PCI-6602 populates in this section and that its device number corresponds to the device number used in the CTR Pulse Config.vi.
3. What version of traditional DAQ are you using? (You can find this information under the Software tab in MAX.)
I just tested the PCI-6602 on my machine using traditional DAQ. What I discovered is exactly what you had discovered: There is a limit of 16777215 for both Phase 1 and Phase 2. For some reason, the driver is recognizing the PCI-6602 as a 24-bit device. I will report this to the developer for further investigation.
I suggest updating your system by replacing the traditional DAQ driver with NI-DAQmx version 8.1. With this particular driver, you won't experience this limitation.
The following references were used to verify the compatibility associated with the NIDAQmx 8.1 driver, the PCI-6602 and LabVIEW 7.0:
I apologize for the inconvenience. I think you'll appreciate the improved performance and ease of usability with the NI-DAQmx version 8.1 driver, which is available for free at ni.com.
Thank you! I tried to use the DAQmx but I found the dataname of "task ID" in traditional DAQ has been changed to "task name", which seems to be not compatible with each other.. is it no way to transit from tradition DAQ to DAQmx?
If you have a lot of programming using traditional DAQ, transitioning to DAQmx is going to be difficult. If you have little programming using traditional DAQ or are starting from scratch, transitioning to DAQmx will be fairly easy. There are many example files in LabVIEW, which can be found by navigating to Help»Find Examples.
The Task ID and Task Name are differences in terminology
between traditional DAQ and DAQmx; their concepts are identical.
In traditional DAQ:
The task ID is a number that represents the specific configuration; i.e., each group you configure with AI Configure.vi will have a task ID associated with it. This ID will enable the card to know which channel(s) belong to which group and the specific configurations you have selected.
In DAQmx:The task name is a name that represents the specific configuration; i.e., each group you configure with DAQmx Create Channel.vi will have a task name associated with it. This name will enable the card to know which channel(s) belong to which group and the specific configurations you have selected. This can also be done in Measurement and Automation Explorer (MAX) by right-clicking on the NI-DAQmx Device and selecting Create Task. In this case, the configurations do not need to be programmed using LabVIEW; you can easily use a task constant in LabVIEW to reference the configurations that were set up in MAX.