03-06-2019 07:36 PM
Hi Guys,
Thanks for your help as usual.
Please see the attached clip of a SPI Write / Read sequence.
Hardware 8452.
VI shown is sub-VI
The function works perfectly in write mode... writing to a DAC, DAC responds correctly.
However, I'm trying to read back the data I'm writing out, as a confirmation that the system is powered up and working.
I get nothing but 0's back on the read.
If I connect the array directly to the write array, the data will be shown correctly.
Can you help??
Thanks
Mike
Solved! Go to Solution.
03-07-2019 02:47 AM
I am not familiar with the SPI write/read function, but I can ask some general questions:
You are performing a write and the instrument responds properly. You want to read data in the buffer and get only 0's. Are you expecting there to be data in the buffer to read?
The read may need to be performed repeatedly, in a while loop for example for you to receive the data you want.
Also, are you sure your insert subarray is behaving exactly as you expect? Is this aiming to be a buffer of the data out? Probing the output of the write read might give you a clue.
03-07-2019 07:28 AM
Hi Max,
Thanks for your reply.
Yes, I am expecting data in the buffer after the write and it's a good idea to probe the device and confirm.
The subarray and read back seems to be working correctly if I connect it to the array thats driving the write... so I'm expecting the same mechanism will read data out of the SPI Write/Read function.
Just wondering if I'm missing something with the Labview function. I'll probe the device to see if it is reading back as advertised.
Thanks again!
Mike