Jump to content

Using Sub-VI in FPGA possible?


ExpoEra

Recommended Posts

Hello,

I have a few FPGA VI's that contains AI, AO, or DO (the way I wanted to group them). Now, I have put these FPGA VI's as sub VI's in a top-level FPGA VI, and have linked them up like you normally would in other non FPGA Labview programs. Then, I would compile it, and put a Open Reference, Read/Write, Close Reference, in the RT VI. And.... it doesn't work. Obviously, I am doing something wrong.

Can someone teach me how to do it? It would be rather crazy to try to fit all 96 DIO controls into one top-level FPGA VI. Thank you.

Link to comment

QUOTE (ExpoEra @ Sep 8 2008, 08:23 PM)

I have a few FPGA VI's that contains AI, AO, or DO (the way I wanted to group them). Now, I have put these FPGA VI's as sub VI's in a top-level FPGA VI, and have linked them up like you normally would in other non FPGA Labview programs. Then, I would compile it, and put a Open Reference, Read/Write, Close Reference, in the RT VI. And.... it doesn't work. Obviously, I am doing something wrong.

Can someone teach me how to do it? It would be rather crazy to try to fit all 96 DIO controls into one top-level FPGA VI. Thank you.

Are you trying to open a reference to a subVI, or to the top-level VI? I don't think you'll be able to open a reference to a subVI if you've only compiled the top-level VI. Are you loading the appropriate VI into the FPGA and running it? Have you probed the error outputs from the Open Reference, Read/Write, etc functions, and if so, what error occurs?

Link to comment

QUOTE (ned @ Sep 9 2008, 06:38 AM)

Are you trying to open a reference to a subVI, or to the top-level VI? I don't think you'll be able to open a reference to a subVI if you've only compiled the top-level VI. Are you loading the appropriate VI into the FPGA and running it? Have you probed the error outputs from the Open Reference, Read/Write, etc functions, and if so, what error occurs?

I only compiles the top-level VI, and I open the reference to the top level VI. I use only call the subVI from the top-level VI.

Link to comment

QUOTE (ExpoEra @ Sep 8 2008, 07:23 PM)

Can someone teach me how to do it? It would be rather crazy to try to fit all 96 DIO controls into one top-level FPGA VI. Thank you.

Just as an FYI,

You could wrap 96 DIO values into three U32 integers and keep the interface very simple. On the FPGA you can convert each U32 into an array of Booleans to pass to the I/O node. The same works for inputs as well. Converting a U32 into an array of 32 Booleans on the FPGA takes no additional time or space as the U32 is really an array of 32 bits already. It is simply a different representation in LabVIEW, but not on the FPGA.

Link to comment

QUOTE (LV_FPGA_SE @ Sep 9 2008, 11:01 AM)

You could wrap 96 DIO values into three U32 integers and keep the interface very simple. On the FPGA you can convert each U32 into an array of Booleans to pass to the I/O node. The same works for inputs as well. Converting a U32 into an array of 32 Booleans on the FPGA takes no additional time or space as the U32 is really an array of 32 bits already. It is simply a different representation in LabVIEW, but not on the FPGA.

This could be useful. :thumbup:

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.