LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

"The server has not been initialized" Error

Hi, I am new to LabWindows/CVI and FieldPoint, so bear with me.  We are trying to simply reload an old LW/CVI application onto a new PC as the old PC is getting just that...old.  We decided to play it safe and not only load the executable, but all of the development software as well to make sure any dll's/etc. were loaded.  This included LW/CVI 5 and FieldPoint 1.7.  When we try to run the executable, we are now getting a popup that says "The server has not been initialized."  I have loaded the IAK file into FP and verified that we are getting data.  I also poked around in the code and the error box seems to be generated whenever the return integer from an FP_Open() routine or something similar is bad.  Does anyone know what this message means exactly?  I'm trying to determine what the actual error code (#) is, but now I can't even get it to compile due to "undefined symbol" errors.  Maybe some kind of link?  Although the same executable works fine when we go back to the old PC.  Is there something we have to do to ensure that whatever server it is referring to is "initialized?".
 
Thanks,
Jon
0 Kudos
Message 1 of 9
(4,726 Views)

Hello jclark,

I have taken a look at your problem, and I have a couple of suggestions.  Unfortunately, CVI 5 and FieldPoint 1.7 are pretty old, and there is not much documentation.  I did install CVI 5 and FieldPoint 2 on a machine to try and help you out. 

You mentioned that the error seems to be occurring at the FP_Open.  If you look at the FP Open function help you will see the following definition:

IAStatus FP_Open (IAString Configuration_File_Path_Name, IAHandle *Server_Handle); 

If you open your code, is the pathname used in the FP_Open an absolute path (i.e. c:\myProject\myIak.iak)?  If so, have you placed your configuration file in the exact same location?  If not, the FP_Open will return an error.

Also, you mentioned that you can read data from FieldPoint Explorer.  Are you reading expected data, and does the data change?

Regards,

Jesse O.
Applications Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 2 of 9
(4,694 Views)
Jesse,
 
Thanks for looking into this for me.  I know, those versions are pretty old, but they have been working, so there's no reason they shouldn't still.  I'm just hoping I'm missing something obvious.
 
Regarding the error - sorry, I wasn't very clear - it seems to be generated anytime an FP command fails, not just an FP_Open.  I've noticed when we start up the executable, we get the error 8-10 times and have to keep hitting OK.  I think this is because on a program error, the error routine attempts to release any tags and close the server connection by referencing the FP handle which doesn't exist in the first place since the FP_Open failed (which got us to the error routine in the first place).  Again, I didn't write the code, and the executable derived from the code seems to be working on the old machine, but this is what I'm seeing.  Also, the FP_Open is using the NULL argument to use the last opened IAK file in FieldPoint Explorer.  I think I may have tried to put in a specifc path but had no luck.  Fieldpoint Explorer is definitely establishing a connection and reporting data.  We have a couple thermocouples tied in and you could see the room temperature bouncing around a little. 
 
One more thing, since I posted last, I ran the program on a Win98 machine and got slightly different error messages.  First "The IAK Server Has Not Been Initialized", followed by a few "The server has not been initialized", and also a "General server error."  Probably not that significant, but I thought every bit of info might help.  Strange that we get slightly different error strings on different machines.
 
Because the same executable is running without problems on the old machine (I think it's NT), it leads me to believe it has to be a setup/config issue outside of the code itself, or maybe an OS problem.  Ideas?
 
Thanks Again,
Jon
 
 
0 Kudos
Message 3 of 9
(4,692 Views)

Hello Jon,

As I mentioned before, I setup a FP-1600 and an analog input module.  I also installed CVI 5 and FP 2.0.  In this configuration I wrote the following code.  It is very simple and basic, but it should give us some useful information.  Can you please take the following text file, and create a CVI project and add the contents of this file in a .c file.  Run this application.  It will require you to enter in some information into the code for the correct channel to open. 

I wrote this for you because you mentioned getting "undefined symbols" errors.  I'm thinking there could be something in your code that is OS specific.  It could also be a problem with your software installation (i.e. not installing the CVI support when you installed the FieldPoint driver).  This code should help isolate the problem.

Please use the attached code in a project to see if you can use it to communicate with your device. 

Regards,

Jesse O.
Applications Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 4 of 9
(4,671 Views)
First of all, let me mention that I am not currently able to connect to the device - I'm at the office and the equipment is out a plant we work for.  However, we got the same error out there, even with a connection verified (saw the data coming through FP Explorer), so I'm assuming a connection is not necessary to get the code working (it just wouldn't communicate and display the right data).
 
Anyway, I took the text file you included and modified CreateTagIOPoint"call to match my setup (I replaced the AI module with an FP-TC-120 module at position 1 [@1]).  At first, I received the link/undefined symbols error, but then I went under "Instrument" and loaded an .fp file titled "FieldPoint.fp".  To be honest, I'm not sure where that came from - it was lying around in the project folder - but it worked (gotta like that - just randomly throwing things in without know what they mean or where they came from).  I ran the program and received the following:
 
Starting Program
Error:  ÿÿÿÿError:  The server has not been initialized.Error:  The server has not been initialized.
Completed Program!
 
I then changed the argument in the FP_Open function to point to the location of the IAK file instead of using NULL and got a similar response:
 
Starting Program
Error:  Error:  The server has not been initialized.Error:  The server has not been initialized.
Completed Program!
I did a little debug step-through and it seems the FP_Open creates the first error (garbled characters) and the rest are likely results of not having an open connection.  What is it that is not allowing us to open the connection between CVI and FP!?!?
 
Finally, I went back in to the FieldPoint setup program and went to "custom" install and noticed that the CVI Instrument Driver portion is checked, so I assume it installed it by default when I originally installed.  I'll try to double-check on that, although I assume that's a non-issue since it seemed to be in reference to the "undefinied symbols" problem.
 
Jon 
0 Kudos
Message 5 of 9
(4,657 Views)
UPDATE: I was finally able to get our Win98 machine to function here at the office, ran the same test program, and this time came up with an error along the lines of the "The operation timed out".  To me, this looks like a good sign - it seemed to opened the connection to the server, but was unable to access the I/O and thus the following operation timed-out.  I think this is what we should be seeing with our original program, but is not the case.  It seems to be an OS issue based on the outcomes, but I'm not sure why that would be.
 
?
0 Kudos
Message 6 of 9
(4,652 Views)

UPDATE: I installed Fieldpoint v5.0, which I downloaded from NI.com and installed it on my XP machine.  It seemed to already be pointed at the right IAK file, and so I ran the test program again, the first time with the FP_Open call pointing to a specific path, then using the NULL argument.  Here's what I got:

 Starting Program

 Error:  The FieldPoint server initialization failed. Possible causes: 1. Missing or corrupt configuration file; 2. Failed to create callbacks.Error:  The specified tag name was not     found.Error:  An invalid IAHandle was specified. Verify that the configur
 ation file is valid and the IAHandle used matches the IAHandle returned by FP_Open.

 Completed Program!

 Starting Program

 Error:  The connection to a remote device timed out.

 Completed Program!

It looks like the second time it would have worked if I was connected.  So maybe I can just use this FieldPoint installation and be done with it...

 

0 Kudos
Message 7 of 9
(4,649 Views)

Hello Jon,

Once you have the hardware, installing the newer version of FieldPoint might correct your problem.  When you ran the code, were you running it in CVI 5? 

Generally our drivers keep compatibility for 3 versions back, so FieldPoint 5 might not install support for CVI 5.  However it looks like you are able to communicate with the driver ok, so I would give it a try. 

Please let me know how this turns out for you.

Regards,

Jesse O.
Applications Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 8 of 9
(4,644 Views)

Alas, its over...installing FieldPoint 5.0 did the trick.  Apparently there are some issues, understandably, between FieldPoint 1.7 and XP.  Hopefully that helps someone else out there.  Thanks for the help.

Jon

0 Kudos
Message 9 of 9
(4,622 Views)