Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI 6238 Counter Output Frequency

Solved!
Go to solution

Hi,

 

I have a PXI 6238 and want to use the counter output application. I use ctr1, see also the attached image. However, i only get a constant HIGH signal at the port with the 24V level that I set at P1.VCC. I also use the same port as digital out in the same VI, but in a different case. There, the task is stopped when the case is finished. Therefore I tried ctr0, but no difference.

 

Thanks in advance.

 

Greets
ManuKlause


LabVIEW 2018
Veristand 2018
Teststand 2017
0 Kudos
Message 1 of 7
(3,608 Views)

The code you posted looks fine to me.  However, I'm not specifically familiar with that board.  I've only used the M-series boards that do 5V digital signals.

 

Like you, I'd be looking into whether the DO task that can sometimes run on the same port might be part of the problem here.   Are you only *stopping* the DO task or are you also *clearing* it?   It probably needs to be cleared to free up the pins as a resource that the counter task can be allowed to push signals onto.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 7
(3,591 Views)

Well, I tried it with a different port or without calling the case where the port is used as digital output. I changed the "stop task" to "clear task", without effect.

Greets
ManuKlause


LabVIEW 2018
Veristand 2018
Teststand 2017
0 Kudos
Message 3 of 7
(3,578 Views)

Ok, while the code generally looks pretty good, here are a few things that might be worth some further attention:

 

1.  Have you been checking for errors from the DAQmx functions?  I don't see the error output wired from DAQmx Stop to any indicator or dialog.  

 

2. Have you tried to generate continuous pulses from MAX?  

 

3. Your code only waits 1 second after starting the pulses before it stops them.  Are you sure you're set up to notice them within this short interval of time?

 

4. I *think* that when you wire 0 to 'initial delay', DAQmx will use the smallest value it actually supports (2 cycles of the timebase).  However, in case the request for 0 is producing an uncaught error, try leaving the value unwired or wire in a value like 0.001

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 7
(3,568 Views)

1. There are no errors. The image is just a sample of the code, that I copied to an empty space in the VI to make it more readable.

2. Yes, I tried. Withput effect. It seems that the card itself has problems? The self test of MAX has no error and the digital out functions works as intended.

3. Thats just a value for this sample, see answer 1.

4. I tried, without effect.

Greets
ManuKlause


LabVIEW 2018
Veristand 2018
Teststand 2017
0 Kudos
Message 5 of 7
(3,558 Views)

I'm afraid I'm out of ideas then.  Anyone else out there have any special insight about these digitally isolated M-series boards?

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 6 of 7
(3,553 Views)
Solution
Accepted by topic author ManuKlause

It seems not to be a problem with the software, but with the hardware. I changed the used card (I have several in the PXI chassis) and got the signal as expected. The 6238 seems broken. Thanks for your help, Kevin.

Greets
ManuKlause


LabVIEW 2018
Veristand 2018
Teststand 2017
0 Kudos
Message 7 of 7
(3,546 Views)