09-06-2019 07:08 PM
Hi,
I am trying to create a LabVIEW VI that connects to an external spectrum analyzer - Tektronix RSA503A. I have built the VI based on this person's code: https://github.com/tektronix/RSA_API
And the API for the spectrum analyzer is here: https://www.tek.com/model/rsa306-software
I'm using the DLL to communicate with the spectrum analyzer.
However, every time I run my code - it crashes the SignalVu software (the API for the RSA503A), and the hardware loses it's connection with the PC. It also crashes the LabVIEW VI. I have tried troubleshooting and the VI does in fact recognize the serial # and model of the SA, but it crashes shortly afterwards and I cannot pinpoint the reason.
FYI - DLL is x86 and LabVIEW2017 is 32-bit.
I appreciate all the comments, thank you.
09-06-2019 09:33 PM - edited 09-06-2019 09:34 PM
I haven't looked at your code, but generally, don't run two different applications that control the same equipment at the same time or you'll have the exact issues you are having now.
Why do you feel you have to write your own drivers? http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=28C1A885A5FA3EB3E0440003BA230E...
This isn't the exact driver for your scope, but it has a decent chance of working.
09-07-2019 02:02 PM
Hi Bill,
Thanks for the response. I will definitely give it a try! It looks like this driver contains everything that I need (the VI used to extract the analog date from the spectrum analyzer) - And I just plug and play, is that correct? I'm quite new to interfacing LabVIEW with external hardware.
09-08-2019 02:43 PM
@flock203 wrote:
Hi Bill,
Thanks for the response. I will definitely give it a try! It looks like this driver contains everything that I need (the VI used to extract the analog date from the spectrum analyzer) - And I just plug and play, is that correct? I'm quite new to interfacing LabVIEW with external hardware.
Here "plug and play" simply means that there are ready-made VIs organized in a standardized format so it is fairly easy to figure out where to look for your driver needs. They will all have the same project and folder structure, for instance.
As far as using the drivers, I usually try to capture the signal manually, note all the settings needed, then open up a temporary VI where I can string together the driver VIs in the order I think they need to be in, with the parameters from the instrument(s) that I set up. (I will include any VIs that are needed to generate the signal to test as well.)
Once I am comfortable with the way the VI is running, I'll integrate the pieces into my code. I don't usually include the VI, itself, because it's usually a disorganized, jumbled mess.
I hope this helps!