09-11-2024 07:46 PM
Hi All,
I have a number of cDAQ chassis running 9237 strain modules on a large distributed data acquisition project.
My typical use case is a cDAQ-9188 with a few 9237 modules. For regulatory reasons, I need to sample at 512 sample/second. To acheive this with the cDAQ-9188s, I
- Route the 20MHzTimebase to the chassis PFI0
- Set the 9237 task's sample clock timebase source to the chasis PFI0
- set the sample clock timebase rate to my rate (512) * 256 * N, where N is an integer. N = 31 works fine.
This setup works great, and also has the added benefit of sychronizing all the 9237 modules on the chasis.
Problem: Due to space constraints, I have to use a cDAQ-9184 chasis at one of my locations. This chasis does not have PFI pins (externally, nor in the routing table). I cannot find a workable method for setting timebase of the 9237 tasks to a settable source on this chasis.
Thangs that dont work
- Direct routing of chassis/ai/sampleClockTimebase to the 9237 module timebase
- Direct routing of the chassis timebases to the 9237 module timebase (e.g. 100kHz or 20MHzTimebase)
- Adding another non-9237 analog input channel and trying to borrow that timebase
I am using the DAQmx C API, but if anyone knows how to achieve this in LabView I'm sure I can translate it.
Thanks for any ideas anyone has
09-11-2024 10:22 PM
As per the 9184 spec, it has a 20MHz base clock.
On a simulated 9184 with 9237, no available routes show up in NI MAX which is weird.
Were you able to try and did you get an error?
09-12-2024 05:30 AM
First, sorry, no direct solution to your routing issue. Just a couple questions about your setup b/c some things in your description seemed surprising.
To acheive this with the cDAQ-9188s, I- Route the 20MHzTimebase to the chassis PFI0
- Set the 9237 task's sample clock timebase source to the chasis PFI0
- set the sample clock timebase rate to my rate (512) * 256 * N, where N is an integer. N = 31 works fine.
- So you put a 20 MHz clock out onto PFI0 but then you "declare" it to have the rate (512)*256*31 = 4063232 ?!? By my reading, when you later try to configure a sample rate of 512 Hz, DAQmx will start from the timebase rate you *declared* and divide it down to try to produce a 512 sample rate. Here, it'll divide down by 256*31.
However, it'll ACTUALLY be dividing down a 20 MHz clock by 256*31. Even while it thinks it's producing a 512 Hz sample rate (based on believing what you told it about an external timebase rate), it'll really be producing a sample rate closer to 2520 Hz.
Have you tested and confirmed your seemingly-crucial 512 Hz sample rate? It seems to me like you'd be sampling at ~2520 Hz. Try a simple test with finite sampling where you collect ~2500 samples and see whether it takes closer to 1 second or 5 seconds. If in fact it takes ~5 seconds, can you explain why? What's wrong in my thought process above?
- Other delta-sigma devices I've used only allow a limited range of frequencies when using an external timebase. I saw nothing in the datasheet for the 9237 to suggest that it supports external timebases at all. There's just the spec for the internal timebase of 12.8 MHz and the allowable divisors for setting a sample rate.
-Kevin P