LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flushing a LabVIEW SPI Script

Hi all,

 

I'm dealing with an NI 8452 and a SPI script.

I'm using the "SPI script" palette only because my protocol needs two Read/Write steps sequenced and the control of the delay beetween this two steps (in microseconds).

So far so good, it works nicely.

 

But I'm facing a problem : I can' find a way to flush the script.

The parameters of my Read/Write steps change from call to call, so I would like to make a classical model :

-static configuration once (clock, etc..)

-multiple calls of my Read/Write stuff with different and variable parameters

-closing the SPI Script reference once

The fact is it's not possible.

 

It's disturbing, because :

-some SPI Script VI " remains active until the script is complete or the setting is changed" (NI-845x SPI Script Num Bits Per Sample.vi), meaning the setting is overwritten if you recall the VI with the same SPI Script reference

- and some SPI Script VI just stack with the previous calls on the same SPI Script reference

 

The only way I find is to Create a SPI Script reference//Make my Read/Write sequence//Close the SPI Script reference each time I need to read or write a data.

 

Is there a way to flush the "internal stack" of a SPI Script reference ?

 

Regards,

0 Kudos
Message 1 of 2
(2,476 Views)

Anybody here ?

0 Kudos
Message 2 of 2
(2,389 Views)