PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

SPI communication with PXIe-6570 through LabVIEW instead of Digital Pattern Editor

Hello, 

 

I am working on developing some tools to use the PXIe-6570 to preform simple SPI operations (read/write). I have gotten it to work using the Digital Pattern Editor by writing a pattern that is basically a single frame of SPI communication and bursting it to read or write to a single register at a time.

 

I have also gotten LabVIEW to be able to burst these patterns and display device response. 

 

My question is, is there any way to actually configure these patterns from LabVIEW? For example, for a read, I want to be able to change the register address from LabVIEW. However, it seems that all the Digital Pattern API for LabVIEW is designed to run already existing patterns. 

 

Thanks!!

0 Kudos
Message 1 of 3
(2,449 Views)

Hi MBen11,

 

Have you used the Digital Pattern Generator vi before? That should allow you to create patterns if not modify existing ones.

Christine B
Technical Support Engineer
National Instruments
Message 2 of 3
(2,415 Views)

I think you should look into the source_d_replace opcode.

In Digital Pattern Editor you can define a pattern to e.g. read from the device.

Each line of the pattern defines the pin state for that specific period.

If you add the "source_d_replace(0,X)" opcode to a vector, then subsequent vectors can use "D" as their output state if they have the opcode "source". A "D" is replace by data from LabVIEW that configures the output as either 0 or 1, based on the input from LabVIEW.

I think this is what you are looking for.

This way you make pre-defined patterns where part of them are configurable from LabVIEW on-the-go.

0 Kudos
Message 3 of 3
(2,276 Views)