LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneous buffered write (port0) and read (port2) with PCI-6533. SPI.

I am trying to buffer write to port0 and buffer read from port2 on the PCI-6533 (DIO-32HS) at the same time and all the example help LabView gives is for one or the other and dose not show how to start both read and write at the same time. This is to communicate with a device that uses SPI as the serial communication and do it at 1MHz. I am not that experienced with LabView, so example code would be most appreciated.
0 Kudos
Message 1 of 4
(2,837 Views)
Hi BSamuelson,

It looks like you are trying to do synchronized reading and writing on a PCI-6533 device. You mentioned that you are using LabVIEW, so I went ahead and attached an example VI.

Essentially what has to be done to synchronize the input with the output is to take the clock from one operation and route that to the clock for the other. That can be done with the DAQmx Export Signal.vi.

Below is the documentation for the VI:
I. Description:
This example demonstrates how to generate a finite amount of digital data (Waveform) using a digital start trigger.

II. Instructions for Running:
1. Select the Physical Channel to correspond to where your signal is output on the DAQ device.
2. Select how many samples to generate on each channel.
3. Set the Rate of the Generation.
4. Select the Source and Edge of the Digital Start Trigger for the generation.

III. Block Diagram Steps:
1. Create a digital output channel.
2. Define the parameters for an Internal Clock Source. Additionally, define the sample mode to be Finite.
3. Define the parameters for a Digital Edge Start Trigger.
4. Write the waveform to the output buffer.
5. Call the Start VI to begin the acquisition.
6. Call the Wait Until Done VI with a timeout of 10 seconds
7. Call the Clear Task VI to clear the Task.
8. Use the popup dialog box to display an error if any.

IV. I/O Connections Overview:
Make sure your signal output terminal matches the Physical Channel I/O Control. Also, make sure your digital trigger terminal matches the Trigger Source Control. For further connection information, refer to your hardware reference manual.


Hope this helps!

Regards,
0 Kudos
Message 2 of 4
(2,825 Views)

Hi Otis,

Your example is missing "Create_Dig_Wfm.vi".  Is this in a toolkit?

Thanks,

Doug

0 Kudos
Message 3 of 4
(2,633 Views)
Hello Doug,

The missing "Create_Dig_Wfm.vi" is actually a subvi. Here is the link to Synchronized Digital Input and Output in DAQmx with the 6534. You will find the .zip file containing all file you need.

Regards,
  Sandra T.

Applications Engineer | National Instruments
0 Kudos
Message 4 of 4
(2,623 Views)