NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Step using LabVIEW Class and Dynamic Dispatching- HAL

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?

Error.png

Thank you

 

 

Vipinraj KK  

Certified LabVIEW Architect

 

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

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,664 Views)

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

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

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.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 5
(2,642 Views)

Hello,

 

Sorry for the delayed response

 

I m working on this, I will update you this in a week time

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