Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How to suppress counter output on default terminal ?

Hi all

I'm generating pulse trains using a PCIe-6320 (X series). Is there a way to suppress the pulse output on the default terminal without affecting the counter (i. e. still being able to arm or trigger other counters with the counter's internal output signal) ? I tried DAQmxDisconnectTerms("/Dev4/Ctr1InternalOutput", "/Dev4/PFI13") which did not produce an error when called but the PFI line still shows the pulse train.

 

Best regards

 

Christian

0 Kudos
Message 1 of 6
(6,171 Views)

Hey Christian,

 

Good question. You can actually just write an empty string to the output terminal and DAQmx will not route the signal to a PFI line. ctrnInternalOutput will still be routable. Use DAQmxSetCOPulseTerm().

 

Cheers, 

Andrew S

Message 2 of 6
(6,164 Views)

Hi Andrew

thanks for your answer. Unfortunately DAQmxSetCOPulseTerm doesn't do the job. It accepts the change to an empty string terminal (checked with DAQmxGetCOPulseTerm before and after the call to DAQmxSetCOPulseTerm) but the pulses are still present on PFI13 when I start the task.

 

Christian

0 Kudos
Message 3 of 6
(6,137 Views)

Ah, I forgot to add - counters on PFI lines have a behavior called "lazy uncommit' (check the output "Counter Parts in NI-DAQmx" in the C reference help) which basically means once you route an output signal to a terminal it stays routed there until some other signal uses that line. If you reset the board then use rerun your code, you won't see the signal there. You can also use the DAQmxSetDOTristate() on the line. 

 

cheers, 

Andrew

0 Kudos
Message 4 of 6
(6,121 Views)

Hi,

 

I'm new to CVI.

I have the same problem with my PCI-6230. I need to generate 4 digital pulses from 4 different lines at four different times. I've tried to use the function  DAQmxSetDOTristate() but an error message claims my device doesn't support this function. I also tried to reset, set and also to send a very short pulse to the default line (so it will be unfelt), but none of these helped. Once I set the new line, the default line also gets the same value. Is there any solution to this problem?

 

This is what I unsuccessfully tried to do (case 3 is the problematic one) :

 

  switch (flag1){


  case 1: DAQmxErrChk(DAQmxCreateCOPulseChanTime (btaskHandle,"Dev1/ctr0", "", DAQmx_Val_Seconds, DAQmx_Val_Low, 0.1, 0.5, 0.5));break; 
  case 2: DAQmxErrChk(DAQmxCreateCOPulseChanTime (btaskHandle,"Dev1/ctr1", "", DAQmx_Val_Seconds, DAQmx_Val_Low, 0.1, 0.5, 0.5));break;
  case 3: DAQmxErrChk(DAQmxCreateCOPulseChanTime (btaskHandle,"Dev1/ctr0", "", DAQmx_Val_Seconds, DAQmx_Val_Low, 0.01, 0.01, 0.01));
              DAQmxErrChk(DAQmxResetCOPulseTerm(btaskHandle,""));
              DAQmxErrChk(DAQmxSetCOPulseTerm(btaskHandle,"", "/dev1/PFI8"));
              DAQmxErrChk(DAQmxResetCOPulseHighTime(btaskHandle, ""));  

//why do these functions accept only "" and not specific output terminal names?
              DAQmxErrChk(DAQmxSetCOPulseHighTime(btaskHandle,"",0.5));
              DAQmxErrChk(DAQmxResetCOPulseLowTime(btaskHandle, ""));
              DAQmxErrChk(DAQmxSetCOPulseLowTime(btaskHandle,"",0.5));
              break;

 

}

 

 

 

Thanks in advance, 

Ifat

0 Kudos
Message 5 of 6
(5,838 Views)

hey Chris,

 

 

Maybe I faced the same problem in this threads : http://forums.ni.com/ni/board/message?board.id=40&message.id=8213&jump=true#M8213

 

as stilly32 said: you route an output signal to a terminal it stays routed there until some other signal uses that line

 

try this : http://zone.ni.com/devzone/cda/epd/p/id/5043

 


gdlbb wrote:

I'm sorry I did not reply sooner, thank you very much for your replies.

 

Yes I tried with the .vi export signal in two different ways and I did not succeed.

Daq-mx reset did not work either..

 

But, I manage to do what I want with this .vi I modified.

 

I found the original here :  http://zone.ni.com/devzone/cda/epd/p/id/5043

the .vi used a quite complex sub-vi to get the internal counter ouput (check it out)

 

many thanks !

Guillaume.

 

EDIT : With connect and disconnect terminals, I did not suceed also, the Connect terminal vi don't connect anything with me 😞

Message Edited by gdlbb on 02-02-2010 06:29 AM

 

 

Message Edited by gdlbb on 02-02-2010 06:42 AM
0 Kudos
Message 6 of 6
(5,665 Views)