Jump to content

creating an "image display" control ref


Recommended Posts

Hi all,

The image display indicator is giving hard time (in LV 8.5), on the block diagram, I create a reference to my image display indicator and then try to create a control form the reference... it doesn't work, no error shows up, it's just like LabVIEW ignores the action.

After digging a bit I saw that if I just open LabVIEW, create a new VI, place a generic control ref constant on the diagram and try to select "ImageControl" class, it's not possible because it's not in the list. Then if I place a image display control on the front panel, the "imageControl" item appears in the selectable class list under "control" but at the end - not alphabetically sorted.

That leads me to think that this control is somewhat a bit special in LabVIEW.

Anyone can explain that to me?

[EDIT]

Ha!

Even more interesting... I could create an Image Control ref terminal using scripting in LV 8.5 but the VI that contains it will always have a broken arrow (because the VI cannot be compiled) and most the time I would have a LV crash when trying to save the VI.

BUT, after LV 8.5 crashes if I open the VI in LV8.6, the VI will work fine. Trying to save for previous version that VI from LV 8.6 will lead to a crash...

So I have a solution for 8.6 but not for 8.5...

Anyone can help?

PS: here is the trick to create the image control ref terminal in 8.5.

script.vi

test.vi

Link to comment

Can't help with the problem. But maybe can explain how it is different

It is a "plug-in" control and resides in the "\resource\PlugInControls" directory. As far as I'm aware, it is an undocumented interface allowing controls to be created from external DLLs and resources. I have a feeling it was the way NI was going for custom controls before they decided on Xcontrols.

Link to comment

Can't help with the problem. But maybe can explain how it is different

It is a "plug-in" control and resides in the "\resource\PlugInControls" directory. As far as I'm aware, it is an undocumented interface allowing controls to be created from external DLLs and resources. I have a feeling it was the way NI was going for custom controls before they decided on Xcontrols.

Yes, I saw Rolf's post that's about the same subject.

I'm not sure what all this implies.

Now the point is that in LV 8.6 I can pass the ref of an image display indicator and so edit it from another VI and in LV 8.5 I can't :(

Link to comment

Now the point is that in LV 8.6 I can pass the ref of an image display indicator and so edit it from another VI and in LV 8.5 I can't :(

LabVIEW scripting was an adhoc feature until 2010. Meaning it was developed and implemented as people inside NI came with some use cases for tools, either internal or for inclusion with LabVIEW. As such it's support of methods and object type is quite scattered. Adding method X to object Z didn't mean that this method was automatically added to all other objects. And adding new objects type such as - let's call it for now - the binary custom control, didn't mean that all the scripting methods from similar objects were implemented and depending where it was placed in the object hierarchy it only inherited limited scripting support from more generic object types.

With scripting now being an official part of LabVIEW, this will probably slowly improve, but the play field created already so far is way to large to cover it in one or two LabVIEW upgrades alone. If it doesn't work in 8.5 then that is most likely just the way it is and there is no way around that but to upgrade (or not use that feature). Once you start working with scripting more you will quickly notice that you run into methods and properties that are there but either do nothing or return an error such as "Not implemented" until you upgrade to a newer version. And sometimes it simply crashes until you upgrade. Not much we can do. If LabVIEW would be open source we could take those fixes and backport them to earlier versions, but I will probably be retired when LabVIEW gets open source, if ever.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.