From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

USB M-series without OnboardClock

Solved!
Go to solution

Hello to the community

 

I am still trying to choose a board to generate frames at 1666.67Hz, but this time with an USB device

I was thinking about a USB_6289

However in simulation, the generation with OnboardClock throws an error (-89120)

With the FrequencyOutput, I think I can't get the good frequency (only 100kHz/16).

Is there any other way to do it ? Or should I buy a USB_63xx

 

Thank you

Cédric

0 Kudos
Message 1 of 9
(2,966 Views)
Solution
Accepted by topic author Programmer_

While you can't do it by using FreqOut, you *can* do it using one of the regular counters.  Then you could divide down the 100 kHz timebase by 60 (or other even larger integers) to get 1666.67 Hz instead of being limited to divisers in the range [1,16].

 

If both your counters are in use, the 63xx series of boards could help because they provide 4 user-programmable counters instead of 2.  (I don't know if they also support more divisors for the FreqOut signal).

 

On a similar note, you might also be able to finagle a solution on your 6289 by setting up a dummy AO task.  Configure it for 1666.67 Hz generation of a constant 0 V signal connected to nothing.  You'd need to do some special config to route its sample clock out to a PFI terminal -- look for the DAQmx Export Signal function.

 

 

 

-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).
Message 2 of 9
(2,949 Views)

I have counters available

So I guess that I just have to parameter sample clock to "External" and clock source to "Ctr0Source"

Thank you 🙂

0 Kudos
Message 3 of 9
(2,939 Views)

Hello,

 

I finally got a NI USB-6210 which has similar configuration to the USB-6289

But I'm a bit lost, as when I try to generate a frame, I get the message:

 

Error -200077, Requested value is not supported: Sample Clock (see enclosed)

 

How is it possible to generate the frame ?

Help would be welcome 🙂

0 Kudos
Message 4 of 9
(2,743 Views)

I've got bad news.  Your board is special, and not in a good way.  In exchange for being bus-powered and cheaper, some features aren't supported including the one you need -- Correlated DIO.

 

Note: none of the M-series boards would support the direct use of Sample Clock timing, but most would support Correlated DIO where a DIO task can be hw-timed by using a signal supplied by some other means.  A newer X-series board supports sample clock timing for DIO directly.

 

 

-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 5 of 9
(2,733 Views)

Thank you very much for the clarification and the support 🙂

I will go for a USB-6341, which is around the same price as a USB-62xx that can generate digital waveforms

 

Last question, just to confirm

I want to add decimal values in the "Data to Write" chart (for example I build an U8 chart containing: 255;1)

Then these variables will be converted into binaries (1111111100000001) and sent in the frame:

 

Time = 0ms to 0.6ms: '1'

Time = 0.6ms to 1.2ms: '1'

Time = 1.2ms to 1.8ms: '1'

Time = 1.8ms to 2.4ms: '1'

Time = 2.4ms to 3ms: '1'

Time = 3ms to 3.6ms: '1'

Time = 3.6ms to 4.2ms: '1'

Time = 4.2ms to 4.8ms: '1'

Time = 4.8ms to 5.4ms: '0'

Time = 5.4ms to 6ms: '0'

Time = 6ms to 6.6ms: '0'

Time = 6.6ms to 7.2ms: '0'

Time = 7.2ms to 7.8ms: '0'

Time = 7.8ms to 8.4ms: '0'

Time = 8.4ms to 9ms: '0'

Time = 9ms to 9.6ms: '1'

 

Is that right ?

0 Kudos
Message 6 of 9
(2,713 Views)

Ooooooh, hold on, wait a sec.

 

What you describe in your most recent msg looks like a single digital line that updates at 1666.7 Hz.  And yes, you *can* do that with hw-timed DO using an X-series board.  But you might also have the option of using a counter/timer.  

 

I was thrown off by your initial description of generating "frames", which I interpreted as a need to generate a DO "pattern", i.e., multiple lines in parallel and in sync.  If you only need a single digital output line, it might be easier to set up the specific timing using a counter task.

 

If the alternating time spent in "1" state and "0" state is consistent, a USB-6210 counter could do it.  If the times vary, you'd still need an X-series board that supports buffered pulse generation (M-series boards don't).

 

 

-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 7 of 9
(2,708 Views)

No regularity in the frames (the bits contained depends on the values of the parameters to send...)

The USB-6341 with 2047 samples FIFO should be alright !

0 Kudos
Message 8 of 9
(2,698 Views)

I did a quick review of the thread.  Here's my quick judgment on the 3 devices mentioned in case there's a question about what's already owned vs what needs to be purchased:

 

USB-6289: capable of app, need to pair a counter output with a "correlated DIO" task

USB-6210: not capable of app, does not support "correlated DIO"

USB-6341: capable of app, can use an internal sample clock directly for DIO, no counter needed

 

 

-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 9 of 9
(2,682 Views)