LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

pulse train generation with better precision

I was wondering if there is a way to generate a pulse train with a width that is less than 2 milliseconds using labwindows 7.0 and a PCI-6602, I need more precision.

Derek

0 Kudos
Message 1 of 7
(3,181 Views)
What seems to be the problem? According to the catalogue your card has an 80MHz counter so you should in theory be able to do 1/(80 x 10^6) i.e. 12.5 ns.

Maybe I'm missing something! 🐵
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 2 of 7
(3,181 Views)
the problem is, using the GPCTR_Set_Application function and the ND_RETRIG_PULSE_GNR parameter and then using the GPCTR_Change_Parameter function and changing the ND_COUNT_x parameter it only accepts values greater than 1, which would produce a 1ms width. I don't know, I feel I am probably missing something.
0 Kudos
Message 3 of 7
(3,181 Views)
Derek,

This is definitely possible. To configure the specifications of the pulse train, you should use code similar to the following:

------------------------------------------------------
iStatus = GPCTR_Change_Parameter(iDevice, ulGpctrNum, ND_SOURCE, ND_INTERNAL_100_KHZ);

iStatus = GPCTR_Change_Parameter(iDevice, ulGpctrNum, ND_COUNT_1, ulLOWcount);

iStatus = GPCTR_Change_Parameter(iDevice, ulGpctrNum, ND_COUNT_2, ulHIGHcount);
------------------------------------------------------

With the PCI-6602, you can choose one of the following internal timebases:

100 kHz -> ND_INTERNAL_100_KHZ
20 MHz -> ND_INTERNAL_20_MHZ
80 MHz -> ND_INTERNAL_MAX_TIMEBASE

Then, ND_COUNT_1 and ND_COUNT_2 dictate the number of "ticks" of the
timebase that occur when the pulse train is low and high, respectively.

Good luck with your application.

Spencer S.
0 Kudos
Message 4 of 7
(3,181 Views)
the problem is that the legal values for ND_COUNT_1 and ND_COUNT_2 are only 2 through 2^32 - 1, so I can not get any smaller widths than 2 "ticks". This means I can only get a width of 2ms using the 100kHz internal timebase.

Derek
0 Kudos
Message 5 of 7
(3,181 Views)
Correction: I'm sorry, I meant I could only get a width of 2microseconds, not milliseconds...
0 Kudos
Message 6 of 7
(3,181 Views)
On 11.08.2004 18:15, dschless schrieb:
> the problem is that the legal values for ND_COUNT_1 and ND_COUNT_2 are
> only 2 through 2^32 - 1, so I can not get any smaller widths than 2
> "ticks". This means I can only get a width of 2ms using the 100kHz
> internal timebase.
>
> Derek

So wy do you not use the other available timebases, e.g.

20 MHz -> ND_INTERNAL_20_MHZ
80 MHz -> ND_INTERNAL_MAX_TIMEBASE

Stephan
0 Kudos
Message 7 of 7
(3,181 Views)