LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous Digital Waveform Output on PCI 6602

Solved!
Go to solution

I am using PCI 6602 to get continuous 1MHz square wave output from DIO1~32 sequentially controlled by LabVIEW. I used Ctr0 to generate a 2MHz clock and used Ctr0InternalOutput as the source of sample clock for DIO1~32. I attached the code and screeshots as follows.

 

The code is working fine on PCIe-6251 and the 1MHz digital waveform is very stable.

 

But when I run it on PCI 6602 I got an error -200077 (you have requested: sample clock; you can request: on demand).

 

Does PCI 6602 support hardware timing?. I didn't find information about this from its specs. If it doesn't support, how can I avoid this and get what I want? Thanks!

Yi

Version: LabVIEW 8.2

hardware: PCI 6602

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

I don't quite understand what it is that you are wanting to do.  Do you want to simply count the pulses from the 6251?  Do you want to capture the 6251 output waveform?

 

Your code is configuring a digital output and a counter output from the same card (6602).  Why do you need two outputs?  Isn't the 6251 providing an output?  What is the input that receives the 6251 output?

 

If you want to count pulses or capture a waveform from the 6251, wire the 6251 outputs to the 6602 inputs and configure the 6602 for digital inputs.  Or if you want to count pulses, configure the 6602 as counter input.

 

Maybe you want to trigger the 6251 with the 6602?  You would have to connect the 6602 output to a trigger input for the 6251.

 

Please be specific in telling us what you want.  According to the spec, the 6602 can accept triggers on the PFI lines, so hardware timing is supported.  You need to add a DAQmx Timing function and specify which line is to be used for timing (PFI x)

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 6
(3,884 Views)

Hi tbob,

 

It's nothing to do with 6251. I use 6251 just for testing code and the code works on 6251.

 

I want the code work on 6602. The goal is to get continuous 1MHz digital waveform output from DIO 1~32 of 6602 (just implement line 1 in the code). There is no read in my application.

 

The explanation of the code in the post:

generate a 2M pulse train from counter 0;

use the internal output of couter 0 as the source of sample clock for line 1

write digital waveform [0 1 0 1...] to line 1

 

Hope this clarify the problem.

 

Thanks,

 

Yi

 

0 Kudos
Message 3 of 6
(3,876 Views)
Solution
Accepted by topic author happyeveryday

Hi there,

 

Did you look at the specification for the 6602?

 

https://www.ni.com/en-us/shop/model/pci-6602.html

 

Click on "specifications".  Scroll down to "Digital I/O".  Look at "Timing".  It clearly says "Software".

 

The DIO lines on that board are not hardware-timed.  They are software-timed.  The spec sheet says that quite clearly.  That is why you are seeing the sample clock error -- that board doesn't support hardware-timed DIO.

 

The 6251 DOES support hardware-timed DIO, hence why your code works fine with that board.  You cannot do waveform generation with a 6602.

 

Hope that clarifies.

d

Message 4 of 6
(3,869 Views)

I tried to simulate the 6602 device and I could not get it to setup with the Counter internal output as a timing source.  I guess it doesn't support hardware timing after all.

- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 6
(3,866 Views)

Thank you

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