Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
7 ratings:
 4 out of 5     Rate this Document

What VIs or Functions Do I Use to Configure Various Handshaking Modes and Other Features for the 6533 (DIO-32HS)?

Hardware: Digital I/O (DIO)>>High-Speed>>AT-DIO-32HS

Problem: What VIs or functions do I use to configure various handshaking modes and other features for the 6533 (DIO-32HS)?

Specifically:

Solution: Question: How do I configure a handshaking mode?

There are six basic handshaking modes, apart from the three pattern I/O modes. The 6533 User Manual gives descriptions and timing for each of mode. The six handshaking modes are as follows:
  • Burst
  • 8255 Emulation
  • Level
  • Leading-edge pulse
  • Long pulse
  • Trailing-edge pulse.
Each handshaking mode has some variations.


LabVIEW
To enable handshaking mode, as opposed to pattern I/O mode, change the "handshake source" in the DIO Start VI (or the "clock source" in the Clock Config advanced VI) to "I/O connector." To select an individual handshaking mode, use the handshaking parameters cluster in the DIO Config VI (or Mode Config advanced VI):
  • "Signal mode" = "burst" selects burst mode
  • "Signal mode" = "8255 emulation" selects 8255 emulation mode
  • "Signal mode" = "level" selects level mode
  • "Signal mode" = "edge" with "edge mode" = "trailing" selects trailing-edge pulse mode
  • "Signal mode" = "edge" with "edge mode" = "leading" and "acknowledge modify mode" = "delay" (or "no modification") selects leading-edge pulse mode
  • "Signal mode" = "edge" with "edge mode" = "leading" and "acknowledge modify mode" = "change duration" selects long-pulse mode
The other Digital Mode Config parameters are used for variations on these basic modes. You can control the request and acknowledge polarity of each mode, except 8255 emulation, which always uses active low polarities. You can enable or disable "hardware double buffering" for each mode, except 8255 emulation and burst mode. "Hardware double buffering" refers to what the 6533 User Manual calls request-edge latching. The "acknowledge modify amount" refers to the programmable delay, which applies to all modes and slows down the protocol in a variety of ways; see the individual protocol description for details.

Only burst mode uses a clock signal on the PCLK line. By default, the PCLK direction is opposite the data direction: PCLK is received in data output mode and driven in data input mode. To reverse this, call the DIO Parameter VI with an attribute of "clock reverse mode" and a value of "on."


NI-DAQ
Handshaking mode is enabled by default for all group operations, as long as you do not call DIG_Block_PG_Config and select pattern generation mode instead. The default handshaking protocol is level mode. To choose another handshaking protocol or modify the protocol, call the DIG_Grp_Mode function.
  • "Protocol" = 3 (burst) selects burst mode
  • "Protocol" = 4 (8255 emulation) selects 8255 emulation mode
  • "Protocol" = 0 (level) selects level mode
  • "Protocol" = 1 (pulse) with edge mode = 0 (leading) selects leading-edge pulse mode
  • "Protocol" = 2 (variable-width pulse) with edge mode = 0 (leading) selects long pulse mode
  • "Protocol" = 1 (pulse) with edge mode = 1 (trailing) selects trailing-edge pulse mode.
The other DIG_Grp_Mode parameters are used for variations on these basic modes. You can control the request and acknowledge polarity of each mode, except 8255 emulation, which always uses active low. The "delayTime" refers to the programmable delay, which applies to all modes and slows down the protocol in a variety of ways: see the individual protocol description for details.

You can enable or disable request-edge latching for each mode when you call DIG_Grp_Config (the DIG_Grp_Config call precedes the DIG_Grp_Mode call). A "direction" parameter of 0 or 4 enables request-edge latching, whereas a "direction" parameter of 1 or 3 disables request-edge latching.

Only burst mode uses a clock signal on the PCLK line. By default, the PCLK direction is opposite the data direction: PCLK is received in data output mode and driven in data input mode. To reverse this, call Set_DAQ_Device_Info with an attribute of ND_CLOCK_REVERSE_MODE_GR1 for group 1 or ND_CLOCK_REVERSE_MODE_GR2 for group 2, and a value of ND_ON.


Question: How do I configure a pattern I/O mode?
In addition to the six handshaking modes, there are three pattern I/O modes. See the 6533 User Manual for details.
  • Internal requests
  • External requests
  • Change detection

LabVIEW
To select one of the pattern I/O modes instead of a handshaking mode, use the "handshaking source" in the DIO Start VI (or "clock source" in the Clock Config advanced VI):
  • "Internal" selects internal requests
  • "Pattern generation w/external requests" selects external requests
  • "Change detection" selects change detection mode.
If you select internal requests, you can use the "clock frequency" parameter of the DIO Start VI to select a pattern rate. In this case, LabVIEW selects a timebase and interval that multiply to equal the selected frequency. You do not have any control over the timebase or, therefore, over the request pulse width, which corresponds to one timebase. LabVIEW typically uses a very small timebase: in many cases, as small as 50ns. If you want to increase or otherwise control the timebase and corresponding pulsewidth, use the Clock Config advanced VI. Select "timebase source" = "internal freq in Hz", set "timebase signal" equal to the timebase, and "timebase divisor" equal to the interval. Leave "clock frequency" = -1 (unused) and "clock period" = -1 (unused).

Use the DIO Config VI (or Mode Config advanced VI) if you need to change the default request polarity, which is active low. Other than the request polarity, the handshaking parameters in DIO Config or Mode Config are ignored in pattern I/O mode.


NI-DAQ
To select pattern I/O instead of handshaking mode, call the DIG_Block_PG_Config function, with the "configuration" parameter set to 1 (enable pattern generation). Enabling pattern I/O overrides any handshaking parameter set with the DIG_Grp_Mode function.
  • "ReqSource" = 0 (internal) selects internal requests
  • "ReqSource" = 1 (external) selects external requests
  • "ReqSource" = 2 (change detection) selects change detection mode.
If you select internal requests, use the "timebase" and "interval" parameters to select the rate. Note that the pulse width of the request pulse is one timebase.

Use the DIG_Grp_Mode function if you need to change the default request polarity, which is active high. Other than the request polarity, the handshaking parameters in DIG_Grp_Mode are ignored in pattern I/O mode.

Related Links: Product Manuals: 653X User Manual

Attachments:





Report Date: 11/10/1998
Last Updated: 09/12/2003
Document ID: 1F9B7UG0

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit