• 0

About ADP5250 using drive API to output voltage


Kou
Share

    Question

    @attilaI have AD2 and ADP, and I use AD2 to run the program "Analogio_AnalogDISCOVERy2_power. CPP", which can output voltage, but there is no voltage output when I use ADP5250, is there any explanation for this phenomenon

    Link to comment
    Share on other sites

    9 answers to this question

    Recommended Posts

    • 0

    1653269478(1).thumb.png.d0479548a23709dd6ba222f037db9fb6.pngimage.thumb.png.cb736f8409ae56a21684b6aac6f78d79.pngimage.png.19a86b7822219797963a868e8e168f4f.png

    image.png.b24b4dff66cac0824b331b83c505e3f8.png

    嗨。@根据我的理解,这个例子did not output voltage at positions 1, 2, and 3, but only enable the supply channel, so I added voltage output later,When I used AD2, I ran my modified example, channel 0 and channel 1 could output voltage of 1 and -1,When I used ADP,channel 0 and channel 1 cannot output voltage of 1 and -1.

    Link to comment
    Share on other sites

    • 0

    @attilasry,Because the ADP channel 0 and 1 corresponding to the two channel + 6 and + 25, so I can make it 1 v output, but the sample doesn't make 1 v channel output.

    Link to comment
    Share on other sites

    • 0

    @attilaThank you so much,This solved my existing confusion.

    And I have one more question,In simple terms,I want to use the VirtualBench driver to drive the ADP 5250 directly. Can I do some work on the VIRTUalBench C code base so that it can call ADP5250?

    Link to comment
    Share on other sites

    • 0

    倪有digilent LabV工具包,可以使用IEW,I know this,But my job is to write tests in C.

    I understand that since labView's toolkit for Digilent uses the VirtualBench API, there must be a way to call it in C

    Link to comment
    Share on other sites

    • 0

    Hi@Kou

    Yes, you could use nilcicapi.dll installed by VirtualBench or the rebranded dadp5capi.dll installed by WaveForms.
    C:\Users\Public\Documents\National Instruments\VirtualBench Documentation\
    The C API is the same.

    Link to comment
    Share on other sites

    • 0

    @attilaBut in the C driver, they initialize differently.

    Virtualbench.h:

    NIVB_LIBRARY_VERSION 302039040

    niVB_Status NIVB_DECL niVB_Initialize(uint32_t version, niVB_LibraryHandle* handle);

    dwf.h:

    DWFAPI int FDwfDeviceOpen(int idxDevice, HDWF *phdwf);

    So,they’re different.

    How can I call ADP using virtualbench. H?

    Link to comment
    Share on other sites

    • 0

    Hi@Kou

    You can use the WF SDK to control the ADP5250 as described in the WF pdf manual and it is compatible with most of the examples.

    This device can also controlled natively with dadp5capi like this:
    C:\Users\Public\Documents\National Instruments\VirtualBench Documentation\
    C:\Users\Public\Documents\National Instruments\VirtualBench ANSI C Examples\
    C:\Program Files (x86)\National Instruments\Shared\ExternalCompilerSupport\C\lib32\msvc\ nivirtualbench.lib

    #include#include#include"nivirtualbench.h"// change functions in nivirtualbench.h like:// typedef niVB_Status (__cdecl *niVB_Initialize)(uint32_t version, niVB_LibraryHandle* handle);intmain(void){HMODULE hNil=LoadLibraryA("dadp5capi.dll");if(!hNil)return0;niVB_LibraryHandle hLib;niVB_Initialize vb_Initialize=(niVB_Initialize)GetProcAddress(hNil,"niVB_Initialize");niVB_Finalize vb_Finalize=(niVB_Finalize)GetProcAddress(hNil,"niVB_Finalize");//....if(vb_Initialize(NIVB_LIBRARY_VERSION,&hLib)){FreeLibrary(hNil);return0;}//....vb_Finalize(hLib);FreeLibrary(hNil);printf("done");return1;}

    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
    Share