04-10-2018 12:58 PM
Hi all,
I have a usb6501 that I want to use as an output device. I am using the matlab library from Plexon (plexDO) to drive it. I am able to pulse a single bit at various frequencies, but I am wondering if it is possible to pulse multiple bits at different frequencies. Ideally, I'd be able to set up unique parameters for each of the 24 pins and simultaneously drive them. Is this possible with this device? If not, what device would you recommend?
Thanks!
mflamini91
Solved! Go to Solution.
04-11-2018 05:54 PM
I can't speak to what is possible through Plexon, but according to the manual, "All samples of static DI lines and updates of DO lines are software-timed."
http://www.ni.com/pdf/manuals/371594b.pdf
So this should be possible however, software timing (on demand) is generally not the best way to do things, especially at high frequencies as there is a lot of latency when user space applications on your computer are controlling hardware. Depending on what you are trying to do, this may be just fine, but I wouldn't expect to be able to do any very high speed communication with that setup.
https://zone.ni.com/reference/en-XX/help/370466AC-01/mxcncpts/smpletimingtype/
Generally, to have hardware timing at X number of rates will require hardware with X clocks. The device you are looking at only has one. 😞
For more info on a device that might accomplish your task, check out
http://ohm.ni.com/advisors/compactdaq/pages/common/intro.xhtml?conversationContext=1
and click on "Start building your system" then on "Counter Measurements/Pulse Generation".
04-12-2018 11:03 AM
Huge thanks for that response. I do have one followup question however:
If I am using a single threaded language like matlab, can I do the software timing of multiple channels?
Thanks!
04-12-2018 11:13 AM
Not 100% sure but one thing that pops into my mind that you could attempt (no idea if this is possible)....
If the frequencies are all integer scales of each other, you could possibly tell the device to write to all channels simultaneously (as if writing bytes). On your fastest channel, you would switch from 0 to 1 every cycle, a pulse that you wanted to be half as fast could do switch with every other cycle and so on.
Might look something like:
Ch | Cycle
Ch1| 0 1 0 1 0 1 0...
Ch2| 0 0 1 1 0 0 1...
Ch3| 0 0 0 1 1 1 0...
Again, this is not something I've tried but it seems like it could work.
04-12-2018 11:17 AM
I was afraid youd say that haha. I had thought about this as well. It gives me some of the function I need, but not the flexibility I need. I'll have to see if it will suffice. Thanks for the input!