05-06-2019 01:22 PM - edited 05-06-2019 01:25 PM
Hello Members,
I would like to do an HAL implementation for custom step.
The idea is,
I have to create instrument custom step type ,
For Example- If DMM is the instrument , the Edit VI in the custom step type will be common for all the DMM instrument. like we have printer dialogue box in windows. where i can simply install the printer driver and same will appear in the printer dialogue box for selection.
I m getting below error after configuring the DMM. Can anyone help me to solve this issue?
Thank you
Vipinraj KK
05-07-2019 01:27 AM
Intersting idea to use HAL instrument classes in a single HAL steptype group. However, i'm not clear how the editor picks the correct instrument class during development if you implement multiple instrument classes within a single step type (read: How should the editor know which instance of the HAL is to be picked during instantiation of the step?).
That being sense, it simply doesn't make sense for a dynamic dispatch call inside an edit substep. I can see that implementation of edit substep modules could benefit from OOP, so without having tested it myself: Can you call the same (child) VI as edit substep module if you configure the edit substep module call as "Call VI" rather than "Class member call"?
05-07-2019 03:51 PM - edited 05-07-2019 03:54 PM
Dear Norbert ,
thanks for your reply!
You are right ,it doesn’t make any sense to have a dynamic dispatch vi as edit substep.
I would like to try below method ,
Create a non class member VI for selecting the instrument type (edit substep) (factory pattern) .. have subpanel call in that Vi to configure the instruments ,
Pass the selected and configured class object to post substep
In post substep I will have the dynamic dispatch of the instrument base class “execute.vi”
Based on the object passed from edit class, the post substep should dynamically call the respective “execute.vi
Please let me know your suggestions...
Vipinraj KK
05-08-2019 03:47 AM
I'm not sure if i understood everything... so please correct me if i'm wrong:
You want to create a "all-in-one"step type. Read: The sequence developer will use a single step type for configuration of the instrument and to take a measurement.
Have you implemented this already in a pure LV based application?
The key point is simply to get the correct child class as object. This should be done by a LV VI which uses the "Get LV Class Default Values" to load the child class. There are plenty of examples available on how to use this.
Please note that you can story multiple pre- and post-step substep modules in a single step type. Try to keep the implemented LV VIs as modular as possible. You should consider to have multiple step types (e.g. Init Instrument, Configure Instrument, Read Value, ...) but you can, as mentioned, use multiple of these modules in a single step type.
05-15-2019 10:31 AM
Hello,
Sorry for the delayed response
I m working on this, I will update you this in a week time