LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-Time tutorial

Hello all,
I just received CVI 8.1 and want to test the real-time functions... but
I can't figure out how it works and I couldn't find a code sample or a
tutorial on NI Developer Zone.

I remember seeing a demo where you choose a [Build][Target Type][x86] or
somesuch, but can't see any similar options. Am I missing something ?

How do I compile my prog and run it on a remote machine, assuming
communication is done through the new Network Variables ?

Thanks
--
Guillaume Dargaud
http://www.gdargaud.net/
"If voting could really change things, it would be illegal." —
Revolution Books. New York.
0 Kudos
Message 1 of 5
(5,400 Views)
Hello Gillaume,

Do you also have a copy of the CVI Real-Time Module? You'll need the module in order to run CVI applications in your real-time OS (unless you plan on using LabVIEW to call CVI-built DLLs).

If the answer is yes, and you have already installed it, your first step is to configure your real-time target using MAX (Measurement and Automation eXplorer). You should be able to see your RT node showing up in the Remote Systems section of the tree. To configure it, you need to expand it, click on the Software node, then click on the Add/Remove Software button on the top. You'll need to install the LabWindows/CVI Run-Time Engine and the LabWindows/CVI Network Variable components.

Once they are installed, and you reboot the RT target, go back to the CVI environment. A good place to start is to run a couple of examples in the samples\realtime folder. Each workspace there typically has two projects: one that will run in the target, and one that will run in PC host. So you should load the workspace in order to make sure that both projects are loaded. To make sure that the RT project runs in the right target, you need to set its target to the same name / IP that is configured in MAX. You do this by clicking on Run>>Switch Execution Target>>Select Target with Options. Once you do that, you should just need to run both projects simultaneously (if you want to debug both, you should have two instances of CVI running; otherwise, just run the one that you don't want to debug from outside the environment). TO debug the RT program, you run it just like you would a normal program.

Once you're done exploring the examples, and you want to start developing your own, you can select File>>New>>Project from Template and then select "Real-Time Application" to start with a good skeleton for your program.

Hope this helps.

Luis

Message Edited by LuisG on 03-19-2007 10:59 AM

Message 2 of 5
(5,390 Views)
LuisG said the following on 2007/03/19 17:10:
> Hello Gillaume,Do you also have a copy of the CVI Real-Time Module?
I can't find that. I have the 9-DVD + 2-CD kit with the whole nine
yards, including the LabView realtime module RTX/ETS but I can't find
the LabWindows module. Where is it supposed to be on the 8.2 kit ?

> You'll need the module in order to run CVI applications in your
> real-time OS (unless you plan on using LabVIEW to call CVI-built
> DLLs).If the answer is yes, and you have already installed it, your
> first step is to configure your real-time target using MAX
> (Measurement and Automation eXplorer). You should be able to see your
> RT node showing up in the Remote Systems section of the tree. To
That's empty but that's no surprise as I haven't configured any remote
node yet. The [Tools][RT Disk Utilities] menus are all greyed out, I
can't make boot disks.


> configure it, you need to expand it, click on the Software node, then
> click on the Add/Remove Software button on the top. You'll need to
> install the LabWindows/CVI Run-Time Engine and the LabWindows/CVI
> Network Variable components.Once they are installed, and you reboot
> the RT target, go back to the CVI environment. A good place to start
> is to run a couple of examples in the samples\realtime folder. Each
That directory is missing as well, although there are 24 folders in
/samples/

> workspace there typically has two projects: one that will run in the
> target, and one that will run in PC host. So you should load the
> workspace in order to make sure that both projects are loaded. To
> make sure that the RT project runs in the right target, you need to
> set its target to the same name / IP that is configured in MAX. You
> do this by clicking on Run>>Switch Execution
> Target>>Select Target with Options. Once you do that, you
> should just need to run both projects simultaneously (if you want to
> debug both, you should have two instances of CVI running; otherwise,
> just run the one that you don't want to debug from outside the
> environment). TO debug the RT program, you run it just like you would
> a normal program.Once you're done exploring the examples, and you
> want to start developing your own, you can select
> File>>New>>Project from Template and then select
> "Real-Time Application" to start with a good skeleton for your
> program.Hope this helps.LuisMessage Edited by LuisG on 03-19-2007
> 10:59 AM

Thanks, your explanation make a lot of things clearer, in particular the
fact that I'm missing something: either an install option in the
installer, or a separate installer on one of the installation DVDs, or a
licence. But if I have the LabView RealTime module, where's the
LabWindows one ?
--
Guillaume Dargaud
http://www.gdargaud.net/
"It's not 'vote fraud' unless you can prove those dead guys
would've voted the other way."
0 Kudos
Message 3 of 5
(5,361 Views)
Gillaume,

I guess the brunt of the problem is that you don't have the CVI real-time module CD. It sounds like you have some flavor of the NI Developer Suite. Unfortunately, the CVI real-time module has not yet been incorporated into the developer suite, and so it has to be purchased separately.  You can get more details here.

If you already have the LabVIEW real-time module, and you are comfortable developing in LabVIEW, you have the option of building DLLs in CV that can be called from a LabVIEW VI that is running on your real-time target. For that use, you don't need to have the CVI real-time module. All you'd have to do would be to select Run>>Switch Execution Target>>Select Target with Options, and then select "New RT Target via LabVIEW on the Network". If you want to debug the DLL, you just have to run it. CVI will instruct you to launch LabVIEW, which will download it and launch it, and CVI will connect to it after it starts running.

Luis
0 Kudos
Message 4 of 5
(5,348 Views)
Hello LuisG,
yes, after verification with NI, there's been a small error on my CD.
They sent me the CVIRTE instead of CVIRT... slight but big difference.
The real-time module is in the mail as we speak.

> Gillaume, I guess the brunt of the problem is that you don't have the
> CVI real-time module CD. It sounds like you have some flavor of the
> NI Developer Suite. Unfortunately, the CVI real-time module has not
> yet been incorporated into the developer suite, and so it has to be
> purchased separately.&nbsp; You can get more details <a
> href="http://www.ni.com/lwcvi/realtime/" target="_blank">here</a>. If
> you already have the LabVIEW real-time module, and you are
> comfortable developing in LabVIEW, you have the option of building
> DLLs in CV that can be called from a LabVIEW VI that is running on
> your real-time target. For that use, you don't need to have the CVI
> real-time module. All you'd have to do would be to select
> Run&gt;&gt;Switch Execution Target&gt;&gt;Select Target with Options,
> and then select "New RT Target via LabVIEW on the Network". If you
> want to debug the DLL, you just have to run it. CVI will instruct you
> to launch LabVIEW, which will download it and launch it, and CVI will
> connect to it after it starts running.Luis


--
Guillaume Dargaud
http://www.gdargaud.net/
0 Kudos
Message 5 of 5
(5,329 Views)