LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Confusion regarding Refnums and Type Def.'s

Hi

I'm having a hard time understanding how refnum's in labview work. I thought I had it all figured out, but then I downloaded the LVWUtil32 toolset from the NI site and then this Windows Refnum control shows up .. and this brought a bit of confusion to my mind!! hehe

The reason is that when I place, say an Application Refnum from the palette on the front panel, I'm able to right click on it and the "Select VI Server Class" menu shows up. This doesn't happen with the Window Refnum control..it just shows me the "Disconnect from Type Def." stuff.
Where, or what is the link between the two? (if there is any of course!)

And also, if I put an App Refnum on the front panel, right click on it and select TypedRefNum i
n "Select VI Server Class", ...right click on it again and make it show the control, drags the control out of the 'container' and then customize -> edits that control .. Labview throws me an error and crashes .. how come this happen?

Maybee someone in here can write me a brief explanation of Refnums and type def. and how they work .. or post a link to a resource/tutorial??

I've been reading a lot of posts in her but didn't find any useful information.

Any help would be appreciated.. :0)

TIA
(LV6.1 WinXPsp1)
0 Kudos
Message 1 of 4
(2,622 Views)
Hi Soulstorm!

The window refnum which is a control that is used to pass a window refnum between VIs, is a unique identifier for a window in Windows. It's much like the file refrence!!!

The Application refnum is a control you use with the VI Server. Use this refnum control when you open a reference to a LabVIEW application and you want to pass the reference as a parameter to another VI. By passing this refnum to the VI Server, you can control the behavior and read properties of the application.

I was able to reproduce the internal error you described in LabVIEW 6.1 and I will report it to our R&D but its not a problem in either LabVIEW 7.0 or 7.1!

Hope this helps you out...

Mohadjer
0 Kudos
Message 2 of 4
(2,622 Views)
Thanks for the answer!

I'm still a bit confused about the fact that you can drag the control out of the container with the Application Refnum, but not with the Window Refnum??
Or maybee I'll just have to go read some more about this topic somewhere and earn my own experiences.. :0)

Anyway, thanks for the feedback on the bug though. I was beginning to suspect my installation had corrupted somehow.

/Soulstorm
0 Kudos
Message 3 of 4
(2,622 Views)
Hi again Soulstorm

Although you start with a application refnum you change it to a control refnum by choosing a control object as a VI Server Class. When you choose a refnum to a specific control, you are able to show it in the refnum control. If you pull out the specific control then it would just be a generic control where no specific control is defined.

There is some information about the refnum in the LabVIEW User Manual. You can find the manual by going into LabVIEW Help and under the contents tab choose LabVIEW Help. This would show a link to the LabVIEW user manual. If you then go into the index page you can on page I-21 find some info about refnums!!!

/Mohadjer
0 Kudos
Message 4 of 4
(2,622 Views)