Chris Pouzou

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. Thank you Atilla! I think we have solved my issue. After updating to 3.13.20 32 bit edition, the exact same function calls in LabVIEW now work and I am now reading 0xFF when the power supply is on. Thanks again for all your support on these forums!
  2. Hello Attila, Thank you for your response. When you say I should update Waveforms, do these updates changes the dwf.dll file or just the waveforms application? Because if it is just the application, then I don't think I need to worry about that. The SPI in Waveforms works, it just doesn't work in LabVIEW when I call those functions that I listed. I will inspect my function calls to make sure that I did not make a mistake on one of those. Thanks Again! Chris
  3. Hello, I am building an SPI proof of concept for the Analog Discovery 2 in LabVIEW and I am unable to get the entire thing working, despite other successful LabVIEW projects that use the Analog Discovery 2. The issue I am having is that I am capable of generating an SPI message output where the AD2 is the master, but I am unable to get the expected response in the Rx array. The pinout is the clock is on pin 2, the chip select is on pin 1, the MOSI_SISO is on pin 4 and these three outputs are connected to an oscilloscope for observation. The MISO is on pin 7 and is connected to a pullup resistor to 3.3V on a supply separate from the AD2. I perform the following function calls in the following order after opening the AD2 and enabling the internal AD2 power supplies: DigitalSpiReset(hdwf), DigitalSpiClockSet(hdwf, 2), DigitalSpiDataSet(hdwf, 0, 4), DigitalSpiDataSet(hdwf, 1, 7), DigitalSpiSelect(hdwf, 1, 1), DigitalSpiFrequencySet(hdwf, 1000000), DigitalSpiModeSet(hdwf, 1), DigitalSpiOrderSet(hdwf, 1). I perform the following function calls in a while loop to continually send and receive a SPI message: DigitalSpiSelect(hdwf, 1, 0), DigitalSpiWriteRead(hdwf, 1, 8, Tx array, 2, RXarray, 2), DigitalSpiSelect(hdwf, 1, 1). If these functions worked as expected, I should get an Rx array back that has the values 0xFF for elements 0 and 1. Instead I get an Rx array back with 0 for elements 0 and 1. If I perform the exact same setup in waveforms, I can get the expected response with the exact same wiring setup. Please see the screenshot attached to this post. I am scratching my head on this one. I can achieve the expected results in Waveforms, so I know my hardware is working properly, but I cannot get them working in my own program. I don't know if I am missing an important SPI function call or what. Edit: I applied a scope probe to the MISO pin as well and the MISO pin is pulling down the input voltage as if it were an output. So my problem seems to be that the MISO line is not being correctly set as an input.
  4. Hello @attila , Thank you for the response. If the AD2 does not have a timeout, then it must be something wrong with the software I have written. During one of the tests, I made sure to use the computer in question throughout the duration of the software run (so it would not go to sleep/suspend) and it still ended/froze at 250 minutes. I just guessed that it could be a timeout because all four runs that I have data for froze at 248-250 minutes, which seemed oddly consistent to me. Thank you for the timely answer.
  5. Hello, I am working on a project that uses the Analog Discovery 2 to measure the response of a DUT over a long period (hours or days). I am working in LabVIEW and have been building this project using the foundation provided in the LabVIEW project shared here. It uses both the Waveform Generator functionality to apply a signal and the Scope functionality to measure the response. Currently, I am running into a problem where my code stops working after 250 minutes. It seems to be very consistent. I and another have replicated the issue using multiple AD2 devices, multiple PCs, and both the LabVIEW source code as well as compiled into an executable. I have used LabVIEW to do profiling on the memory usage and such of the application and I do not believe I have a memory leak eating away at the PC. Also, the timeout is very repeatable to 250 minutes. The log files always end after that amount of time has passed. Is it possible that the AD2 session has a timeout built into it somehow? If so, how do I reset the AD2 before the timeout occurs? I looked through the SDK and did not find a function call that appeared to be the obvious one to use. Any help would be appreciated! Thank you.