Forums › SM Series Discussions › sm_api c++ iq processing › Reply To: sm_api c++ iq processing
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.
