LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

"The target machine is not connected to the network" -labwindows real time target problem

Hello everybody,

i have a desktop  PC real time target installed  and in MAX  it  seems to be  very well working. I have the target desktop computer connected directly with my host laptop (both are not connected to the internet, unless i switch WiFi on on my laptop..). I created very simple test application in LabWindows CVI (uses some NI serial port PCI card - but that works fine). 

When i try to go to "Run-> Select Execution Target for Debugging ->  " i can see my real time target (which I have already chosen from the list..) but when I select it i get this error message: "The target machine is not connected to the network." 

Please could you help me with this..?

 

 

The  network settings - both computers are connected through single ethernet cable and  in MAX the target  is  set  to  obtain a IP address automatically or is predefined to some number..

The VISA security option is defined and i tried to disable the firewall and antivir..

 

thank you 

 

0 Kudos
Message 1 of 11
(5,405 Views)

Hello,

 

i did not still solve the problem..

I am not able to select the execution target (labwindows cvi 9) and thus it is not possible for example to go to "Manage Files on Real time execution target" this item is inactive..

 

Now i have both computers normally connected to local network, i can seen the real time target in MAX, i can run for example the VISA comport test panels.. but it is not possible to connect to the target in LabWindows CVI 9 ..

 

Real time target version: 8.6, Build Time Jun, 24, 2008

 

I can see this error log:

 

####
#Date: Mon, Jul 20, 2009 7:09:19 PM
#OSName: PharLap
#OSVers: 13.1
#AppName: PH_EXEC_SMP
#Version: 8.6
#AppKind: AppLib
#AppModDate: 06/23/2009 22:06 GMT

LVRT.DLL load address: 0x05FE8000

 

07/20/2009    19:09:21.203    [error] LabVIEW:  Failed to load shared library c:\NI-RT\system\cvi_lvrt.dll on RT target device. 

 

 

Any suggestions?

Thanks. 

 

0 Kudos
Message 2 of 11
(5,380 Views)

Hello,

I tried to completely reinstall the real-time target and also to modify the NI-RT.ini file (I've found this suggestion somewhere on this forum..) 

but without any effect... Do not know what to do... 😞

 

 

0 Kudos
Message 3 of 11
(5,371 Views)

Hello VoPe, 
 
At the very beginnning there is one question: 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). I assume that you have, but please confirm. 
 
If the answer is yes, and you have already installed it, your first step is to configure your realtime 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.

You wrote that you can see your Real-Time OS PC in the "Select the execution target". Sometimes it happens that IP address is not assigned correctly. Please manually enter the IP Address via Run» Specify Execution Target for Debugging» New Execution Target (before you have to configure RT PC in MAX to have static IP address). 
 
Let me know if that helps.
 
Regards,
Dawid 

0 Kudos
Message 4 of 11
(5,346 Views)

Hello Dawid,

 

thank you for the answer...

 

"Please manually enter the IP Address via "- everythink above this statement was OK (installed, configured..)

The IP address was the problem. I entered it manually and it works. Now I can select the target and both the commands "Instal program to real time execution target" "Manage files on real time..." are active now.

 

But there is a new error 😞

 

Debug command or the "Install program to.." makes this error:

 

----------------------------------------------------------- 

LabWindows/CVI cannot connect to your real-time target.

Verify that -connected to network
            -booted to LabView real-time
            -labwindows CVI run time installed
            -version the same as development.. (shortened)

----------------------------------------------------------

all mentioned in the error is OK. in the error log is this:

####
#Date: Wed, Jul 22, 2009 12:15:30 AM
#OSName: PharLap
#OSVers: 13.1
#AppName: PH_EXEC_SMP
#Version: 8.6
#AppKind: AppLib
#AppModDate: 07/20/2009 22:58 GMT

LVRT.DLL load address: 0x05FE8000



07/20/2009    22:59:10.181    [error] LabVIEW:  Failed to load shared library c:\NI-RT\system\cvi_lvrt.dll on RT target device.
07/20/2009    23:07:28.440    [error] LabVIEW:  Failed to load shared library c:\NI-RT\system\serial.dll on RT target device.
07/20/2009    23:50:22.742    [error] LabVIEW:  Failed to load shared library c:\NI-RT\system\serial.dll on RT target device.
07/21/2009    23:06:18.975    [error] LabVIEW:  Failed to load shared library c:\NI-RT\system\serial.dll on RT target device.
07/21/2009    23:15:31.399    [error] LabVIEW:  Failed to load shared library c:\NI-RT\system\cvi_lvrt.dll on RT target device.

 

the serial port package is also installed on the realtime.  

(it is the same even for a really minimalist application without any special features..) 

 

 

 

I will appreciate any suggestions what to do..

 

Thank you

 

Vojtech 

 

0 Kudos
Message 5 of 11
(5,331 Views)

Hello Vojtech,
 
The solution for your problem probably is changing skeleton code from "Main" to "RT Main". Below you can find a few steps how to generate DLL in CVI to run on Real-Time:

In order to create a Real-Time DLL under LabWindows/CVI 8.5 and deploy this to a remote target running the LabWindows Real-Time Module follow these steps.
1.       Create a new source file by selecting File»New»Source(*.c)
2.       Change the Target Type to a DLL by selecting Build»Target Type»Dynamic Link Library
3.       Change the Target Settings to Real-time only Run-time Support by selecting Build»Target Settings»Run-time Support»Real-time only
4.       Select your remote target inside the LabWindows/CVI programming environment Run»Select Execution Target for Debugging»New Excecution Target
5.       Input your Remote Target's IP Address.
6.        Add the RTMain skeleton code to your source file by selecting Edit»Insert Construct»RTMain
7.       Run the program with the real-time target turned on, this will now upload to your real-time target and begin execution.

If you wish to install the Real-Time program to your target you can do this via Run»Install Your-DLL-Name.dll to Execution Target at which point the DLL will be installed and the real-time system will prompt for a reboot.

You can also use the LabWindows/CVI Real-Time Module to download a DLL onto an RT target. Refer to Programmer Reference»Creating and Downloading DLLs to Real-Time Targets in the LabWindows/CVI Help contents for more information and a step-by-step guide for using LabWindows/CVI and RT targets. To access theLabWindows/CVI Help, select Help»Contents.

Beside you can check examples from Example Finder (Help»Find Examples) and search for "real-time" - you can see then how programs are done.
 

Hope this would help.

If that won't help please send me your code - I'll try to run in on my PXI. Send me please also the configuration from MAX of your RT System (in MAX File»Export).

 

Regards,
Dawid  

0 Kudos
Message 6 of 11
(5,307 Views)

Hello Dawid,

 

many thanks for help,

 

I am out of the lab for the rest of the week. So I will try to follow your steps on Monday.

I think I have used the predefined "real-time" application from "new project" menu (and there is RTmain()..)

But maybe there is some difference when you use "Edit»Insert Construct»RTMain"

We'll see.

Thank you

Vojtech

 

0 Kudos
Message 7 of 11
(5,294 Views)

I'm not sure what is causing the problem, but I think it is related to the errors about failing to load the shared libraries.  If cvi_lvrt.dll is not being loaded on the target then you are not going to be able to access the target from CVI.

 

Here are some ideas you can try:

 

1) Try connecting to the RT target via FTP from a Windows command prompt ("ftp xxx.xxx.xx.xx") and use an empty username and password.  Make sure you use the same exact address used in CVI and make sure you can put and get files to/from the target.  This should help ensure that network communication to the target is working correctly.

 

2) In MAX, expand Remote Systems >> [Your Target] >> Software and make sure you have LabVIEW Real-Time 8.6 and LabWindows/CVI Run-Time Engine for RT 9.0 installed on the target.

 

3) Try removing the serial library (serial.dll) from the target and reboot.  See if you still get the same error about failing to load cvi_lvrt.dll and the same problems from CVI.  If you have any other libraries installed to the target that are not needed for a simple example, then try removing them as well.

 

4) Try uninstalling all software from the target in MAX, rebooting the target, and reinstalling the LabWindows/CVI Run-Time Engine for RT to the target from MAX.  You shouldn't need to manually select any other items, as any dependencies will be selected automatically.  You could also try reformatting the target and reinstalling software if you are comfortable with that.

 

If none of this works, can you post a screenshot of MAX showing Remote Systems >> [Your Target] >> Software expanded in the left tree with [Your Target] selected in the left tree so that the right pane shows the target details?  That might give us some clue.

 

I'm sorry to hear you are having trouble getting this target working.

 

-Jeff

NI

 

0 Kudos
Message 8 of 11
(5,272 Views)

Hello,

 

I have removed all the software from the target and installed only what was really needed.... and it works. It works pretty fine.

I was so glad that it  works (and also busy) that I did not figure out which part of the software was causing the troubles. But the serial library is OK. (it could be NiDAQ, "network varible" or VISA server, I'll try it tomorrow)

 

Thank you all, especially Jeff 🙂

 

Vojtech

 

0 Kudos
Message 9 of 11
(5,222 Views)

Hi there,

 

I am new in labWindows and I am working on a project that someone else started. After compiling the c_code I have a VI popping up requiring a user name and password. I don't have this info. I went over the C code fund some functions related to the the passwords: SetActiveCtrl (panelPwd, PANEL_PWD_STRING_PASSWORD);PasswordCtrl_GetAttribute (), MessagePopup (), SetActiveCtrl(), int CVICALLBACK Password_Entered (int panel, int control, int event,
  void *callbackData, int eventData1, int eventData2)... but I don't see where the exact info is stored for me to proceed or change the passord. Please your help is needed. my codes have 3269 lines, a bit crowded.

 

Thank you,

agyna

0 Kudos
Message 10 of 11
(4,605 Views)