Jump to content
  • 0

Using SDK function FDwfAnalogInStatusData16() in C++


AbbyM

Question

Hello!

I am having some trouble using the function FDwfAnalogInStatusData16() in C++. The host PC I'm using is a Raspberry Pi 4 with Debian Linux.  I am using record acquisition mode. The function call works great for me in Python, I can see an expected sine wave input signal.  But I get all zeroes in my buffer when doing the same thing in C++. The buffer is defined globally as a static array. For now I am working with just 1 channel, but the goal is 3 channels.  My code is attached, can you help me determine what I am doing wrong?  

Thank you,

Abbytest_adpro.cpp

test_adpro.py

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Ok thanks, I actually ended up finding the bug, I was setting false instead of true in FDwfAnalogInStatus () so the device wasn't actually reading data XD

On a related note, I have noticed that cAvailable varies which I assume depends on a number of factors.  But I am planning to interleave 3 channels of data in the same output file.  Is there any way to get a more constant number of valid samples?  is there perhaps a minimum I can use?   I also do not want to have invalid or zeroes in the data file.

Thanks

Link to comment
Share on other sites

  • 0

Hi there,

One followup question to this thread.  I went to look for the DDRam setting under the Waveforms options but cannot find the window that was referred to in your linked thread.  The only thing I could find was a speed test under Options->Device.  it says "4 MiB" at the end of each sentence so I wonder if that is the equivalent DDRam buffer setting?

image.thumb.png.c92f6f566bdac29e157fbfd13c3d012b.png

Link to comment
Share on other sites

  • 0

OK, so I am using the Discovery Pro 2 software and not the ADP3450?  I remember selecting ADP3450 when I downloaded Waveforms.  Just to double check, which OS version do you recommend for a Raspberry Pi with 64-bit OS?   I used the 64-bit Debian ARM image and Adept libraries.

Edited by AbbyM
misspelling
Link to comment
Share on other sites

  • 0

I am confused as to which version to use for the Raspberry Pi using the 64-bit OS. 

It seems that the only installers that actually run without errors are the ones with "arm" in the name.

I just installed 3.18.19 "armhf.deb" but when I rebuilt and ran my script it gave this error:

pi@raspberrypi:~/verde $ ./adpro 
./adpro: error while loading shared libraries: libdwf.so: wrong ELF class: ELFCLASS32
pi@raspberrypi:~/verde $

The Waveforms GUI works fine but not my script which is my end target.

Edited by AbbyM
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...