LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Only one Vi Debugging with LVOOP

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?

0 Kudos
Message 1 of 29
(1,307 Views)

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.

0 Kudos
Message 2 of 29
(1,272 Views)

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

 

 

Certified LabVIEW Architect
Message 3 of 29
(1,234 Views)

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

0 Kudos
Message 4 of 29
(1,225 Views)

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

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 5 of 29
(1,218 Views)

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. 

0 Kudos
Message 6 of 29
(1,204 Views)

I forgot thanks for your help 😀

0 Kudos
Message 7 of 29
(1,203 Views)

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

0 Kudos
Message 8 of 29
(1,186 Views)

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.

Edit Class Data.png

0 Kudos
Message 9 of 29
(1,174 Views)

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.

Edit Class Data.png


When I try to do that in my pop-up menu code, I always get Error 91 out of "Variant to Array".

oc.png

Probing the "Value" variant, it looks good:

'TestFrame Light Settings.lvclass': TestFrame Light Settings.lvclass [LabVIEW Class]

TestFrame Light Settings.lvclass

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 10 of 29
(1,163 Views)