Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 6, 2006

Continuous Pattern Output from a Binary File

1 ratings | 4.00 out of 5
Print

Downloads

Filename: 2156.vi
Requirements: View

This VI can only be used with digital devices that have an onboard clock, such as the NI 653x (DIO-32HS) devices. This VI continuously reads data from a binary file and outputs to one or more digital ports at the specified rate.

This example VI calls the intermediate digital VIs. The intermediate digital VIs are simply a convenient grouping of the digital group buffer VIs in the advanced palette.

NOTE: When using direct memory access (DMA) to transfer data, the NI 6534 transfers data in 32-byte blocks, and the NI 6533 in 4-byte blocks. DMA transfers are the default for devices that support DMA. If you need to retrieve data as soon as it is acquired, set the device to do interrupt-driven transfers using the Set DAQ Device Info VI. Interrupt-driven transfers are slower and take more processing from your computer than DMA transfers.

INSTRUCTIONS:
1. Enter the device number, channels, clock frequency, clock source, and buffer size.
2. Make the appropriate I/O connections as explained below.
3. Run the VI.

KEY PARAMETERS THAT ENABLE THIS TASK:
* DIO Config.vi: buffer size, group direction, and port list.
* DIO Start.vi: handshaking source, clock frequency, samples to generate (0 for continuous)
* DIO Write.vi
* DIO Clear.vi

The data written to the DIO Write VI should be interleaved port by port, For example, in the case of two ports, the writes would be as follows: [1st port 1st data][2nd port 1st data][1st port 2nd data].

This VI is designed to work with any number of ports in the port list. However, certain devices have port list restrictions. Here is a set of valid port lists:

[DIO-32HS and 653x devices]
0
2
0:1
2:3
0:3

I/O CONNECTIONS OVERVIEW:
Connect the data lines of the ports you specified in the port list to the data lines of the external device.

If you selected an external clock in the clock source control, connect your clock signal to the REQ pin. Use REQ1 if your port list is 0, 0:1, or 0:3, otherwise use REQ2. If you selected an internal clock, the clock signal is output on the REQ pin of the I/O connector.

For further details about specific I/O pin and timing specifications, refer to the hardware user manual.

DAQ VIs USED:
DIO Config.vi, DIO Start.vi, DIO Write.vi, DIO Clear.vi.

Requirements


Filename: 2156.vi

Software Requirements


Application Software: LabVIEW Full Development System 6.1
Language(s): LabVIEW

Hardware Requirements


Hardware Group: Digital I/O (DIO)
Driver: Traditional NI-DAQ (Legacy) 6.9.2

 
1 ratings | 4.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).