Discussion:
Emulating "Level-Ack Leading Edge" handshake mode on a PCIe-6537
(too old to reply)
CquestOrlando
2008-06-04 22:40:09 UTC
Permalink
I am migrating from the PCI-6533 to the PCIe-6537 I/O board.  My software currently
uses Level-Ack (active high) handshake mode to acquire data from an external
radar system.  It is basically operating in an "Active High" 8255 emulation mode.  I have
searched through everything possible and am not quite sure how to retain this
capability in the 6537.  Would I use some type of Finite Burst Mode handshaking?
 
Thanks.
 
S_Hong
2008-06-05 23:40:07 UTC
Permalink
Hi CquestOrlando,
 
By default, when you configure handshaking on the PCIe-6537, it uses the 8255 handshaking protocol. For more information on this, you can refer to the following help file. 
 
<a href="http://digital.ni.com/manuals.nsf/websearch/9467F51FD45E36C1862573B000757F1D" target="_blank">http://digital.ni.com/manuals.nsf/websearch/9467F51FD45E36C1862573B000757F1D</a>
&nbsp;
How are you programming&nbsp;your application with the PCI-6533? Could you paste the snippet of code&nbsp;which configures your Level-Ack handshaking?
&nbsp;
S_Hong
CquestOrlando
2008-06-06 12:40:09 UTC
Permalink
The code snipet below shows how I am configuring a 16 bit port (Ports 0 and 1).&nbsp; Just for a bit more detail, the Radar system that the 6537
is attached to is programmed with a simple I/O board.&nbsp; There is no driver involved, so I manually watch the handshake lines to know how
and when to transfer data to the 6537 device.&nbsp; The radar does the following:
&nbsp;
1) Wait for ACK1 LOW
2) Put 16 bits of data on lines
3) Pull REQ1 HIGH
4) Wait ACK1 HIGH
5) Pull REQ1 LOW
6) Wait ACK1 LOW
7) Put 16 bits of data on lines
8) Pull REQ1 HIGH
and so on for a finite number of samples.
--------------------------------------
/*******************************************************************/BOOL InitDio_32HS ()/*******************************************************************/{
&nbsp; static short&nbsp; iDevice&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 1;&nbsp; static short&nbsp; iGroup1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 1;&nbsp; static short&nbsp; iGroup2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 2;&nbsp; static short&nbsp; iGroupSize2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 2;&nbsp; static short&nbsp; iMode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 0;&nbsp; static short&nbsp; iPort0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 0;&nbsp; static short&nbsp; iDirIn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 0;&nbsp; static short&nbsp; iDirOut&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 1;&nbsp; static short&nbsp; iLatched&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 1;&nbsp; static short&nbsp; iIgnoreWarning = 0;&nbsp; static short&nbsp; iYieldON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 1;&nbsp; static short&nbsp; iProtocol&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 1;&nbsp; // 0=Level-ACK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 4=8255 emulation&nbsp; static short&nbsp; iEdge&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 0;&nbsp; // 0=Leading edge&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
S_Hong
2008-06-06 23:40:06 UTC
Permalink
Hi CQuestOrlando,
Unfortunately, the PCI-6537 does not support Level-Ack Handshaking and therefore, we are stuck with using the 8255 protocol. Since this handshaking is done in hardware, there is nothing we can do to change the handshaking behavior.&nbsp;If you take a look in chapter 5 of the following document,&nbsp;you will notice slight differences&nbsp;between&nbsp;the Level-Ack and the 8255 protocols.
DIO-6533<a href="http://digital.ni.com/manuals.nsf/websearch/7590B6050B783B888625665E006359DE?OpenDocument&amp;node=132100_US" target="_blank">http://digital.ni.com/manuals.nsf/websearch/7590B6050B783B888625665E006359DE?OpenDocument&amp;node=132100_US</a>
Because of the similarity in behavior in behavior between the two protocols, I cannot be sure that the 8255 handshaking will not work with your radar. I would recommend trying the C example program for 8255 Handshaking found in the following directory:
..\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Digital\Handshaking\8255\Input-8255 with Delays
Because your PCI-6533 can also operate using 8255 handshaking, you can use this example program to see if your radar can communicate with this protocol. If that is the case, then there should be no problems moving on to the 6537. However, since this program will be written in DAQmx, you must make sure to have the drivers installed before running this program. Note that since the naming conventions have changed between DAQmx and Traditional DAQ, you may have to make slight modifications to the code. Please refer to the following link for details.
<a href="http://digital.ni.com/public.nsf/allkb/39F8242E2553F63E86256FE3007BF69F?OpenDocument" target="_blank">http://digital.ni.com/public.nsf/allkb/39F8242E2553F63E86256FE3007BF69F?OpenDocument</a>
S_Hong

Loading...