From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Got those "This VI doesn't match other VIs in the method" Blues

Solved!
Go to solution

Fantastic! Thanks so much for all your work helping me understand this! I think I'll implement pretty much exactly what you gave me - paul

0 Kudos
Message 11 of 19
(609 Views)

Yeah, Kevin, I've had a mental block on that from the get-go.  I kept looking at the TMSC node backwards, not sure why.  Thanks for your repetition & patience! paul

0 Kudos
Message 12 of 19
(609 Views)

Just found a maybe relevant little nugget over at lava. Candidus wrote:

 

"Here is another idea: Maybe you even don't need parameter accessors. Make the argument a class that you use as a base for your parameters, let's say Parameter.lvclass. This class has a dynamic dispatch VI, Configure.vi. Derive classes from Parameter.lvclass, overriding Configure.vi. These different implementations of Configure.vi encapsulate the parameter access."

 

This sounds pretty cool.  Think it's one more level of sophistication up from where my neurons can grasp at the moment, but might be educational to pursue.

0 Kudos
Message 13 of 19
(607 Views)

@PaulOfElora wrote:

Just found a maybe relevant little nugget over at lava. Candidus wrote:

 

"Here is another idea: Maybe you even don't need parameter accessors. Make the argument a class that you use as a base for your parameters, let's say Parameter.lvclass. This class has a dynamic dispatch VI, Configure.vi. Derive classes from Parameter.lvclass, overriding Configure.vi. These different implementations of Configure.vi encapsulate the parameter access."

 

This sounds pretty cool.  Think it's one more level of sophistication up from where my neurons can grasp at the moment, but might be educational to pursue.


Wait with that. 🙂 As a step up you can use the 'other class as input', or a container-class which contains other classes. In your factory idea it could be good to have an Instrument-container, keeping a list of all instruments (thus a list of instrument classes). In that class you can have functions to get all instruments of a specific class, get instrument by name and so on. 🙂

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 14 of 19
(601 Views)

Sorry, Yamaeda, can you clarify "use the 'other class as input'" for me?

0 Kudos
Message 15 of 19
(597 Views)

Oh I think I know what you mean - include the other class in the containing class' data cluster, right?

0 Kudos
Message 16 of 19
(594 Views)

Yamaeda - that's exactly the scenario I'm looking at with this HAL, trying to "future-proof" this system as much as possible.  It's possible that future configurations may have more, or fewer child class components than currently. For example, for "this year's model", I'm using a motion controller that has some limited digital & analog I/O capabilities that I'm using.  But 5 years from now they may decide to put that functionality in a different, separate I/O controller.  Actually, as I describe this I'm beginning to think that this "reconfigurable system topology" scheme is overly ambitious for me, at least right now - I do need to get this system up & running sometime before I retire!  Think I'll rein in my ambitions a bit!

0 Kudos
Message 17 of 19
(592 Views)

Sebastian - just to clarify - in your Zebra Configure vi's up front - these are just accessor vi's, loading specific parameters into the class data - you're not actually doing any actions in them, right? thanks, paul

0 Kudos
Message 18 of 19
(573 Views)
Solution
Accepted by topic author PaulOfElora

Hi!

 

Correct, those are pure accessor VIs, no code inside.

 

The reason is that there are different places in my code where the connection to the device can be established, but configuration is read at startup, only. There's also some kind of repair mechanism to re-establish the connection if it was lost.

So it makes sense to have a VI for configuration only, which is calles once at startup, while the actual connect VI just opens the interface.

Message 19 of 19
(553 Views)