LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I access existing visual basic modules (.bas) files in LabView

First post here so be nice.

For several years I've used Visual Basic as the test platform for production tests. In addition to the form code there are typically several modules (.bas files) associated with a given project.

I'm attempting to prove to management that LabView is a better long term solution for production test and VART test. I'm new to LabView and am trying to get up to speed quickly.

One thing I haven't figured out is how to access the .bas files from LabView. There are several user defined types, public functions, constants, declarations, etc that I don't think can be done in the graphical environment.

I would really appreciate your feedback.

thanks,

todd
0 Kudos
Message 1 of 6
(4,002 Views)
I'm not sure why you want to access the .bas files. There is no way to convert basic source code to LabVIEW. Some things like declarations, memory allocation, are not required in LabVIEW or are done for you by the LabVIEW compiler. Constants, local and global variables, user defined types in the form of custom controls, all exist in LabVIEW but in general, are much easier to use. Maybe if you post a snippet of VB code, someone can translate it into LabVIEW.
0 Kudos
Message 2 of 6
(4,002 Views)
Dennis Knutson wrote in message news:<506500000005000000796D0100-1079395200000@exchange.ni.com>...
> I'm not sure why you want to access the .bas files. There is no way to
> convert basic source code to LabVIEW. Some things like declarations,
> memory allocation, are not required in LabVIEW or are done for you by
> the LabVIEW compiler. Constants, local and global variables, user
> defined types in the form of custom controls, all exist in LabVIEW but
> in general, are much easier to use. Maybe if you post a snippet of VB
> code, someone can translate it into LabVIEW.

Labview provides a way to use custom ActiveX controlls. This would be
the preferrend interface.

Marty
0 Kudos
Message 3 of 6
(4,002 Views)
Dennis,

Thank you for responding. I'm trying to avoid recreating the wheel here if possible. I've included an attachment that hopefully clarifys my question. There are several user defined types that I'm not sure how to "make" with LabView. This module runs at a specific time during test execution.

I'm very interested in your ideas.

thanks,

todd
0 Kudos
Message 4 of 6
(4,002 Views)
I created a couple of controls and saved them as strict type defs to give you an idea. A structure in C or VB is equivalent to a cluster in LabVIEW. You can create clusters with a mix of data types, save them as controls, and then use them to build others or by themselves. There is app note 159 that describes type defs. If you go to the on-line help and search for customizing, type definitions, you'll find a link.
Download All
0 Kudos
Message 5 of 6
(4,002 Views)
"Marty G." wrote in message
news:f6e80850.0403221830.5cd0f2e5@posting.google.com...
> Dennis Knutson wrote in message
news:<506500000005000000796D0100-1079395200000@exchange.ni.com>...
> > I'm not sure why you want to access the .bas files. There is no way to
> > convert basic source code to LabVIEW. Some things like declarations,
> > memory allocation, are not required in LabVIEW or are done for you by
> > the LabVIEW compiler. Constants, local and global variables, user
> > defined types in the form of custom controls, all exist in LabVIEW but
> > in general, are much easier to use. Maybe if you post a snippet of VB
> > code, someone can translate it into LabVIEW.
>
> Labview provides a way to use custom ActiveX controlls.
This would be
> the preferrend interface.
>
> Marty

I am currently trying to do just that, execute visual basic programs within
labview. Can you point me to some good examples of how to write visual
basic programs so they can be used in labview? I have already figured out
how to use labview programs in visual basic, but not the other direction. I
have a few subroutines in visual basic that I would like to modify for use
in labview environment.

TIA,

JJ
0 Kudos
Message 6 of 6
(4,002 Views)