DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Using State Machine helper loop

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.

 

FPFPBD 2: using External Launch boolean to go to next init local data state if the application is launched by another module; in this case i will be loading its FP into subpanel in the another VIs UI.BD 2: using External Launch boolean to go to next init local data state if the application is launched by another module; in this case i will be loading its FP into subpanel in the another VIs UI.BD3: init classesBD3: init classesBD4: based on device type. loading dev class typeBD4: based on device type. loading dev class typeBD5: Loading init setting for scope through config.csv fileBD5: Loading init setting for scope through config.csv fileBD6: shows states to start SCOPE initialization, measurement VIs etcBD6: shows states to start SCOPE initialization, measurement VIs etc

0 Kudos
Message 1 of 5
(2,118 Views)

@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?

0 Kudos
Message 2 of 5
(2,082 Views)

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.

0 Kudos
Message 3 of 5
(2,030 Views)

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.  

0 Kudos
Message 4 of 5
(2,020 Views)

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.

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 5 of 5
(1,887 Views)