03-28-2008 08:29 AM
03-31-2008 02:04 PM
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
04-02-2008 11:25 AM
04-03-2008
06:10 PM
- last edited on
02-24-2025
07:54 PM
by
Content Cleaner
Hi eramsey82,
I can understand how the help hasn't been that helpful for you. The documentation for DAQmx is split between the LabVIEW Help file and the DAQmx Help file. The LabVIEW Help file briefly explains how to use the DAQmx VIs and property nodes, describing their inputs, outputs, and typical use cases. The DAQmx Help file goes into much more detail about the theory of using the driver and gives a lot more information about how the hardware responds to commands.
The information that would be most helpful for you is in the DAQmx Help file under a book called "Task State Model" [1]. This book explains the different states that the hardware has, what they mean, and how you can programmatically transition between them.
Looking at your block diagrams, it appears that you're trying to assign line direction individually. The 9401 only supports input/output direction at a nibble resolution [2]: the lines can only be set in groups of 4. You can write to individual lines in each group, but you can't have lines 0 and 1 input, 3 through 5 output, and 6 and 7 input. The four possible configurations are all input, all output, 0-3 input and 4-7 output, and 0-3 output and 4-7 input.
Before progressing further, my recommendation is to simplify your cases by grouping the virtual channels in the largest group possible. So for all input or all output, create one task that groups all of the lines together. If you want to address individual lines, you'll want to set the 'line grouping' input of the Create Virtual Channel VI to 'one channel for each line'.
In addition, you should probably consider using a different program architecture. The templates for User Interface Event Handler or Standard State Machine [3] would both be good places to start. Think about breaking the changes you need to make into smaller steps: have a case for resetting the hardware, another for configuring it, another for running it, another for clearing the resources, and so on.
[1] NI-DAQmx Help
NI-DAQmx Key Concepts » Tasks in NI-DAQmx » Task State Model
[2] NI 9401 Product Page
https://www.ni.com/en-us/shop/model/ni-9401.html
[3] LabVIEW Templates
File » New... and then From Template » Frameworks » Design Patterns
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
04-09-2008 09:37 AM
04-09-2008 09:38 AM
04-10-2008 04:44 PM
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
04-11-2008 11:12 AM
Wow. Thanks a lot. I figured there was some sort of timing issue, but I never would have figured it out on my own. I didn't even know about flat sequences.
Once again, thanks.
Eric
06-17-2010
09:29 AM
- last edited on
02-24-2025
07:55 PM
by
Content Cleaner
Hey Everybody,
Here's a great resource for the bidirectional nibble configuration of an NI 9401 with DAQmx.
Be sure to check out the community examples linked in the KB. I hope this helps!
- Greg J