LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

Check out our XNodes Code Repository Files and visit our LabVIEW Wiki XNodes Portal


Tags
(This content has not been tagged yet)
2 Pages V   1 2 >  
Reply to this topic Start new topic
> My first Xnode, Enum to String
Aitor Solar
post Jan 16 2007, 03:14 PM
Post #1


Extremely Active
****

Member
Posts: 262
Joined: 26-January 05
Member No.: 1450
Using LabVIEW Since:2000
LV:8.5 ,8.20 ,7.1.1
Spain spn_Madrid Nothing Selected


This is my first Xnode (not an External Node, but a true LV8 Xnode). I don't know how "revolutionary" is this, I suppose not much. I haven't found info about new Xnodes, but sure a lot of you are playing with this technique and are more advanced than myself. In fact, a couple of days have been enough to grasp the basics, so my first impression is Xnodes are far better "thought" than old External Nodes thumbup1.gif .

The purpose of this Xnode is simple, it just returns the selected string value from an enum. This was already easily done, for example with the "Format into String" function or with the "Get Strings from Enum" VI from OpenG (impressive by its own), but I think it can be an useful proof-of-concept for people who want a VI that accepts all kind of enumerations as inputs without using variants (something I've found desirable from time to time).

Attached Image

The function accepts all enumeration types and representations (even typedefs), or at least it should. If you find any error please tell me, I've tried to make the Xnode as light as possible.

Obviously, Xnodes can do a lot more things, but unfortunately just one example comes with LV82, so if anybody knows better, please share your wisdom yes.gif .

Saludos,
Aitor
Attached File(s)
Attached File  EnumToString.xnode.llb ( 242.42K ) Number of downloads: 430
 


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Jan 16 2007, 03:14 PM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
Tomi Maila
post Jan 16 2007, 05:22 PM
Post #2


Drawing Tool - LVOOP example application
*****

Premium Member
Posts: 1168
Joined: 29-January 06
From: Helsinki
Member No.: 4014
Using LabVIEW Since:2004
LV:8.5.1 ,8.2.1 ,7.1.1
Finland Nothing Selected Nothing Selected My Blog


QUOTE (Aitor Solar @ Jan 16 2007, 05:14 PM) *
This is my first Xnode...

How do you manage to edit the XNode. When I open the .xnode file with my LabVIEW, a project explorer opens with a locked xnode in it. I think XNodes require a license, have you got one? Or is there an INI file setting that allows one to edit the XNode? Could you please write a short tutorial on how you created the XNode.

jimi

--------------------
Tomi Maila



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Antoine Châlons
post Jan 17 2007, 06:48 AM
Post #3


Extremely Active
****

Premium Member
Posts: 323
Joined: 8-January 07
From: Geneva
Member No.: 7452
Using LabVIEW Since:1999
LV:8.5.1 ,7.1.1 ,5.1
France Switzerland Spain My Gallery


Hello Aitor,

same for me... here is what I get when I try to open youe xnode...
Attached image(s)
Attached Image
 

--------------------
____________________________________________________________________________________

It's better to stay out of the rat race because if you win, you're still a rat


_____________________________________________________________________________________


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Aitor Solar
post Jan 17 2007, 07:44 AM
Post #4


Extremely Active
****

Member
Posts: 262
Joined: 26-January 05
Member No.: 1450
Using LabVIEW Since:2000
LV:8.5 ,8.20 ,7.1.1
Spain spn_Madrid Nothing Selected


Xnodes are used as a subVI, not opened directly. From another VI's diagram -> right click -> Select a VI -> Go to "EnumToString.xnode.llb" -> Select "View all" in the bottom options -> Select "EnumToString.xnode"

I attach an example of use (put it in the same directory the EnumToString.xnode.llb is). Connect any of the enums (or other ones you create) to the input, it should adapt to it; run and get the selected string.

Tell me if it works for you wink.gif .

Saludos,
Aitor
Attached File(s)
Attached File  example_xnode.vi ( 6.27K ) Number of downloads: 312
 


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
rolfk
post Jan 17 2007, 11:22 AM
Post #5


<customize this text>
*****

Premium Member
Posts: 1001
Joined: 9-April 04
From: Rotterdam
Member No.: 349
Using LabVIEW Since:1992
LV:8.5.1 ,8.2.1 ,7.1.1
Netherlands Switzerland Nothing Selected


QUOTE (Aitor Solar @ Jan 17 2007, 02:44 AM) *
Xnodes are used as a subVI, not opened directly. From another VI's diagram -> right click -> Select a VI -> Go to "EnumToString.xnode.llb" -> Select "View all" in the bottom options -> Select "EnumToString.xnode"

I attach an example of use (put it in the same directory the EnumToString.xnode.llb is). Connect any of the enums (or other ones you create) to the input, it should adapt to it; run and get the selected string.


Well it's not the use people here are interested ;-). It's how you made them! As far as I know there are only two possibilies:
- You got a license from NI somehow (and have signed an NDA or someone has on your behalf) and then posting this here could get you in trouble.
- You hacked LabVIEW to not do a license check anymore or something like that and then you are also in trouble in at least certain countries on this globe who think that even thinking about circumventing anti-copy protection is a major crime.

Rolf Kalbermatter


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Tomi Maila
post Jan 17 2007, 11:37 AM
Post #6


Drawing Tool - LVOOP example application
*****

Premium Member
Posts: 1168
Joined: 29-January 06
From: Helsinki
Member No.: 4014
Using LabVIEW Since:2004
LV:8.5.1 ,8.2.1 ,7.1.1
Finland Nothing Selected Nothing Selected My Blog


QUOTE (rolfk @ Jan 17 2007, 01:22 PM) *
Well it's not the use people here are interested ;-). It's how you made them! As far as I know there are only two possibilies:
- You got a license from NI somehow (and have signed an NDA or someone has on your behalf) and then posting this here could get you in trouble.
- You hacked LabVIEW to not do a license check anymore or something like that and then you are also in trouble in at least certain countries on this globe who think that even thinking about circumventing anti-copy protection is a major crime.

There are also other options, which, I think, would be legal. The .xnode file is not itself copy protected (I think) but a plain text XML file. So the hard part is how to make the ability VIs (the VIs which control the behaviour of the XNode) and how to link the ability VIs so that they know they are part of the XNode library.
- There is a XNode shipping with LabVIEW or some external package, the ability VIs of which have not been password protected. Then you could propably edit the ability VIs as the license is (techically) required only to create new ability VIs.
- A. Solar has somehow been able to create ability VIs without needing to overcome technical copy protection.

This post has been edited by jimi: Jan 17 2007, 11:41 AM

--------------------
Tomi Maila



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Aitor Solar
post Jan 17 2007, 12:05 PM
Post #7


Extremely Active
****

Member
Posts: 262
Joined: 26-January 05
Member No.: 1450
Using LabVIEW Since:2000
LV:8.5 ,8.20 ,7.1.1
Spain spn_Madrid Nothing Selected


QUOTE (rolfk @ Jan 17 2007, 12:22 PM) *
Well it's not the use people here are interested ;-).


Well, sorry, from the previous posts I got the impression some people was simply opening the xnode instead using it in a diagram.

QUOTE (rolfk @ Jan 17 2007, 12:22 PM) *
It's how you made them! As far as I know there are only two possibilies:
- You got a license from NI somehow (and have signed an NDA or someone has on your behalf) and then posting this here could get you in trouble.
- You hacked LabVIEW to not do a license check anymore or something like that and then you are also in trouble in at least certain countries on this globe who think that even thinking about circumventing anti-copy protection is a major crime.


Ouch, come on... Do you really think I would do something illegal? And even worse, do you really think I'd do something illegal and posting it in a public forum? nono.gif

Creating an xnode is really easy and doesn't need any license. A Xnode is just a type of library and can be open, modified, etc with scripting.

Attached Image


And, as Jimi says, a xnode file is just a XML file. You can extract it from the llb, open it in a text editor, change what you want and returning it to the llb.

About the abilities... that's even easier smile.gif. The ability VIs just need to have the correct connector pane, and you can find that connector panes in the xnode example that comes with LV82 (search for *.xnode in your LV82 installation directory). Not everything is exposed, but with some trial-and-error and knowledge of the old External Nodes is not so difficult. So you can create new ability VIs without problems (they are normal reentrant VIs).

About linking a VI to a library, it's answered in this same forum, in a question about linking VIs to a Xcontrol, IIRC. You have the library reference and use the "add item from memory" method.

So, I ask you, members of the jury, must this man go to jail for all his life?

The answer is "probably yes, but not for this" tongue.gif

Saludos,
Aitor

This post has been edited by Aitor Solar: Jan 17 2007, 12:09 PM


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Tomi Maila
post Jan 17 2007, 12:17 PM
Post #8


Drawing Tool - LVOOP example application
*****

Premium Member
Posts: 1168
Joined: 29-January 06
From: Helsinki
Member No.: 4014
Using LabVIEW Since:2004
LV:8.5.1 ,8.2.1 ,7.1.1
Finland Nothing Selected Nothing Selected My Blog


QUOTE (Aitor Solar @ Jan 17 2007, 02:05 PM) *
Creating an xnode is really easy and doesn't need any license. A Xnode is just a type of library and can be open, modified, etc with scripting.

Attached Image

Would you Aitor Solar like to post the VI in the above image to the forum, of course assuming it doesn't contain any stuff under NDA or something that would be illegal.

This post has been edited by jimi: Jan 17 2007, 01:10 PM

--------------------
Tomi Maila



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Michael_Aivaliot...
post Jan 17 2007, 05:26 PM
Post #9


Confucius say: Crowded elevator always smell different to midget
Group Icon
*****

Admin
Posts: 2363
Joined: 13-October 02
From: Planet Earth
Member No.: 2
Using LabVIEW Since:1994
LV:8.5 ,8.2.1 ,7.1.1
Greece Canada United States My Blog My Gallery


QUOTE (rolfk @ Jan 17 2007, 03:22 AM) *
Well it's not the use people here are interested ;-). It's how you made them! As far as I know there are only two possibilies:
- You got a license from NI somehow (and have signed an NDA or someone has on your behalf) and then posting this here could get you in trouble.
- You hacked LabVIEW to not do a license check anymore or something like that and then you are also in trouble in at least certain countries on this globe who think that even thinking about circumventing anti-copy protection is a major crime.

Rolf Kalbermatter
I would take it easy on the condemnation. A lot of this stuff is not super protected. It just requires some one with a little sense of curiosity and the ability to use Windows file explorer. You know, it's really ok to browse inside your C:\Program Files\National Instruments\LabVIEW 8.2\resource folder... wink.gif

Keep up the good work Aitor!




--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Tomi Maila
post Jan 17 2007, 05:44 PM
Post #10


Drawing Tool - LVOOP example application
*****

Premium Member
Posts: 1168
Joined: 29-January 06
From: Helsinki
Member No.: 4014
Using LabVIEW Since:2004
LV:8.5.1 ,8.2.1 ,7.1.1
Finland Nothing Selected Nothing Selected My Blog


I think that the most interesting possibility of XNodes is to be able to create template VIs that adapt to type, similar to those that robijn suggested in this thread.

--------------------
Tomi Maila



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
AdamRofer
post Jan 17 2007, 11:13 PM
Post #11


More Active
Group Icon
**

WIKI Moderator
Posts: 47
Joined: 29-June 05
From: Santa Cruz, CA
Member No.: 2496
Using LabVIEW Since:2000
LV:8.5 ,6.1 ,7.1.1
United States us_california Nothing Selected


Here's a couple INI entries:
XNodeWizardMode=True (try right clicking on an XNode now!)
XTraceXNode=True (um, I forget what this did actually...it's been a couple weeks)

Of course, I personally prefer:
ExternalNodesEnabled=True

XNodes are easy to edit without any licensing (XML). There's really no security around those, and a lot of NI "examples" are given (albeit locked diagrams).

smile.gif

--------------------
Adam Rofer


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Jim Kring
post Jan 18 2007, 04:15 PM
Post #12


Changing the world, one VI at a time.
*****

JKI
Posts: 1692
Joined: 22-October 02
From: San Francisco, CA
Member No.: 17
Using LabVIEW Since:1995
LV:8.2.1 ,8.5 ,7.1.1
United States us_california Nothing Selected My Blog My Gallery


QUOTE (Aitor Solar @ Jan 16 2007, 07:14 AM) *
This is my first Xnode (not an External Node, but a true LV8 Xnode).

Aitor: This is very cool! great work smile.gif

QUOTE (AdamRofer @ Jan 17 2007, 03:13 PM) *
Here's a couple INI entries:

Adam: Thanks for these!

Michael: I think we might be getting to the point where we need an XNodes subforum, with a pinned README topic on how to get started.

--------------------
-----------------------------------------------------------------------------------------------------
| Book | OpenG | LAVA | Champion | VIPM | Builder | Blog | JKI |
-----------------------------------------------------------------------------------------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+