Skip to content

Run the Demonstration Remotely via Ethernet (AD463x)

d-samal edited this page Feb 15, 2022 · 11 revisions

In addition to the DataStorm DAQ development kit running in standalone hardware configuration, it can also run while connected to computer remotely via an Ethernet cable.

Configuration for remote IIO Oscilloscope access via ethernet

The AD463x demonstration uses AD4630-24® Evaluation Platform in this configuration which is comprised of the following components:

Configure BOOTSEL DIP Switches

Select the SD card as the boot source for the processor.



Configure FMC_VADJ DIP Switches

The FMC_VADJ power rails provide power to the EVAL-AD4630-24-FMCZ via the FMC interface. This is an adjustable voltage. It must be set to 3.3V. Modify the VID_SW DIP switch settings to select 3.3V.

Assemble the Hardware

Follow the steps in the order shown below.

  • Insert the Micro SD card into the SD card slot
  • Insert the EVAL-AD4630FMCZ FMC connector into the FMC mating connector on the DataStorm DAQ board
  • Attach PC via ethernet cable
  • Attach the Micro USB cable
  • Connect the Signal Generator to the EVAL-AD4630-24FMCZ SMA connectors (channel 0)
  • Ensure that Jumper JP11 is at position B to give onboard 5V reference, Jumper JP8 is in position A to give VADJ from FMC connector, Jumper JP7 is in position A to supply LDOin with AVDD.
  • Connect the power supply to the DataStorm DAQ
  • Plug the AC-DC adapter into an AC outlet

Signal Source

AD463x is two channel multiplexed ADC, but on EVAL-AD4630-24FMCZ has only two channel viz ch0 and ch1 is available to give a external signal source. rest of the channel from ch2 to ch15 is given a onboard fixed dc supply. For details refer product link. For channel ch0 and ch1 expects a differential signal but chx(-) channel is effectively grounded on EVAL-AD4630-24FMCZ. So EVAL-AD4630-24FMCZ ch0 and ch1 requires a signal within range of 0V to Vref i.e 5V , negative supply signal need to be bias or offset to make in range of 0-5V signal.

The Analog Discovery 2 is used as a signal generator to drive the AD463x input.

Install (if not already done) the Digilent WaveForms App.

Open the WaveForms App and Click on Wavegen in the left margin which opens a waveform window

Click on Channels and select 1
Select Type as Sine
Select Frequency or Period
Set Amplitude to 1V
Set Offset to 1V
Click Run All

Software for remote IIO Oscilloscope access via ethernet

There are a few software components that need to be installed in order to run this demo successfully:

  1. IIO Oscilloscope™
  2. A SW terminal like Tera Term VT or Putty

IIO Oscilloscope™

IIO Oscilloscope™ is a tool developed by Analog Devices. It can be downloaded from this web site: https://github.com/analogdevicesinc/iio-oscilloscope/releases/download/v0.13-master/adi-osc-setup.exe (Download and install v0.13)

Define the host PC IP address

A wired ethernet point-to-point connection between the host PC and the embedded target is required. Use this link for instructions on how to assign a static IP address to the host Ethernet adapter. Set the following values

  • IP address : 192.168.0.1

  • Subnet mask : 255.255.255.0

  • No entries required for the other fields

Connect to the target terminal

  • A wired Micro USB serial port connection between the host PC and the embedded target is required
  • Launch a terminal program (like Tera Term VT or Putty) and connect using serial port
  • Select 115200 baud
  • Select the appropriate target COM port

Define the target IP address

Type the following at the terminal prompt to set the target IP address

  • $ ifconfig eth0 192.168.0.2 up

Launch IIO Oscilloscope

Double click the IIO Oscilloscope application icon on the host Windows PC.

Note: IIO Oscilloscope creates a .osc_profile.ini file in the Users/UserName/Appdata/Local directory. The next time IIO Oscilloscope is opened, the existence of this file delays connection to the target. It is recommended to delete the .osc_profile.ini (if it exists) prior to launching IIO Oscilloscope.

Connect to the target

  • Select the Discoverable/Scan option and click the Refresh button..
  • A successful connection results in discovery of the IIO devices. Press OK to continue.


Enable voltage0 ADC channel

For configuring other features of AD463x on IIOscope follow this link.
Select a Plot Channel to be displayed in IIO Oscilloscope. Click on the check box in the Plot Channel window adjacent to voltage0. Right click on axi-ad463x-adc in the Plot Channels window. Select voltage0 and rising edge as the trigger parameters.


Capture Time Domain Signals

Press the Capture / Stop button to begin the capture process.


Capture Frequency Domain Signals with Frequency Markers enabled

Change the capture mode to Frequency Domain. Select an FFT Size and Average. Press the Capture / Stop button to begin the capture process.


Right click in the IIO Oscilloscope plot area. Select Single Tone markers. Press the Capture / Stop button to begin the capture process with markers.

Note the information in the Marker window. This capture shows a signal source of 10 kHz with harmonic components in Staggered Mode and only Channel 0 enabled.


Software for the Python demonstration

There are a few software components that need to be installed in order to run this demonstration successfully:

Install Python 3.7

  • Download Python 3.7 and run the installer

  • A typical installation location will be C:\Users\username\AppData\Local\Programs\Python

  • Edit the Windows System PATH environment variable to add the path to the Python directory

  • Edit the Windows System PATH environment variable to add the path to the Python\Scripts directory

Install PIP

Install LibIIO - API library for IIO

  • Download and run the latest LibIIO installer from the GitHub releases page here

Install PyADI-IIO and matplotlib

  • Open a Windows CMD shell.

      C:\Users\myuser> pip install pyadi-iio
      C:\Users\myuser> python -m pip install -U matplotlib
    

Download Python source code

  • Download the python source code from the github repository

  • Run the Python source code. Open a Windows CMD shell

      C:\Users\myuser\pyadi-iio\examples> python ad463x-fmcz.py
    


This capture shows a signal source of 10 kHz with harmonic components in Staggered Mode and only Channel 0 enabled.

NOTE: The following image shows the output data from Channel 0 of the 16 available channels in AD469x. The outputs from other channels can be obtained in a similar method by defining the relevant channel number in the given source code.


Software for the C demonstration

NOTE: The C examples provided are only tested on a Linux environment as mentioned here. The following example is demonstrated using the Arrow Ubuntu-64bit VM provided in the build prerequisites here.

There are a few software components that need to be installed in order to run this demonstration successfully:

Install LibIIO - API library for IIO

  • Follow this tutorial to directly install LibIIO dependencies on the host machine.

Run the C programs

  • Download the C source code from the github repository

  • Compile the C source code (Use -liio flag to dynamically link the LibIIO libraries)

      $ gcc ad4696-iiostream.c -o ad4696-iiostream -liio
    


  • Run the C executable (use your relevant target IP address here)

      $ ./ad4696-iiostream ip:192.168.0.2
    

NOTE: The following image shows the output data from Channel 0 of the 16 available channels in AD469x. The outputs from other channels can be obtained in a similar method by defining the relevant channel number in the given source code.


Software for the MATLAB demonstration

NOTE: This demonstration requires a licensed version of MATLAB and Simulink along with the Communication Toolbox installed.

There are a few software components that need to be installed in order to run this demonstration successfully:

Install MATLAB

Install LibIIO - API library for IIO

  • Download and run the LibIIO installer from the GitHub releases page here

Run MATLAB

  • Download the MATLAB source from the github repository

  • Open the Simulink model DAQ4696.slx file


  • Double click on the system object block of axi-ad463x-adc. Set your relevant target IP Address in the "IP Address".


  • Set your preferred data capture mode by changing the mode_val constant in the file libiio_if.m. It is set to Staggered Mode by default.


  • Optionally set your preferred stop time or keep it as is. Run the simulation to see waveforms.

NOTE: Channels are arranged top-down with channels 0 to 3 on the first column, channels 4 to 7 in the second column, and channels 8 to 11 on the third column and channels 12 to 15 on the last column.


This capture shows a signal source of 10 kHz with harmonic components in Staggered Mode and only Channel 0 enabled.



NOTE: In case ADC data mode needs to be changed, toggle the value of mode_val constant then stop and run the simulation twice to get the relevant waveform as the output. This is required to dump older data values from the IIO buffer filled during the previous run of the simulation.

Shutting down the demo

  • Power down the target. Type the following at the terminal prompt

      $ poweroff  
    
  • Wait until the linux terminal shows

      $ reboot : System Halted
    
  • Close out IIO Oscilloscope and all associated windows


Return to AD463x Quick Start Guide

Clone this wiki locally