LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Compact FieldPoint 2000 with Labwindows/CVI RT 8.5.0?

Good Evening

I'm trying to use a CFP-2000 with Labwindows CVI.
I have connected this target on an Ethernet port and I have configured the IP settings (and I believe that I works well, because there is a response to my ping requests).

My problem is to install some software int the RT target. I have read a lot of documentation (ni.com, MAX Help...) and I do the followings things:

- in Max/Remote systems (systemes déportés in french)/cfp2000 (the name I have given)/Softwares
- right click on Softwares  -> Add/Delete Sofwares

In the list of recommended Software, There is only different versions of Labview real time, whereas I want to use Labwindows/CVI RT (And I know that is possible, because Labwindows is suported by CFP-2000...)

So I choose to make a personnalized Installation but the Labwindows module is not present.

I've seen on internet some screenshots that show what I need : Labwindows/CVI Run-time Engine for RT 8.5.0. Labwindows/CVI 8.5.0 and Labwindows/CVI RT 8.5.0 are both installed on my computer but MAX doesn't seem to recognize it. And it's not possible to download this run time by ni.com (only the runt time for CVI without RT...)

So I wonder if there is a particularly way to install the different softwares...

Thanks

PS : Sorry if some words are not exact but I Use a french version of MAX
0 Kudos
Message 1 of 11
(6,335 Views)
Hi sebdebrans,

The LabWindows/CVI Real-Time Module only supports the following targets:
  • National Instruments real-time PXI controllers with the PharLap ETS RTOS installed
  • Desktop PC running as a real-time PharLap ETS target
The LabWindows/CVI Real-Time Module is NOT supported on the following targets:
  • PCI RT plugin boards such as the PCI-7041
  • FieldPoint
  • Compact FieldPoint
  • CompactRIO
  • Compact Vision System

So in order to develop an RT application for your CFP-2000, you will need to use LabVIEW RT. 

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 2 of 11
(6,328 Views)
Hi Jonathan

Thanks for your answer.

    I have a last question I've seen In documentations that CFP 2000 is compatible with Labwindows (the recommended softwares are Labview, Labview RT
, Labview Datalogging...Labwindows/CVI is mentionned in the "other compatible sofwares".

-> an extract from the doc here

 So I imagine that it's possible to deploy applications created with Labwindows/CVI (without the RT module)?


    Why there is only Labview RT (with different versions) in the list of sofwares possible to install in the CFP-2000. According to the documentation of the CFP-2000, I could see Labwindows/CVI (without the RT module, according to your answer)?.

Best Regards
0 Kudos
Message 3 of 11
(6,315 Views)
Hi sebdebrans,

I will try and address all your questions in this one post including the similar forum post you made here.  So lets get started....

The documentation you mention with regards to seeing CVI listed in the Other Compatible Software section is most likely due to the fact that there is a FieldPoint API for CVI that you can use on Windows.  However, there is no FieldPoint API in CVI for PharLap as this API was never ported over.  Only LabVIEW has versions of the FieldPoint API for both PharLap and Windows.  So if you needed to do anything with the FieldPoint API, that code would need to be written in LabVIEW.  

Now, with all that said, if you are not using the FieldPoint API in CVI, and just want to create a CVI RT DLL that you can then call from LabVIEW RT, you should be able to do that.  This scenario doesn't require the CVI RT Module to be installed. 
To build a CVI DLL that you can run on a RT target, you must select Real-time only on the Run-time support option of the Build » Target Settings dialog box.  Now, it is important to mention that this CVI RT built DLL is statically linked to cvi_lvrt.dll located in the windows\system32 directory. The cvi_lvrt.dll is a subset of the CVI RTE library functions that are supported in RT applications. 

Before I mention what you need to do on the LabVIEW part to make sure that you download this DLL, I wanted to address why you don't see LabWindows/CVI RT installer entries in the LabVIEW Real-Time Software Wizard. Measurement and Automation Explorer (MAX)
populates the LabVIEW Real-Time Software Wizard dialog with entries found in the \RT Images\ directory.  MAX reads these files and displays the contents in that dialog. Now, for the CVI RT files, we have conditions that say only display the contents if the target is a Desktop PC or a PXI system. Since you are using a compact fieldpoint device, then we will not display anything.  This is normal and expected in this scenario.

Now, moving onto the LabVIEW RT deployment side of things. 
The first scenario is when you deploy and run a VI by right-clicking the VI under the RT target in the Project Explorer window and select Deploy.  In this scenario, LabVIEW determines what static dependencies your CVI RT DLL has and loads those support files into memory.  In this case, LabVIEW determines that the CVI DLL is statically linked to cvi_lvrt.dll and loads this file into memory. Thus the RT target can run the VI without any problems.  The next scenario is creating stand-alone RT applications. Building the VIs into an RT application works fine but the problem comes when you deploy this RT application by right-clicking the RT build-specification and selecting Deploy. If you did NOT include cvi_lvrt.dll as a support file and try to deploy, the deploy dialog will tell you that the download completed with errors.  So the solution is to add the cvi_lvrt.dll to the Support Directory (which is the ni-rt\startup\data directory). You do this by first adding the cvi_lvrt.dll file to your LabVIEW project. Next you will add this file to the Always Included Section in the Source Files category. Then in the Source File Settings category, you will need to make sure that the cvi_lvrt.dll file has a destination directory of Support Directory.

Hopefully this answers your questions. If not, let me know.

Best Regards,


Message Edited by Jonathan N on 04-09-2008 02:23 PM
Jonathan N.
National Instruments
0 Kudos
Message 4 of 11
(6,284 Views)
Dear Jonathan,

Thanks for all these precisions. Your answer contain the right solution to my problems. I included the cvi_lvrt.dll in my project, and now my Labview program can be deployed in the RT target.

Best regards
0 Kudos
Message 5 of 11
(6,271 Views)
(Sorry for double posting : I wanted to edit my message but the delay has expired...)

 I believed that my problems were resolved but they aren't Smiley Sad

I've tried to included this cvi_lvrt.dll file il my project as you said. Then I right click the RT build-specification and I select Deploy and I have no error message but I can't run my VI on the RT target (by clicking on the arrow to execute the VI or by right-cliking my VI and select Deploy) : when I do this I obtain the following message :

Deploying cFP-2000 @0  (successfully deployed settings)
Deploying cfp2000  (successfully deployed target settings)
Deploying essaiDLL.vi
Failed to download essaiDLL.vi
LabVIEW:  Failed to load shared library MaDll_dbg.dll:Addition:C on RT target device.


Download completed with errors
.


essaiDLL is the name of my project and Addition is the name of the function contained in MaDll_dbg.dll

Furthermore, I've noticed that with or without the cvi_lvrt.dll file, I have no error when I right click the RT build-specification and I select Deploy but I have always the same error  when I want to run or deploy my VI.

Best regards
0 Kudos
Message 6 of 11
(6,266 Views)
Hi sebdebrans,

It sounds like the problem you are running into deals with just LabVIEW RT and not so much with CVI.  If its mostly LabVIEW, I would probably suggest posting on their forums.

From what I understand after reading your post, you get this error under both scenarios of having cvi_lvrt.dll and not having cvi_lvrt.dll.  Is the MaDll_dbg.dll a CVI RT DLL that you built?  Does your VI actually run and complete normally when you build an RT application? I would expect your RT application to error out if LabVIEW can't load that DLL when running from the IDE.

What exactly does that Addition function do? Is it making any Win SDK calls, calling any unsupported libraries?

Have you tried the DLL Checker found in the
How Can I Verify that My DLL is Executable in LabVIEW Real-Time? KB which ensures your DLL is compatible with RT?

Best Regards,


Jonathan N.
National Instruments
0 Kudos
Message 7 of 11
(6,241 Views)
Hi Jonathan,

First I will answer to your questions :

MaDll_dbg.dll is a DLL made with Labwindows/CVI RT which contain one function called Addition which has 2 parameters (2 int, a and b) and which returns an other int. This function returns the result of a+b...

Then when I built a Labview RT project which doesn't use a DLL, I can deploy my program by right clicking build specification and select Deploy or by run directly my VI. The problem is when my VI contain a Labwindows/CVI Built DLL...

I've tried to use DLL chercker 8.5 to check MaDll_dbg.dll and I obtain the following window : dll checker
I understand that my DLL is good and can be used with Labview RT but it needs some imports ? I have included all the DLL which are on the screenshot in my Labview RT project (I've configured the buid specifications to make sure that they are always included in the source files and int the souce files settings they are included in the Support Directory).
I can build my project and deploy it in the target and the code is executed when I choose "Run as startup" in the build specification shorcut menu (my program activate/desactivate every 500ms the Digital Output 0 when the number returned by my function Addition is equal to 5 and every 2000ms if it's different from 5).
Unfortunately when I choose to run my VI by right cliking and Select Run or Deploy I obtain always the same error message I've described in my precedent post...

So my questions are :

1)° Is it possible to run a Labview RT VI which use a Labwindows/CVI built DLL and use the VI to interact whith the target (for exemple to change parameter a or b to make the result equal or different form 5?

2°) I've tried to make an other DLL which contain a function which read or write on the digital I/O, but I'm not Sure that the Fieldpoint functions that are installed in Labwindows/CVI allom me to do that : I've installed NI Fieldpoint 6.0, which add a Instrument driver called "Fieldpoint CVI Interface" and which contains the following functions :

- Open
- Close
- Create Tag I/O Point
-
Destry Tag I/O Point
- Read
- Read cache
- Advise
- Change Advise State
- Free PD Callback Buffer
- Stop
- Write
- Error Message

Do I have all the Fieldpoint functions or are some of them missing?

I join in attachment my Labview RT project and my Labwindows/CVI project

Best regards (and sorry for my big post but I wanted to explain precisely my situation Smiley Wink)



Download All
0 Kudos
Message 8 of 11
(6,227 Views)
Hi sebdebrans,

I'm still a little confused about your scenario so let me explain what I am seeing.  First off, I wanted to remind you that you cannot use any FieldPoint functions in you CVI RT DLL since we don't support the FieldPoint API for CVI on PharLap.  Any FieldPoint code must be done in LabVIEW RT so there is really no point in you installing the FieldPoint API for CVI.   This is very important for you to understand since it appears you are trying to do this. 

Now, I don't have a Compact Fieldpoint 2000 at my desk, but I do have a dual-core PXI system that is running LabVIEW RT on PharLap.  So I created my own LabVIEW RT project and included a VI that called your CVI RT DLL and it deployed fine in both scenarios (deploying the VI and then deploying the RT application).  Your DLL is extremely simple so I find it odd that you are seeing that eror. Is this the exact DLL you are trying to download or did you remove some functions?  Since your simple DLL works fine for me, it makes me think you are also downloading other components that could be causing problems. For example, I noticed you are downloading another VI as well called DO_O.  So my first suggestion for you is to create a very simple LabVIEW RT project that ONLY includes a VI that calls that DLL. Do not include anything else.  Deploy that and see if you get any errors. 

Now, I did open up your LabVIEW RT project and browse through some of the settings and the first thing I noticed is that you were including several core Windows DLLs like kernel32, user32 along with a few VC runtime DLLs like msvcrt71.dll. You don't need to include these components in your LabVIEW RT project since we have already ported over these core components to PharLap.  I will say that we did have to massage some of those components to get them to fully run on PharLap to work with our software. Therefore you should not be including these DLLs as they could cause conflicts.  You just need to include the cvi_lvrt.dll. 

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 9 of 11
(6,217 Views)
Hi Jonathan,

First I want to thanks you because each times I asked you some questions, you have answered quickly and precisely.

But I have still some questions...Smiley Wink

1°) What is the utility of the Filedpoint functions in CVI if the FieldPoint API for CVI is not supported on Pahrlap? Does it mean that Compact Fieldpoint (or Fieldpoint) can have an other OS? ( I'm a student in training periode ans I don't know well the NI materiels...). My tutor wants that I can create a DLL (which contains function that use I/O ports from the Compact Fieldpoint) which will be encapsulated whith Labwiew RT. The code written with Labview will be very minimalist (call of the DLL...). But my tutor doesn't know if this is possible....

2°) As you advised me in the precedent post, I've tried to make a very simple Labview RT project which contains only the Call Library Function Node that call my DLL (which is always the same, one function Addition...). First I try to deploy the RT application and I had an error (ans I tried to deploy the VI but I had an error too...). Then I have included the cvi_lvrt.dll in the project and I configured it like you have described in one precedent post, and I notice that this DLL allow me to deploy my RT application, but noy my VI...When I try to deploy my VI, I obtain always the same error message :

...
Failed to download DLL.vi
LabVIEW:  Failed to load shared library MaDll_dbg.dll:Addition:C on RT target device.


Download completed with errors.

I have quickly seen a collegue who said me that this error can occure because the path name of my DLL is bad when the application is deploied in the RT target, but when I build my project the DLL is in the following directory : c\ni-rt\startup\data, so I think it may works but I wanted to have your opinion...

You will find in attachement my very simple Labview RT projet and my DLL...

Best regards
0 Kudos
Message 10 of 11
(6,182 Views)