Jump to content
  • 0

LabVIEW issue with Discovery 2


Tonym

Question

Hello,

I am working on a project that involves using the digilent analog discovery 2 to act as a an input and output for a VI in LabVIEW. I have downloaded the Adept and Waveforms software to communicate with the discovery 2 and LabVIEW. In this VI, I am getting an error number 1097, which has to do with the call library function. The error is in an attached photo. I have tried the suggested fixes online but have not found one to work for me. The error does seem to occur at the sub-VIs I downloaded from National Instruments, built to work for the discovery 2 in LabVIEW. When I open the call library function of the sub-VI that seems to raise the error, I see the attached images. Does anyone know if the set values are correct or if I need to change something? I am hoping that the error may be fixed by changing one of the parameters or options listed. 

The following links shed light on the 1097 error in LabVIEW:


"Error 1097 Occurred at Call Library Function Node"
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAckSAG&l=en-US

"Error 1097 While Calling DLL with Correct Calling Convention"
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9bHSAS&l=en-US

Thank you!

Labview Error.PNG

Labview Error 2.PNG

Labview Error 3.PNG

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Yes, I have tried using the toolkit, but it has not helped with this issue. With the VIs provided in the toolkit, I am still unable to successfully use the AD2 with LabVIEW. I am trying to use the wavefunction VIs to send a signal out of one of the BNC outputs on the AD2 and back into one of its inputs, to then be displayed in LabVIEW. I am also trying to use the other BNC input for taking in another signal. I then want to display both the generated signal and the measured signal in LabVIEW. However, I am not able to Connect with the AD2 despite the correct device name. In addition, in the past in other VIs, I have been able to get a signal sent through the AD2 and displayed in LabVIEW, however there only seems to be 10 micro seconds worth of data to be displayed, which is too small of a window to see my signals. Extending the time base on the graph does not help, as it still only displays 10u of data. Do you or anyone know of how to fix these issues? 

Thank you for your help!

Link to comment
Share on other sites

Hi @Tonym,

From my understanding, the AD2 Toolkit is not compatible with LabVIEW 2017+ based on this thread. What version of LabVIEW are you using? My understanding is that the toolkit and VI's were only designed for LabVIEW 2014 and LabVIEW 2016. Additionally, have you gotten the chance to follow this setup with LabForms?

Thanks,
JColvin

Link to comment
Share on other sites

Hello @JColvin,

Thank you for the suggestion.

I am using LabVIEW 2018. I have downloaded the LabForms VI, but it does not seem to be working properly. The first time I opened it, I was able to select how many channels for the wave generator, but after running it once, I was not able to change the wave generator as it seems to have disappeared. I am not sure why, but think it may be due to the newer version of LabVIEW I am using?

This is what I see on the Wavegen tab. 

Capture.PNG

Link to comment
Share on other sites

I have actually solved the issue above, but does anyone know if it is possible to extend the time base of the wavegen graph longer than 0.0004? I want to generate signals around 400Hz, but the sampling rate of the scope seems to be too high because it only displays a small section of the signal, and thus I cannot see the signal on the graph. Setting the time base to something longer does not fix the issue which makes me think that it may have to do with the sampling rate of the AD2?

@JColvin @jpeyron

Link to comment
Share on other sites

Hi @Tonym,

I loaded up the LabForms VI on LabVIEW 2014 and was in general able to successfully run it as advertised from the Instructable I linked before, and I was able to adjust the timebase on the Waveform Generator, but it does have it's own set of caveats. What I ended up doing was going to the block diagram and double clicking on the two Simulate Signal Express VI's that are towards the bottom middle of the block diagram. There you can change the Samples per second and the Number of Samples (will currently have the automatic box ticked and be set at 100000); with the default configuration of 250 MHz and 100000 samples, this leads to a total time of 0.0004 seconds, which is what you see on the WaveGen graph.

You can untick the automatic box and increase the samples, but you will likely be encountered with an error that says the system may not perform as you expect; be sure to the click the "Use Anyway" button rather than the reconfigure. When I first clicked reconfigure, an error kept popping up saying the system couldn't run (or something similar) every time I closed the error, effectively softlocking me out of LabVIEW and forcing me to use the task manager to shut down LabVIEW. The "use-anyway" option let me run the VI and did work as expected, but as I was warned by LabVIEW, the system definitely did slow down when the VI was running. You can slow down the sample rate from 250 MHz, though I don't know how much that will impact your intended application (especially at higher frequencies). So not an AD2 problem per se, but more of a limitation with what sort of configurations have been implemented into the VI's (since the VI's just call existing WaveForms SDK functions).

Thanks,
JColvin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...