LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

route counter output to port0

Hi,

 

I am trying to generate a digital square waveform on the P0.0, I use a PXIe-6358. I got to the stage where I can generate the signal at a desired frequency however it appears only on PFI14. Can you please advise how to route it to P0.0 or to any other pins on the Port0? I have seen here some discussions about similar problems but none of them seemed to be suitable for port0.

 

Thanks,

Krivan

0 Kudos
Message 1 of 6
(3,212 Views)

Can you post the applicable LabVIEW code? Or, at the very least if that part of the diagram isn't too complex, an image, preferably in .png format, Not in .bmp.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 6
(3,199 Views)

Hi,

 

sure, the labview code that generates the pulses with a counter is attached. In this code the pulses are measurable on PFI12 [ctr0] . Can you please suggest how to route this signal to P0.0.

 

Thanks.

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

Hi krivan,

 

This diagram from the X Series User Manual shows what signals can be routed to P0.x: X Series Digital I/O Circuitry. Unfortunately, it does not include anything other than DIO signals.

 

The straightforward solution is to use a PFI line for your counter output. This is how the general-purpose counter/timers on the X Series devices were designed to work. You don't necessarily have to use PFI12. Use the CO.Pulse.Term property to control which PFI line the counter output is connected to:

 

CO.Pulse.Term.png

 

If you must use port0 for this, it is also possible to generate a square wave using hardware timed DIO instead of general-purpose counter/timers. This example doesn't do exactly what you want but it should be a good starting point: Continuous Write Digital Port - Internal Clock.

 

Brad

---
Brad Keryan
NI R&D
Message 4 of 6
(3,168 Views)

Hi Brad,

 

thanks for the ideas.

 

I have already tried the example vi you linked in but this way I haven't got 50% duty cycle pulses. For that reason I used the counters but to use it's output signal I must be able to send the output of the counter to port0. I would certainly use PFI lines but there is a board here that will connect to my PXIe cards and it must get the waveform at a specific point that happens to be the P0.0...

 

Thanks,

Krivan

0 Kudos
Message 5 of 6
(3,141 Views)

Hi krivan,

 

In that example, the "Pattern" control is set to [1, 2, 4, 8, 16, 32, 64, 128]. You need to change it to a pattern that will produce a square wave, such as [0xFFFFFFFF, 0x00000000] (which is actually 32 square waves: one per line).

 

Brad

---
Brad Keryan
NI R&D
Message 6 of 6
(3,124 Views)