Discussion:
8-bit reads of port0 using PXI-6229
(too old to reply)
tomsedlack
2008-05-20 15:40:10 UTC
Permalink
I am evaluating DAQ solutions for a new PXI system and am looking at the PXI-6229.  I have a simulated device configured (named DAQ) and am trying to read back port 0 as various bytes rather then the 32-bit width.  The test panel shows the device names for port 0 as port0/line0:7, port0/line8:15, etc.  When I try to read the port (using LV 8.2.1) using DAQ/port0/line0:7, it errors saying I need to read that port as 32 bits (which works).  The question is; can the port be read as 4 different bytes like the test panel or is the test panel reading it a bit at a time and just returning the byte?
 
Thanks,
 
Tom S
G Lo
2008-05-21 21:10:11 UTC
Permalink
tomsedlack,
I was able to reproduce the error and found out why it was occuring.  This is expected behavior when using port reads on a portion of the port.  DAQmx needs a read size large enough to encompass the entire port.  Basically, since port zero has 32 lines then 32 bits must be used.  Port one and two on your card are 8 bit lines and may be used with an 8 bit read.
tomsedlack
2008-05-22 12:10:07 UTC
Permalink
Then the test panel (under Measurement Automation and Explorer, v4.4.0f1, DAQmx v8.6) is probably reading the port as individual bits or bytes and just grouping them as line0:7, line 8:15, etc ?
 
Tom
G Lo
2008-05-23 16:40:08 UTC
Permalink
tomsedlack,
The lines are read as bits and will then be grouped together as port0/line0:7, port0/line8:15, port0/line16:23, port0/line24:31.
Loading...