LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

Visit our LabVIEW Wiki LabVIEW Embedded Portal


Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> Using Sub-VI in FPGA possible?
ExpoEra
post Sep 9 2008, 12:23 AM
Post #1


3 more posts to go!


Member
Posts: 7
Joined: 9-September 08
Member No.: 12484
Using LabVIEW Since:2008
LV:8.6 ,. ,.
Nothing Selected Nothing Selected Nothing Selected


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.



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Sep 9 2008, 12:23 AM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
ned
post Sep 9 2008, 01:38 PM
Post #2


Very Active
***

Member
Posts: 139
Joined: 26-January 06
From: Cambridge, MA
Member No.: 3989
Using LabVIEW Since:1999
LV:8.5 ,8.6 ,.
United States us_massachusetts Nothing Selected


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?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
ExpoEra
post Sep 9 2008, 03:32 PM
Post #3


3 more posts to go!


Member
Posts: 7
Joined: 9-September 08
Member No.: 12484
Using LabVIEW Since:2008
LV:8.6 ,. ,.
Nothing Selected Nothing Selected Nothing Selected


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.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
ned
post Sep 9 2008, 05:37 PM
Post #4


Very Active
***

Member
Posts: 139
Joined: 26-January 06
From: Cambridge, MA
Member No.: 3989
Using LabVIEW Since:1999
LV:8.5 ,8.6 ,.
United States us_massachusetts Nothing Selected


QUOTE (ExpoEra @ Sep 9 2008, 11:32 AM) *
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.

Looks like this got resolved.
In the future, please provide a link to other forums where you've posted the same question.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
LV_FPGA_SE
post Sep 9 2008, 06:01 PM
Post #5


Very Active
***

NI
Posts: 110
Joined: 28-October 05
From: Austin, TX
Member No.: 3370
Using LabVIEW Since:1993
LV:8.5.1 ,8.2.1 ,8.6
us_texas Canada Germany My Gallery


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.

--------------------
Christian L
NI Systems Engineering - Real-Time and Embedded Control Technologies
"I like my G code neat."


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
crelf
post Sep 9 2008, 06:26 PM
Post #6


I'm a LAVA, not a fighter.
******

V I Engineering, Inc.
Posts: 3749
Joined: 13-October 03
From: Michigan, USA
Member No.: 181
Using LabVIEW Since:1993
LV:8.5 ,. ,.
Australia United States Nothing Selected My Blog


QUOTE (LV_FPGA_SE @ Sep 9 2008, 02:01 PM) *
You could wrap 96 DIO values into three U32 integers and keep the interface very simple.

That's a really good point. thumbup1.gif

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


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
ExpoEra
post Sep 10 2008, 03:46 PM
Post #7


3 more posts to go!


Member
Posts: 7
Joined: 9-September 08
Member No.: 12484
Using LabVIEW Since:2008
LV:8.6 ,. ,.
Nothing Selected Nothing Selected Nothing Selected


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. thumbup1.gif


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

Reply to this topicStart new topic

 




Time is now: 1st December 2008 - 08:58 PM