Kou PostedMay 20 Share PostedMay 20 @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 More sharing options...
0 attila PostedMay 20 Share PostedMay 20 Hi@Kou For ADP5250 supplies set current limit too. Link to comment Share on other sites More sharing options...
0 Kou PostedMay 23 Author Share PostedMay 23 嗨。@根据我的理解,这个例子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 More sharing options...
0 Kou PostedMay 23 Author Share PostedMay 23 @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 More sharing options...
0 attila PostedMay 24 Share PostedMay 24 Hi@Kou You are looking at the AnalogIO_AnalogDiscovery2_Power.py example which is for Analog Discovery 2 as the file name suggests. See the following for ADP5250:AnalogIO_ADP5250_Power.py Link to comment Share on other sites More sharing options...
0 Kou PostedMay 26 Author Share PostedMay 26 @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 More sharing options...
0 Kou PostedMay 26 Author Share PostedMay 26 倪有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 More sharing options...
0 attila PostedMay 26 Share PostedMay 26 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 More sharing options...
0 Kou PostedTuesday at 06:10 AM Author Share PostedTuesday at 06:10 AM @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 More sharing options...
0 attila PostedTuesday at 10:38 AM Share PostedTuesday at 10:38 AM 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 More sharing options...
Question
Kou
@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
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 accountSign in
Already have an account? Sign in here.
Sign In Now