01-25-2022 05:18 AM
Hello,
I've tried LVOOP and found that it's more cumbersome to debug small Vi. The nice thing about LabView is,
that you can debug each Vi individually by setting the parameters on the front panel. But in LVOOP the data in the
Clusters are stored by the object and I can't toggle them from the front panel. Therefore I would have to create a new Vi and parameterize the cluster to the respective data and then start my desired vi afterwards. This is very cumbersome, is there a simple solution?
01-25-2022 09:38 AM
You don't have to make a new VI.
But, yes, it's a bit of a hassle.
You can insert a named bundler and set values.
There was some talk about a right click short cut menu plug in to do this, but I don't now if it was actually made. It won't be trivial, except for trivial cases.
01-26-2022 09:40 AM
I agree it would be nice for debugging to just be able to change the data on the object-control. At least there is still data in the control if you run it again.
You could add it to the idea exchange: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/idb-p/labviewideas
01-26-2022 10:26 AM
@thols wrote:
I agree it would be nice for debugging to just be able to change the data on the object-control. At least there is still data in the control if you run it again.
You could add it to the idea exchange: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/idb-p/labviewideas
And if you do decide to copy the VI in a (new) VI's diagram, if you use SHIFT while drag\dropping, LV creates constants for all non default inputs. So usually the class constant gets black, because the current values are in it.
01-26-2022 10:50 AM
@thols wrote:
I agree it would be nice for debugging to just be able to change the data on the object-control. At least there is still data in the control if you run it again.
You could add it to the idea exchange: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/idb-p/labviewideas
I think I can make a plug-in that will do that.
01-26-2022 11:07 AM
I did that, as you described and added a new control. After I finished the debugging I forget to rewire the object cluster instead the new control. Next time I used the software and I searched 20min for that bug. So a solution would be nice without change the vi. Next time I hopefully forget not to rewire the cluster :D.
01-26-2022 11:08 AM
I forgot thanks for your help 😀
01-27-2022 02:05 AM - edited 01-27-2022 02:07 AM
@paul_cardinale wrote:
@thols wrote:
I agree it would be nice for debugging to just be able to change the data on the object-control. At least there is still data in the control if you run it again.
You could add it to the idea exchange: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/idb-p/labviewideas
I think I can make a plug-in that will do that.
I don't think it will be easy though. You'd need access to (private) parent data, and you have to deal with all the flattening\unflattening trinkets, dynamic controls, etc.
There will be some short cuts, but it won't be trivial.
Then again, you do seem to have a lot of time to work on issues like this 😆.
EDIT: And for some reason I rarely feel a need for this anymore. I probably found other ways to deal with this, although I can't really pin point them.
01-27-2022 03:12 AM - edited 01-27-2022 03:15 AM
This might be a shortcut (just tested it):
It's easy to get a reference to a class's private data control. So you can make a new VI and copy the control to the new VI.
Next step is to populate it with data. since the data is a variant with a class, and the control is a variant with a cluster, this requires data manipulation (XML, JSON, Flattened).
This new VI with the class's private data control with the correct data can be shown in a sub panel.
Scaling this up to inherited data seems doable.
Scaling this up to nested classes seems tricky. Perhaps it's an option to just show the class control, and allow the user to open to edit that one.
EDIT: Obviously, the constant source could just as easy be a control or control terminal. I hope.
01-27-2022 07:57 AM
wiebe@CARYA wrote:
This might be a shortcut (just tested it):
It's easy to get a reference to a class's private data control. So you can make a new VI and copy the control to the new VI.
Next step is to populate it with data. since the data is a variant with a class, and the control is a variant with a cluster, this requires data manipulation (XML, JSON, Flattened).
This new VI with the class's private data control with the correct data can be shown in a sub panel.
Scaling this up to inherited data seems doable.
Scaling this up to nested classes seems tricky. Perhaps it's an option to just show the class control, and allow the user to open to edit that one.
EDIT: Obviously, the constant source could just as easy be a control or control terminal. I hope.
When I try to do that in my pop-up menu code, I always get Error 91 out of "Variant to Array".
Probing the "Value" variant, it looks good:
'TestFrame Light Settings.lvclass': TestFrame Light Settings.lvclass [LabVIEW Class]
TestFrame Light Settings.lvclass