Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Conflicts between DIO and counters on PXI 6602 (NI-TIO)

I am having trouble configuring the PXI 6602 to use the counters and Digital I/O simultaneously. I am using counters 2-4 for Buffered Period Measurement, and counters 5 and 6 for a Pulse generation.

I can configure the individual components to work correctly, but once I configure the DIO port to write to it, all the DIO lines are set to output and can't be changed back without resetting the device. I made sure to mask off the lower bits so that the upper 24 would not be affected, and I even re-routed the counter gates to the appropriate PFI line. Yet the DIO still claims everything as an output.

Here is a copy of my configuration. Any suggestions?
0 Kudos
Message 1 of 5
(3,946 Views)
I just figured out my problem. You will notice that I entered a string rather than 0 for the Digital I/O channel to be configured. I was using a virtual channel which messed up my attempts to reconfigure the other channels.

When in doubt, don't use virtual channels I guess, try to configure everything using the advanced vi's.
0 Kudos
Message 2 of 5
(3,946 Views)
Hi,

I've attached a couple examples I have here that perform the function you are wanting to do. The important thing is that you shouldn't have to route your signals to PFI lines for your counter or digital values. When you use a counter for pulse generation etc., your output for that counter will already be present on its default PFI line. I would also use '0' as the digital port instead of 'DIO0 6602' as I'm not sure how that works exactly (never tried myself).

A couple key points to remember is that you have 8 digital lines that are not shared with counters (the lower 8 bits of 32). If you configure for port 0 with a width of 8 this what you should get. You should also configure your digital lines before you configure your counter as it
is the last function to be processed that gets priority over the line.

Similarly, you can only write to lines you are not sharing with counters but you can read from all lines. This includes lines you share with the counters. I would experiment with these two examples and base your application off of them. Hope that helps.

Ron
Download All
0 Kudos
Message 3 of 5
(3,946 Views)
Hi, I have a related question to the original topic of this post: I am working on a comedi/linux driver for the 6602, and can't figure out how to access the other 24 DIO lines (the ones shared with counter/timer).
Firstly, I want to use the DIO lines for output, so I must configure them as such. The RLPM doesn't say anything more than a hint about how to configure these lines .
It seems the answer lies in using 2 bits to set to IO_Config Register. The RLPM says that these registers contain 2 bits for configuration, but only lists 00 and 01; not 10 or 11. Is it possible that setting 11 or 10 sets these PFI lines for DIO?

Any ideas on how to proceed?
0 Kudos
Message 4 of 5
(3,946 Views)
Hi Jonny,

Tough question. I haven't read the RLPM for the 6602 and I haven't tried coding for the board using RLP. I also know National Instruments doesn't support RLP (phone or email) with it's DAQ devices (I'm an application engineer with NI). What I suggest is to create a new post thread and see if any of the other posters have an idea how to help us out with this. Anyway, good luck!

Ron
Applications Engineering
National Instruments
0 Kudos
Message 5 of 5
(3,946 Views)