Discussion:
NI USB 6501 to monitor parallel port
(too old to reply)
Aro
2008-04-10 22:40:09 UTC
Permalink
Hi guys,
 
I am using the NI USB 6501 to monitor parallel port communication between a windows 3.10 computer (host) and a measuring device (peripheral). The host and peripheral are connected via straight through 25 pin parallel cable. I snoop all lines from this cable Control-4, Status-5, Data-8, GND-8, and route it to the USB 6501's terminals. All the ground lines are connected to one of the USB 6501's GND terminal, rest of the signals are connected as in the code below for my capture software. I record the control, status and data bits to a text file. Ran the software on the host side with the peripheral on and my capture software running. I know for sure that the first thing the host do is send the contents of an ascii file to the peripheral. But when I analyzed the log from my capture software, the characters formed of data bits doesn't match the contents of the ascii file. Do any one know what I am doing wrong here. Is it really possible to monitor parallel port signals using USB 6501?
 
/* code in thread start up */
// DAQmx create taskpDlg->UpdateError( DAQmxCreateTask("MyCapture",&pDlg->m_hTaskHandle) );
 
// DAQmx digital input channel settingsif( pDlg->m_nNIErrCode == 0 )      pDlg->UpdateError( DAQmxCreateDIChan(pDlg->m_hTaskHandle,                                           "Dev1/port0/line0:7",                                           "Data",                                           DAQmx_Val_ChanPerLine));
if( pDlg->m_nNIErrCode == 0 )      pDlg->UpdateError( DAQmxCreateDIChan(pDlg->m_hTaskHandle,                                           "Dev1/port1/line0:3",                                           "Control",                                           DAQmx_Val_ChanPerLine));
if( pDlg->m_nNIErrCode == 0 )      pDlg->UpdateError( DAQmxCreateDIChan(pDlg->m_hTaskHandle,                                           "Dev1/port2/line3:7",                                           "Status",                        &nbs
Nick F
2008-04-11 21:40:15 UTC
Permalink
Hi Aromal, Do you know how fast the data is being output from your host computer?  It looks like your application is reading the ports on the USB-6501 software timed, which means that it reads the ports as fast as Windows allows it.  Is it possible that you are not recieving all the data that is being passed.  It looks like the Parallel protocol says that when nStrobe goes low, there is data available.  Are you checking for this and only reading once each time the line goes low? If the data transfer is slow enough, slower than 1 or 2 ms for each data change, then the USB6501 can do it.I found this webpage through Google that might be of use for information on the parallel port.http://electrosofts.com/parallel/
Aro
2008-04-11 22:40:07 UTC
Permalink
Hi Nick,
I also suspect my application is not fast enough to capture the data. From my log, I see that DAQmxReadDigitalLines is being called around 550 times in a second, so that is every 1.8 ms. Also I log data byte, whenever the strobe goes from high to low. I might be missing many transitions. Do you have any suggestion? How can I do hardware timed capture?
Nick F
2008-04-14 14:40:08 UTC
Permalink
Hi Aromal, To perform hardware timed capture, you will need to get a data acquisition board with timing for the digital channels.  You can find these by going to www.ni.com/daq.  From there, click on atleast 1 under Digital I/O Channels.  On the left side of the page, there is a section called Digital I/O timing.  Click Hardware in that section and you will see all the hardware timed digital cards that National Instruments offers.  If it is possible to slow down the transmission, then it that might be another option.  This most likely won't be possible, but it is something to consider. 
Aro
2008-04-28 15:40:11 UTC
Permalink
Hi Nick,
I want to know if the NI PCI-6250 can be used to monitor parallel port events with sufficient speed. The parallel port event like strobe will last for minimum 0.75 us. We need to monitor 8 data, 4 control and 5 status lines (17 lines in total). The  PCI-6250 spec says it has 24 DIO channels, hardware timing, max clock rate of 10 MHz. So if we use this device with the NI labview express software, can it record all parallel port events(>=0.75 us) for a duration of 5 minutes or more and generate a log file?
Thanks.
Nick F
2008-04-29 22:40:10 UTC
Permalink
Hi Aromal,

The PCI-6250 would not work for you because it only has one port (8
lines) of correlated digital I/O which means that it only has 8 lines
that can run at 10 MHz.  Since you need 17, this would not work. 

It looks like your best bet is to use the PCI-6533.  This board has 24
channels of correlated digital I/O channels that can run up to 10 MHz. 
When you use this, you will have to read off of ports 0-3 and disregard
the unwanted data. 

I was not clear on your previous post, but are you using signal express
to acquire and log this data?  Signal express does not have the ability
to log this type of data.  You would have to get another Application
Development Environment (ADE) like LabVIEW, CVI or Measurement Studio
in order to do the logging that you want. 

Please let me know if you need me to clarify any of this.  Have a great day.
Aro
2008-04-29 23:10:05 UTC
Permalink
Hi Nick,
We are looking to buy the PCI-6533 with Measurement Studio. Will standard version of Measurement Studio be sufficient?
Also, how do hardware timed capture work? Does the card store the samples in its memory? What is the smallest interval per line and how long can the logging be done? Also Measurement Studio can query the device only as fast as windows allows it. Isn't it right?
Regards,
Nick F
2008-04-30 16:40:08 UTC
Permalink
Hi Aromal, Measurement Studio will work fine for you.  Hardware timed works by acquiring data at discrete intervals using a sample clock and buffering that data until you read it into you Application Development Environment (ADE).  The card is constantly reading data and putting the data on the buffer which will stay there until you pull the data from the buffer into Measurement Studio.  That way Windows won't slow down the acquisition and you will be able to read data constantly and consistantly. We use the same method when performing hardware timed analog input and output.  If you have any other questions, please let me know.
Aro
2008-04-30 18:10:13 UTC
Permalink
Ni Nick,
How big is the PCI-6533 buffer? The Windows based ADE will be polling the card may be every 1 to 2 msec. Since the clock speed of PCI-6533 is 10 Mhz and if we configure it to capture parallel port events every 25 us, it has to hold 40 to 80 samples based on how fast the ADE is querying. Does it have enough buffer size to store this many samples for all 17 lines?
Regards,
Nick F
2008-05-01 18:10:07 UTC
Permalink
Hi Aromal, There is a small FIFO that allows you to transfer data from the card into the PC memory.  The buffer I am talking about is in the PC memory.  DAQmx allocates the amount of memory that you need depending on how you setup the task so it will definitely be able to handle the amount of data that you need.
Nick F
2008-05-01 19:40:07 UTC
Permalink
Hi Aromal, I apologize, I got my card numbers mixed up.  The card that I suggested is only 2MHz.  If you are using PCIe, then I would suggest the PCIe-6536 or the PCIe-6537 which are 25MHz and 50MHz respectively.Before we get much further though, I think it would be good to take a step back and get a better idea of what you are trying to do.  What parallel port mode are you using?  Are you planning on using a clock external to the DAQ card or from the DAQ card?  Do you have a timing diagram that can give me a better idea of the signals you are looking for?  With more information, I can give a better recommendation for your needs instead of just basing it off of the speed of the card.
Aro
2008-05-01 20:40:05 UTC
Permalink
Hi Nick,
I noticed the PCI-6533 had only 2MHz clock speed and was more interested at the PCI-6534 which has 20 Mhz. I was planning to connect the host PC and the peripheral using standard 25 pin cable. Snoop 18 lines (17 signal+1 GND) from this connection and pass itt to the PCI-6534 's Digital input port. Run the Measurement Studio and configure the DAq to capture data continuously and log it.
Regards,
Aro
2008-05-01 20:40:05 UTC
Permalink
Hi Nick,
The intention is to somehow log all events completely . Strobe change, busy change, data bit change everything. We tried using USB6501 and the log was incomplete. The mode is most likely bi-directional. Below link gives the timing diagram for the parallel port.
<a href="http://www.interfacebus.com/Design_Connector_Parallel_PC_Port.html" target="_blank">http://www.interfacebus.com/Design_Connector_Parallel_PC_Port.html</a>
&nbsp;
Nick F
2008-05-19 21:40:09 UTC
Permalink
Hi Aromal, I apologize for taking so long to get back to you, I somehow missed your reply.&nbsp; I hope things are going well with you.&nbsp; Have you selected a card to use yet?&nbsp; Do you still need a recommendation for a card to communicate with your parallel port?&nbsp; Please let me know and I will gladly find a card for you.
Continue reading on narkive:
Search results for 'NI USB 6501 to monitor parallel port' (Questions and Answers)
3
replies
Computer Help···•(_.·´¯)··•¦»?
started 2008-09-12 17:27:18 UTC
desktops
Loading...