Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Emulating "Level-Ack Leading Edge" handshake mode on a PCIe-6537

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?  I should
mention that I am programming in ANSI C not Lab View.
 
Thanks.
 


Message Edited by CquestOrlando on 06-04-2008 05:40 PM
0 Kudos
Message 1 of 6
(4,480 Views)
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. 
 
 
How are you programming your application with the PCI-6533? Could you paste the snippet of code which configures your Level-Ack handshaking?
 
S_Hong
S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 2 of 6
(4,456 Views)

The code snipet below shows how I am configuring a 16 bit port (Ports 0 and 1).  Just for a bit more detail, the Radar system that the 6537

is attached to is programmed with a simple I/O board.  There is no driver involved, so I manually watch the handshake lines to know how

and when to transfer data to the 6537 device.  The radar does the following:

 

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

😎 Pull REQ1 HIGH

and so on for a finite number of samples.

--------------------------------------

/*******************************************************************/
BOOL InitDio_32HS ()
/*******************************************************************/
{

  static short  iDevice              = 1;
  static short  iGroup1             = 1;
  static short  iGroup2             = 2;
  static short  iGroupSize2      = 2;
  static short  iMode                = 0;
  static short  iPort0                = 0;
  static short  iDirIn                 = 0;
  static short  iDirOut              = 1;
  static short  iLatched            = 1;
  static short  iIgnoreWarning = 0;
  static short  iYieldON           = 1;
  static short  iProtocol           = 1;  // 0=Level-ACK
                                                       // 1=Pulsed-ACK
                                                       // 2=Pulsed-ACK (long pulse)
                                                       // 3=Burst
                                                       // 4=8255 emulation
  static short  iEdge                = 0;  // 0=Leading edge
                                                       // 1=Trailing edge
  static short  iReqPol            = 0;  // 0=Active high
                                                      // 1=Active low (inverted)
  static short  iAckPol             = 0;  // 0=Active high
                                                       // 1=Active low (inverted)
  static short  iAckDelayTime = 0;  // 0=  0 ns
                                                       // 1=100 ns
                                                       //    |
                                                       // 7=700 ns


  // DMA Setup
  // Configure group of ports (A, B) as input, with handshaking.

  iStatus = DIG_Grp_Config(iDevice, iGroup1, iGroupSize2, iPort0, iDirIn);
  iRetVal = NIDAQErrorHandler(iStatus, "DIG_Grp_Config",iIgnoreWarning);

  iStatus = DIG_Grp_Mode(iDevice, iGroup1, iProtocol, iEdge,
                         iReqPol, iAckPol, iAckDelayTime);
  iRetVal = NIDAQErrorHandler(iStatus, "DIG_Grp_Mode",iIgnoreWarning);

  iStatus = Set_DAQ_Device_Info(iDevice, ND_DATA_XFER_MODE_DIO_GR1,
                                         ND_UP_TO_1_DMA_CHANNEL);     // PCI-DIO32HS
  iRetVal = NIDAQErrorHandler(iStatus, "Set_DAQ_Device_Info",iIgnoreWarning);

  iStatus = Config_DAQ_Event_Message(iDevice, 1, "DI0", 2, 0, 0, 0, 0, 0,
                                     0, 0, (LPARAM)Event_Proc);
  iRetVal = NIDAQErrorHandler(iStatus, "DIG_Prt_Config",iIgnoreWarning);


}


-------------------------------------------------

 

Thanks for any insight.

 

0 Kudos
Message 3 of 6
(4,446 Views)

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. If you take a look in chapter 5 of the following document, you will notice slight differences between the Level-Ack and the 8255 protocols.

DIO-6533
http://digital.ni.com/manuals.nsf/websearch/7590B6050B783B888625665E006359DE?OpenDocument&node=13210...

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.

http://digital.ni.com/public.nsf/allkb/39F8242E2553F63E86256FE3007BF69F?OpenDocument

S_Hong

S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 4 of 6
(4,423 Views)
Good day.
I need a few more ideas from you.
I try to create an ultrasound image at the moment, that is, to my problem:
I take ultrasound echoes from a sensor a_mode (2D wobbler principle) and try to make create a B-mode image, now the problem, I turn the sensor from -45 ° to +45 °, and therefore I get a polar image.
Now I want to convert this information into Cartesian coordinates and represent 2D image
I hope that someone here has ideas.
would post some cool programs.
with friendly greetings
0 Kudos
Message 5 of 6
(3,795 Views)
You will definetly not get an answer if you are going to hijack threads like this. Start a new thread and post in the appropriate board. I think it will be better for you to post here
0 Kudos
Message 6 of 6
(3,793 Views)