Post Go back to editing

How to use Python to control ADXUD1AEBZ

Thread Summary

The user inquires about controlling the ADXUD1AEBZ board using Python, similar to a given MATLAB code snippet. The final answer provides a Python demo code to configure the XUD1A board, setting specific channels to TX or RX modes and configuring the PLL and LO frequency. Relevant products: ZCU102, AD9081, ADXUD1AEBZ, ADF4371.
AI Generated Content
Category: Software
Software Version: Python

Hi,

We are using ZCU102+AD9081+ADXUD1AEBZ+Stingray. I am writing to ask if we are able to control ADXUD1AEBZ using Python, and if so, would you please refer some demo code for me? Specifically, I would like to know how to achieve a similar function as the MATLAB code below:

sray.TXRX0 = 0;
sray.TXRX1 = 1;
sray.TXRX2 = 1;
sray.TXRX3 = 0;

Thank you! 

  • Hi,

    Take a look at the demo code attached. This will allow you to control the XUD1A board in Python.

    Regards,
    Brandon

    ctx = conv._ctrl.ctx
    xud = ctx.find_device("xud_control")
    adf4371 = ctx.find_device("adf4371-0")
    
    # Find channel attribute for TX & RX
    txrx1 = xud.find_channel("voltage1", True)
    txrx2 = xud.find_channel("voltage2", True)
    txrx3 = xud.find_channel("voltage3", True)
    txrx4 = xud.find_channel("voltage4", True)
    PLLselect = xud.find_channel("voltage5", True)
    rxgainmode = xud.find_channel("voltage0", True)
    XUDLO = adf4371.find_channel("altvoltage2", True)
    
    # XUD1A Switches: "1" = TX, "0" = RX
    txrx1.attrs["raw"].value = "0"
    txrx2.attrs["raw"].value = "1"
    txrx3.attrs["raw"].value = "0"
    txrx4.attrs["raw"].value = "0"
    PLLselect.attrs["raw"].value = "1"
    rxgainmode.attrs["raw"].value = "1"
    XUDLO.attrs["frequency"].value = "14500000000"
    XUDLO.attrs["powerdown"].value = "0"