Jump to content

How do these FPGA XNodes work without all the abilities?


Go to solution Solved by Darren,

Recommended Posts

I'm looking at the XNodes included in the FPGA toolkit, for instance vi.lib\eio\EIONode\EIONode.xnode, and I notice there's only a few abilities, and many important ones are missing. Like the GetImage ability. How are these XNodes drawing graphics, etc. without these abilities? I do see some VI's in the same folder that would draw the image, but they don't seem to be referenced by the XNode. So how does this work?

 

Similarly, the "function block" XNodes in the RT module respond to a "CONFIG" message to open the properties dialog. However, if I create my own XNode with a Message ability, it doesn't even receive those messages. Why is that?

 

(Topic mentions both FPGA and XNodes; no telling who will post here! :P)

Edited by flarn2006
Link to post
Share on other sites

They are "abstract" Xnodes which are overridden by the distinct implementation depending ont he hardware target actually being used.

 

Nah, just kidding, I have no idea whatsoever.  I've never actually looked at XNodes, but I welcome the discussion.  :thumbup1:

Link to post
Share on other sites

Nah, just kidding, I have no idea whatsoever.  I've never actually looked at XNodes, but I welcome the discussion.  :thumbup1:

I almost believed you for a bit because FPGA code does do some weird things.  I don't know if this is the case still or not, but at one point there were express VIs that you could open the block diagram of. If you kept drilling down into the VI you eventually found a subVI with no G code, only a single comment on the block diagram, and no objects on the front panel.  The comment was a string of characters referencing the already compiled VHDL code to insert.  I'm guessing the code just couldn't be easily represented in LabVIEW and NI just inserted some already compiled code to do the work.

 

As for the XNode, add a breakpoint to one of the subVIs you think is drawing the icon, and save it.  If that code does draw the node it should call it and break.  Now why it gets called is a different question.

Link to post
Share on other sites

Well let's just call it an educated guess.  With a lot more "guess" then "educated".  But I DO know that each target has specific impelmentations of most FPGA nodes so I could well imagine something like this being handled in the background.  Perhaps the XNodes are themselves created by other XNodes depending on the target being chosen.  Again, I have NO data leading me to think this, it's just intuition.  And guessing, did I mention that already? :lol:

Edited by shoneill
Link to post
Share on other sites
  • Solution

Those are probably Hybrid XNodes. It's a special kind of XNode that uses C code instead of G code to implement some of the more common abilities.

 

P.S. - I've never written a Hybrid XNode, and I have no idea how to create them. I just know they exist, and I'm fairly certain they were used for Function Blocks.

  • Like 1
Link to post
Share on other sites

Those are probably Hybrid XNodes. It's a special kind of XNode that uses C code instead of G code to implement some of the more common abilities.

A new technology developed by NI that has never been mentioned before?  How many levels of management at NI did your post have to go through?

Link to post
Share on other sites
  • 1 year later...

Okay, I so there is some interesting information here, but it doesn't really help me solve the thing I want to do right now.

 

I have a cRIO + FPGA Interface project, the targets (and all c-Series modules) have already been discovered and added to the Project.

[some preprocessing not related to this topic but any pointers would still be appreciated, haven't got this one running yet either]

I also have a table of mappings from hardware resources to channel name, e.g. "Mod6/AI9" -> "p_stat_oil_01".

Now I would like to automatically rename these hardware ressources with VI Scripting to achieve something like this:

qxfAluM.jpg

[end of the off-topic part]

Next step would be to select specific channels (defined as a list of channel names) and bundle them. Should look something like this:

ukosP73.jpg

All the wiring is already scripted and works reasonably well, but I can't figure out a way to expand the EIONode (on the left) and select the appropriate channels. Is this possible?

This will be a task I have to do repeatedly and I'd really like to automate it, because it is both prone to errors and very very tedious.

Link to post
Share on other sites

[end of the off-topic part]

Are you sure?  Because nothing in your reply has anything to do with XNodes, Hybrid XNodes, abilities, or anything this thread is about.  If you have a question not related to the topic, then please don't reply to that topic.  Make your own thread on LAVA, or on the dark side (forums.ni.com) in the appropriate subforum.  As for your specific question, I've never done that in scripting but I always assumed it was possible.

Link to post
Share on other sites

To be honest, my understanding of XNodes is very very limited at this point. From the little information I found, the EIONode seemed to be a Hybrid XNode. It is entirely possible that I misinterpreted the information I found, but for the life of me I wasn't able to find other Information on those EIONodes.

I have found out that they don't live in the normal class hierarchy (no child of GObject, at least not documented), but can be cast to "Node". I wasn't able to completely access the nodes functionality though, and IIRC Darren mentioned in another topic that this is somehow related to them being hybrid XNodes.

So in my mind this question was at least somewhat fitting for this topic. 

 

If you are positive that the two topics are unrelated I will create a new thread.

Link to post
Share on other sites

If you are positive that the two topics are unrelated I will create a new thread.

Nope I'm not.  I didn't make the connection that you were attempting to use scripting to change XNodes, sorry.

Link to post
Share on other sites

There are undocumented, unsupported scripting APIs for the FPGA nodes located here:

 

vi.lib\rvi\ClientSDK\Core\Script

 

I have talked about this API a few times on the NI forums, as have others. You can google that vi.lib path to find some of the posts related to this topic.

  • Like 1
Link to post
Share on other sites

Join the conversation

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

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