Jump to content

How do these FPGA XNodes work without all the abilities?


Sparkette

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 comment

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 comment

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 comment

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 comment

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 comment
  • 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.

  • Like 1
Link to comment

[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 comment

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 comment

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 comment
  • 6 years later...
  • 5 months later...

@infinitenothing, I think I can do what you & danield were looking for, by using first EIOPlaceDownEIONode.vi with an empty State, and then iteratively adding channels with EIONode_ScriptAddChannel.vi, simply providing the channel name. Using LV2014 (for legacy FPGA support), the VIs are in C:\Program Files (x86)\National Instruments\LabVIEW 2014\vi.lib\eio\EIONode.

At first was that I was trying to call only EIOPlaceDownEIONode with a populated State array, but that has too many fields to fill in which I wasn't able to guess nor to retrieve from a working example; only passing 'alias' is not sufficient to link with the right resource.

ioNode.png.15401e15bd8ea8e71fa11c890a9e6b15.png

So yes, this is actually OT because it is not about Hybrid Xnodes or whatever...

  • Like 1
Link to comment
  • 1 month later...
On 10/3/2022 at 6:51 PM, ensegre said:

So yes, this is actually OT because it is not about Hybrid Xnodes or whatever...

Are you sure the Elemental IO nodes are not actually Hybrid XNodes under the hood? There used to be a Toolkit that you could get after signing an NDA, swearing on your mothers health to never talk about it to anyone and making a secret voodoo dance, about how to create Elemental IO Nodes. It was required for anyone designing their own C modules to be put into a cRIO chassis when wanting to provide an API to access that module. With the current state of green NI, it may be however pretty impossible to get that anymore.

Link to comment
48 minutes ago, Rolf Kalbermatter said:

Are you sure the Elemental IO nodes are not actually Hybrid XNodes under the hood?

🤷‍♂️
I came up with this without swearing, though. In truth I still have to test it for real (meaning, that it really compiles smoothly on a target, not just no broken arrow). My goal was to get the job done, not to learn the theory of Xnodes....

  • Thanks 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
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.