LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

autocode compatible VIs

Solved!
Go to solution

This may not be the most descriptive title for the post.  I remember reading somewhere that if you are trying to build a VI that will eventually be built/autocoded, the VI in development shouldn’t be placed under the “My Computer” section of the Project Explorer.  Instead, the VI should be placed under a different section of the explorer so that any non-compatible VIs will not appear in the palate.

 

I’m definitely not doing this post justice… but does anyone know what I’m talking about or where I can find more information specific to this?  I will be autocoding some VIs into C and apparently File I/O palate functions don’t autocode.

 

I appreciate the help.

0 Kudos
Message 1 of 12
(3,381 Views)

What do you mean by 'auto-code'?

And what is the relation with C? 

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 12
(3,372 Views)
By auto-code I really mean "generate code".  So basically taking a VI or a project and generating code (C, C++, etc...) out of it. 
0 Kudos
Message 3 of 12
(3,366 Views)

You're now asking whether you can convert a VI to C code? The answer is no. There is no underlying C code to a LabVIEW VI

 

And that has nothing to do with the project and I've never heard of not placing the VI under My Computer in a project where you want to build an exe or dll. The palettes have nothing to do with the project either.

0 Kudos
Message 4 of 12
(3,357 Views)

Well you can create .c functions with VIs:

 

 

 

Ton

 

Message Edited by TonP on 07-01-2009 02:28 PM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 5 of 12
(3,346 Views)
OK... I've read somewhere that sometimes you want to place the VI you are working on under a different section of the Project Explorer.  When you do this, the palates may change based on whether or not that VI can be used.  So obviously when it's under the My Computer heading, all VIs are available.  However, I am 99% sure that (I read) in some cases, if the VI is not being developed under the My Computer heading, certain VIs will not be available because they cannot be "built".  I'm asking if anyone has also read this and if so... where can I find it? And I disagree that you can't auto-code (or generate code).  Once you have a project, you can certainly convert the entire project to C code.  http://www.ni.com/labview/microprocessor_sdk.htm Simulink has been doing this for years and finally has a robust compiler. 

http://www.mathworks.com/products/rtw/

 

0 Kudos
Message 6 of 12
(3,331 Views)

I'm aware of the microprocessor toolkit. Are you aware of the cost and the limited number of LabVIEW functions that it supports? Unless you are going to just target embedded platforms, you certainly cannot convert a LabVIEW project to C.

 

Your other question about some VIs not being available sounds very fishy. I have never heard of such a thing.

0 Kudos
Message 7 of 12
(3,329 Views)

Dennis Knutson wrote:

I'm aware of the microprocessor toolkit. Are you aware of the cost and the limited number of LabVIEW functions that it supports? Unless you are going to just target embedded platforms, you certainly cannot convert a LabVIEW project to C.

 

Your other question about some VIs not being available sounds very fishy. I have never heard of such a thing.


 

Yes it is expensive and I've played around with it.  It does limit the VI functions (unfortunately)... so it takes some dancing around to get what you want out of it. I know the question sounds fishy but it lines up pretty well with what you just said.  SDK only supports some of the VI functions.  The ones it does not support reportedly do not appear.  I read this somewhere and am looking for the resource about this.  So with SDK, a "C Generated Code" section appears in the Project Viewer and placing your VIs there will modify the palate depending on what is available.

 

0 Kudos
Message 8 of 12
(3,323 Views)

PhilipJoeP wrote:

Dennis Knutson wrote:

I'm aware of the microprocessor toolkit. Are you aware of the cost and the limited number of LabVIEW functions that it supports? Unless you are going to just target embedded platforms, you certainly cannot convert a LabVIEW project to C.

 

Your other question about some VIs not being available sounds very fishy. I have never heard of such a thing.


 

Yes it is expensive and I've played around with it.  It does limit the VI functions (unfortunately)... so it takes some dancing around to get what you want out of it. I know the question sounds fishy but it lines up pretty well with what you just said.  SDK only supports some of the VI functions.  The ones it does not support reportedly do not appear.  I read this somewhere and am looking for the resource about this.  So with SDK, a "C Generated Code" section appears in the Project Viewer and placing your VIs there will modify the palate depending on what is available.

 


 

A modified palette view in this circumstance makes sense and I wish you had mentioned that originally. I suspect you have a different palette view if you have the mobile module. You are switching development systems. You have a different palette view if you switch to LabVIEW base from labVIEW full.
0 Kudos
Message 9 of 12
(3,312 Views)

Dennis Knutson wrote:

PhilipJoeP wrote:

Dennis Knutson wrote:

I'm aware of the microprocessor toolkit. Are you aware of the cost and the limited number of LabVIEW functions that it supports? Unless you are going to just target embedded platforms, you certainly cannot convert a LabVIEW project to C.

 

Your other question about some VIs not being available sounds very fishy. I have never heard of such a thing.


 

Yes it is expensive and I've played around with it.  It does limit the VI functions (unfortunately)... so it takes some dancing around to get what you want out of it. I know the question sounds fishy but it lines up pretty well with what you just said.  SDK only supports some of the VI functions.  The ones it does not support reportedly do not appear.  I read this somewhere and am looking for the resource about this.  So with SDK, a "C Generated Code" section appears in the Project Viewer and placing your VIs there will modify the palate depending on what is available.

 


 

A modified palette view in this circumstance makes sense and I wish you had mentioned that originally. I suspect you have a different palette view if you have the mobile module. You are switching development systems. You have a different palette view if you switch to LabVIEW base from labVIEW full.

The way I read the article was that it wasn't simply the addition or subtration of entire palates (although with Microprocessor SDK a new "Microprocessor SDK" palate appears) but certain VIs in the default palates may dissapear because they may not "generate code" correctly.  I think we are talking the same thing now? It's not just switching between versions of LabVIEW (base or full) either.

 

Sorry i was not clear... i thought that when i said "...the VI should be placed under a different section of the explorer so that any non-compatible VIs will not appear in the palate" that implied a modified view.

0 Kudos
Message 10 of 12
(3,308 Views)