07-05-2021 08:38 AM - edited 07-05-2021 08:40 AM
Hello Everyone,
I am developing DQMH module library for NI SCOPE 5132 device. I have created a cloneable module.
I want to use this "Scope Engine DQMH Module" in two ways:
1. like an independent running module to operate the scope manually.
2. using as a plugin into another application.
I have created a class for NI SCOPE 5132 which is am initializing in the MHL Loop. But i think this not a right approach as I want to keep MHL to handle requests events. Instead i thought to use a simple state machine as a helper loop. where i will load the NI SCOPE class, set the parameters using a config.csv file (to set vertical, horizontal, timing etc functionality).
Here my question is, if use SCOPE initialize.vi in the helper state machine, then How i should i pass the instrument session reference to upper MHL loop? what will be the best a FGV or DVR?
OR is it right thing? for eg. if I press a button from front panel to measure frequency or received the request to measure the same from an external module, then should i use the SCOPE fetch measurement function in the upper MHL loop? or should handle in the helper state machine?
I am new to DQMH, but want to separate some instrument initialization steps from MHL loop. Any suggestions?
PFA.screenshots. From BD 2 image to last, its shows a flow of operation. But this should happen only if i launch the scope DQMH externally. Otherwise when i will open Scope main VI only. It should work like i am operating device manually from its FP and no loading pre-settings from config.csv.
Need suggestions from the community.
07-05-2021 10:37 AM
@SWSUPPORT wrote:
I have created a class for NI SCOPE 5132 which is am initializing in the MHL Loop. But i think this not a right approach as I want to keep MHL to handle requests events. Instead i thought to use a simple state machine as a helper loop
How long does your "initialize Scope" take to execute? And what requests do you really need to handle part way through this initialization? Are you really benefiting by adding all this extra complexity?
07-06-2021 06:11 AM
hi @drjdpowell,
the initialize scope.vi wont take much time to execute. the idea is to configure my scope device using setting stored in a config.csv file if any other dqmh module "start" this scope module from its code internally.
basically i am developing a software for an ATE, where the Main Application dqmh module, will launch every other hardware modules and load into different tabs in subpanel on the Main application UI.
once loaded into the subpanel, user can use the SCOPE module to test the instrument individually to check communication or read some data etc by sending cmd from scope UI.
So how i can do the loading of class to select device class on run time, loading config file etc as a prestep, if i launch the scope dqmh module externally?
I dont want to run these presteps, if i launch the scope dqmh module standalone. that why thought to use External launch boolean. But not sure if this is a right approach. Still learning about DQMH.
07-06-2021 08:49 AM
I'm only responding about the Helper Loop. It sounds like you don't have a good reason to do your Scope operations in a helper loop. Doing that would increase the complexity of your architecture with no benefit.
07-12-2021 02:34 AM
Here my question is, if use SCOPE initialize.vi in the helper state machine, then How i should i pass the instrument session reference to upper MHL loop? what will be the best a FGV or DVR?
It is recommended that you maintain the state of the instrument session in one loop only - be it the helper loop or the MHL. So if you need a Helper loop to carry out independent actions and it is a must, it would be best to have the Helper loop be the only loop where the scope is accessed.