The brand-new PN400 Phase Noise Test System is available for purchase! →

sm_api c++ iq processing

Forums › SM Series Discussions › sm_api c++ iq processing

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #248120
    washton
    Participant

    I am looking to utilize two separate c++ scripts to collect and save iq streaming data from an SM200C. The first script sets up the SM200C by opening the networked device and setting the iq stream parameters (data type, center frequency, ref level, etc), returning the handle to the opened device and leaving it idle. The second script uses the handle to initiate the capture for a specified length of time and save the data. The goal is to allow a user to begin a capture as soon as the second script is called so time isn’t wasted on setup, avoiding data loss. My initial tests indicate that the device doesn’t save the parameters from the first script; I’m forced to open the device again and send the same iq setup commands before a successful data capture can occur, causing significant delay and data loss in the process. Is a two-script setup possible? Or do I have to include setup and capture in the same script?

    #248121
    AndrewAndrew
    Moderator

    The problem with the 2 script approach is that all the resources associated with the handle and device are in the working memory of the first script. The second script can’t access those.

    A couple alternative solutions,

    – Go to a 1 script approach where after the initialization occurs, the script goes into a waiting for user input loop, and responds to the requests for data, all within one script. This is the easiest solution.

    – Change the first script to act more like a service, which stays open and communicates with other scripts/programs that request data. The first script is the only script that interfaces the device, and relays all data to the other script. This seems like a more complex approach unless you plan on being able to have several programs requesting data simultaneously.

    • This reply was modified 1 year, 2 months ago by AndrewAndrew.
    • This reply was modified 1 year, 2 months ago by AndrewAndrew.
    • This reply was modified 1 year, 2 months ago by AndrewAndrew.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.