03-13-2007 11:52 PM
03-14-2007 07:10 AM
Semi-random assortment of thoughts:
Have you actually tested DMA and found it to fail? I wasn't aware that you can't or shouldn't use DMA for data transfers in this type of app. Maybe it depends on the underlying timed digital port size? I've only used the 6259 with a 32-bit port. I've thought that it transfers a 32-bit port reading immediately on a bit change, and masking gets applied somewhere under the hood so that the 26 bits I don't care about are always reported as 0.
It sounds like you've got an M-series board with only 8 bits for timed DIO, right? I guess then I can picture how you might have trouble. It seems unlikely to me that it should matter, but have you tried to see whether it matters how you define your channel(s) -- one channel for all bits vs. one channel for each bit?
Have you tried buffering based on interrupts? Not as fast as DMA, but probably faster than on-demand. Dunno if it's fast enough to give you reliable no-miss running though.
If you *do* try DMA, what happens? Does the "available samples" property remain at 0 during changes 1,2,3 and then jump to 4 at change 4? Or does it increment 1,2,3 but not allow you to successfully Read until you get to 4?
Wish I had a definite answer to give you, but will be interested to learn more from any other followup posts.
-Kevin P.
03-14-2007 01:29 PM
03-14-2007 03:37 PM
Thanks for the details. I'm afraid I've got nothing useful to offer. Having used only the 6259 with a 32-bit port, I never encountered anything like this personally and have no experience to draw from. You've already explored all the options I know of and then some. In fact, while I think I recall that the '# available samples' property incremented by 1's on every change, I'm not 100% certain how I read the values out of the buffer. So I *think* a 6259 or other board with a 32-bit timed DIO port could work for you but I'd have to stop a little short of guaranteeing it. Assuming of course that the project has budget for one.
Anyone blue bars from NI out there with ideas for a better workaround?
-Kevin P.
03-16-2007 12:47 AM