Forums › SA Series Discussions › SA44B – external frequency reference & API problem
- This topic has 1 reply, 2 voices, and was last updated 8 years, 10 months ago by Andrew.
- AuthorPosts
cizekmParticipantHello,
I’m programming my own software application for monitoring frequency drifts by processing the I/Q stream from the SA44B. I am using the latest API (the one from 10/26/2015).
For development purposes I use the following setup: SA input connected to the output of Agilent 33500B waveform generator, SA freq. reference input connected to 10MHz output of 33500B on the backplane.
I encountered the following problem:
When I for the first time use the sequence of the API calls like
saOpenDevice, saEnableExternal, saConfigCenter, saConfigLevel, saConfigIq, saInitiate, saQueryStreamInfo, then repeatedly call saGetIQ and then finally call saAbort and saCloseDevice, everything works fine.BUT then when I for some reason do not unload the SA_API.DLL and use the same sequence of API calls like above the SA44B ignores the reference frequency input and acts like it is detuned by approx. 6 Hz while using 10MHz center frequency.
If I programmatically unload SA_API.DLL after saCloseDevice or saAbort everything is okay again after the next using of saOpenDevice etc. This is usually no problem in C++, where DLL unloads after closing the application but for example in LabView you have to close the VI everytime to persuade it to unload the DLL and this seems very inconvenient to me.
I also tried not calling saAbort and saCloseDevice when terminating the Labview application and everything was also okay (except from saOpenDevice returning -8 of course). I looks like calling saCloseDevice and not unloading the DLL after it messes up the things.
Thanks in advance for any reaction
Martin
AndrewModeratorHi Martin,
Thank you for the heads up on this. This is a known limitation right now. I will be releasing a version today 11/9/2015 that addresses this. The function call will change from saEnableExternalReference to saSetTimebase(device, SA_REF_EXTERNAL_IN). The external timebase will be reset when calling the saCloseDevice function so it should be able to be set again once you re-open the device, without reloading the DLL.
Keep an eye out for that. Version 3.0.9 of the SA api. It will be released with version 3.0.17 of Spike.
Regards,
A.J.- AuthorPosts
You must be logged in to reply to this topic.