LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Absolutely Beginner in LabView.(But advanced in CVI) Need help!

Hello World ?
First of all I dont wanna give any statement whether cvi or labview is better. Im sure both have reason to live.
1.)
I was spending about 1h to find out how to do a "Hello World" application in labview(linux)... I couldnt find out. Does someone have a such example ?
2.)
Second question its possible to use cvi code in labview and vice versa ?

Thanks a lot for helping me, on my first steps.David
0 Kudos
Message 1 of 10
(3,666 Views)
I agree that both LabVIEW and LabWindows have there places. I still do occasional programs in CVI but usually only when I have no other choice (like and IVI driver).

1) See the attached example. You'll notice that there's considerably less code than CVI.
2) Yes. You can create a dll in CVI and call it in LabVIEW and you can create a dll in LabVIEW and call it in CVI. You also have option of using the ActiveX properties and methods of each in a program. There's examples to be found at NI's Development Library.
Message 2 of 10
(3,666 Views)
1.) There are also examples that ship with LabVIEW. On a Windows machine, they're under /Labview 6/examples.
2.) Disclaimer: I'm not a user of Linux, but...
The support for dll's under Windows is good. I have no clue whether something like a shared object file under Linux is supported in LV though. And ActiveX is probably out as well. A quick search did lead me to this article though.

Good luck!
0 Kudos
Message 3 of 10
(3,666 Views)
I missed the linux mention. CVI is only available for Windows, Sun, and HPUX so I don't think it can create a linux shared library but since it's ansi C, a linux C compiler might be able to create the shared library from the CVI source code.
0 Kudos
Message 4 of 10
(3,666 Views)
Thanks a lot Dennis,
Anyway ; ) sorry...your example is really easy! But actually I didnt say it. I would like to do a user action before... like push a Button and then "Hello World" would be display it.
Im still looking for a such example.

Thanks a lot to everbody.
0 Kudos
Message 5 of 10
(3,666 Views)
There's lots of ways you can do this. Here's an example in 6.1 that uses the event structure. The other example is in 6.0 and creates an array of Booleans. You could also use a simple case structure with the "show" Boolean wired to it and the False case empty. My suggestion would be to run through the tutorial that ships with LabVIEW, check into what training classes might be available in your area, and get any one of a number of books available. Here's a link to the LabVIEW ones.
Download All
0 Kudos
Message 6 of 10
(3,666 Views)
davidx wrote in message news:<506500000008000000AD610000-1031838699000@exchange.ni.com>...
> Hello World ?
> First of all I dont wanna give any statement whether cvi or labview is
> better. Im sure both have reason to live.
> 1.)
> I was spending about 1h to find out how to do a "Hello World"
> application in labview(linux)... I couldnt find out. Does someone have
> a such example ?

Simply add a string indicator to the panel (click window/show controls
palete/[abc]), then go to the diagram (click window/show diagram) and
with the wiring tool (click window/show tools palette/)
add an input to the string indicator (place the spool over the left side
of the widget on the diagram, right click, select create/constant, and
type "Hello World"
into the constant.

Les Hammer
Complete Test
0 Kudos
Message 7 of 10
(3,668 Views)
In article <5065000000050000006BAB0000-1031838699000@exchange.ni.com>,
"Underflow" wrote:

> I have no clue whether something like a shared object file under Linux
> is supported in LV though. And ActiveX is probably out as well.

Yes, they are supported. They're called run-time shared libaries and they
have the .so extension. I just started using them in order to avoid using
CINs. They are used in the same way as a DLL. You have to know the
function name, the data types, arguments, and return value.

You're right about ActiveX, that's all MS based.

If david is still interested, I just tried out the comedilib.so (Comedi
libary) shared library with my Measurement Computing das08 and das802
boards as of one hour ago. So far so
good. I'm much happier that I only
have to compile once and I'm left a with great big pile o' functions to
play with.

- Kevin
0 Kudos
Message 8 of 10
(3,666 Views)
If it's any help I have some labview 8 complete beginner videos at www.fafiles.com. Hope they come in handy to whoever needs them
National Instruments LabVIEW beginner video tutorials available at www.fafiles.com. Get Wired Up!!!
0 Kudos
Message 9 of 10
(3,480 Views)
Hello everyone,
 
In an attempt to try to catch everyone who might have a LabWindows/CVI and Linux or Real-Time interest, I'm going to repost this information in this thread as well. I know this thread has been going on for a few years now, but I wanted to update whoever is interested in the latest LabWindows/CVI modules that we've released to try to address your multiplatform support needs:
 
So we now have a Real-Time Module, which allows you to develop LabWindows/CVI apps on a Windows machine and run on a real-time PXI or PC target.
Also, to partly address the main subject of this thread, in August, we release the Run-Time Module for Linux, which similarly allows you to develop on a Windows machine as you always have with CVI, and then run your application on multiple Linux distributions.
 
That's a brief overview of the latest modules, but if you want more information on what hardware is supported and also a more in-depth discussion on the module, take a look at the following resources:
Real-Time Module: www.ni.com/lwcvi/realtime
 
Thanks.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 10 of 10
(3,407 Views)