NI Home > Community > NI Discussion Forums

Counter/Timer

Reply
Member
AlexanderRyabov
Posts: 20
0 Kudos
Accepted Solution

Pulse width depends on the number of pulses (pci 6602)

Hello,

i try to generate finite samples with pci-6602,

I use CO Pulse Ticks + Implicit options

External pulses is 1PPS 1ms impulses from GPS trimble receiver

if i set number of pulses = 1, then i got pulse length = (High ticks -1)

if i set number of pulses >=2 and low ticks>=3, then i got pulse length = (High ticks)

if i set number of pulses >=2 and low ticks=2, then i got last puls width = (High ticks -1) and all other pulses with length = (High ticks)

With single pulse generation pulse width is (High ticks -1)

 

Are there any option to configure the same impulse width for any number of pulses for a finite train (N pulses)

 

screens in attach

Active Participant
Kevin_Price
Posts: 1,916

Re: Pulse width depends on the number of pulses (pci 6602)

Kind of a long shot, but by any chance are you using a *very* old version of DAQmx? Maybe 7 point something? I remember back around that time seeing a similar behavior. In my case, I was concerned with using a DAQmx property node to query for the "Pulse Done?" flag to go True. And I kept noticing that under certain conditions, the flag would go True one source tick earlier than expected. I didn't have any cable & terminal block on the board so I never checked whether the output signal had the same quirk as the "Pulse Done" flag. I *think* I was also using a 6602, but it may have been an M-series board. I basically figured, "oh well, can't rely on doing things *that* way" and moved on. I haven't really looked into it since that time, but it seems like the kind of thing that would get addressed in subsequent versions of DAQmx. -Kevin P
Member
AlexanderRyabov
Posts: 20
0 Kudos

Re: Pulse width depends on the number of pulses (pci 6602)

I use labview 8.5 with daq-mx release June-2008

Active Participant
Kevin_Price
Posts: 1,916
0 Kudos

Re: Pulse width depends on the number of pulses (pci 6602)

Do you have a system where you can try the program with a newer version of DAQmx?  Dunno if it'll help, but it's the only thing I can think to try.

 

Can anyone from NI comment on whether this is a known issue or whether the behavior may be DAQmx-version dependent?

 

-Kevin P

Member
AlexanderRyabov
Posts: 20
0 Kudos

Re: Pulse width depends on the number of pulses (pci 6602)

thanks for the reply, will upgrade software soon
Member
Lea_D
Posts: 88

Re: Pulse width depends on the number of pulses (pci 6602)

hey AlexanderRyabov,

 

I'm interested in trying this out on my system with daqmx 9.4 on it to see if I get the same error. I don't have a 6602 (but might be able to find one if needed); however, I have an x-series and an m-series DAQ card in my computer right now. Thanks for attaching the screencaptures. This extremely helps. Is there any way you can attach the code or a more complete diagram of it? I'd like to run exactly what you're running to test it. I don't see indicators for the waveform charts you have at the bottom in your code.

 

Additionally, I'm not entirely sure if this is a bug that's been fixed in daqmx since the 8.0 version was a really long time ago. For now it looks like your coding is correct, so I think if you have an option to upgrade, I'd definitely check it out. One of the things you should note though is the daqmx/labview compatibility guide. it looks like you can get up to daqmx version 9.3 with LabVIEW 8.5. 

 

 

Lea D.
Applications Engineering
National Instruments
Member
AlexanderRyabov
Posts: 20
0 Kudos

Re: Pulse width depends on the number of pulses (pci 6602)

Hello, the program i have posted is a labview standard example Finite digital pulse train (CO Pulse ticks option) I post complete diagram of it, waveform charts at the bottom obtained from PCI-6123 (runned as another VI). Counter output and PPS signal were connected to the analog input of pci-6123 (installed in same PC) i can post program on the next business day (March, 12) -- Alexander
Member
Lea_D
Posts: 88
0 Kudos

Re: Pulse width depends on the number of pulses (pci 6602)

Hey Alexander,

 

Posting that program could be helpful. Can you give us some more information or a summary of your overall application?

Lea D.
Applications Engineering
National Instruments
Member
AlexanderRyabov
Posts: 20
0 Kudos

Re: Pulse width depends on the number of pulses (pci 6602)

Hello all,
thanks for replies!
Let me describe my program.

The required program functionality:
generating pulse train of a given length and intervals
Pulse duration will be given from a range of 2 - 1000 seconds,
the intervals between pulses of 2 - 1000 seconds with 1 second step
pulses will be used for triggering other counter

an attachment program generates a pulse train of specified length and intervals from 1PPS timebase

the problem is:
If i set high ticks = 3, low ticks = 3, number of pulses = 2
i got 2 pulses with 3 seconds duration and 3 seconds pause between them
If i set high ticks = 3, low ticks = 3, number of pulses = 1
i got 1 puls with 2 seconds duration
I need to configure program to generate pulses the same duration for any number of pulses

I use digital oscilloscope (pci-6123) for pulse monitoring (in attach)

Connection diagram:
1PPS connected to AI-0 of PCI-6123 (oscilloscope) and PFI-31 of PCI-6602 (terminals 34 and 68, terminal block SCB-68)
PFI-28 of PCI-6602 (terminals 32 and 42) connected to AI-1 of PCI-6123 (oscilloscope)

Generating pulse train:
Channel parameters: Dev4/ctr2
Source of ticks: Dev4/PFI31

System devices:
pci-6123 "dev1"
enet-9215 "enet-1416895" (unplugged)
pci-6221 "dev2"
usb-6210 "dev3" (unplugged)
pci-6602 "dev4"

system:
NI-DAQmx 8.8
labview 8.5

Member
Lea_D
Posts: 88
0 Kudos

Re: Pulse width depends on the number of pulses (pci 6602)

Hey AlexanderRyabov,

 

Thanks for that additional information. It helps a whole lot in identifying what the problem actually is. I've been looking through it over here, and it doesn't look like any of the coding would be wrong. The number of high ticks does specify how many ticks the pulse would be high and low for how many ticks the pulse is low. I find it odd that you're getting other behavior than this. 

 

I took a look at the original screencaps that you sent, and looking at the one called Finite Pulse 3 seems to be the one with the problem. Is this consistant every time you run it? If not, I wonder if it's somehow missing one of the ticks in there.

 

I did some digging on this end and found some similar bugs and issues related to these older versions of daqmx. I'm wondering if what you're seeing is something like those ones. Do you have access to test this on a machine with some more up-to-date software? I've been trying to find a 6602 to do some testing on this end, but haven't found anything. Please let us know.

Lea D.
Applications Engineering
National Instruments