FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Read Shared Variables on cFP

I have a simple application running on compact fieldpoint.  It is reading a number of channels of data (as scalars) once per second, and then writing these values to shared variables.  On the PC end, I am hosting these variables and reading the shared variables.  My problem is that the shared variables written by the PC seem fine, but the shared variables written by the cFP never show up in the variable manager and are not available for reading by the PC.  Below is a scrap of the routine running on the cFP.  I know it is running OK.  If I monitor the values being writting to the shared variables it looks fine.  It's just that I can't read a proper value from the shared variables writting by the cFP.
0 Kudos
Message 1 of 7
(4,432 Views)

This may be a hint:

The shared variables are deployed and the routines are running.  If I kill the shared variable engine, the routine running on the computer stops with an error.  The routine running on the cFP keeps running happily along, and acts like it's still writing to the shared variables.  It can't be of course, because the shared variable engine is stopped now.

Message Edited by rgentry on 04-25-2007 10:37 PM

0 Kudos
Message 2 of 7
(4,426 Views)

One more hint:

If I move the host location for the shared variable from the computer to the cFP, the variable can be read and written to.  So, it appears that the shared variable hosting on the PC is to blame here.

0 Kudos
Message 3 of 7
(4,417 Views)

Hi,

You mentioned that upon closing the shared variable engine, you recieve an error. What is this error? Meaning, what was the message associated with this error? Was there an error code?

This may lend some more clues as to why you are encountering this problem.

Cheers,

Emilie Kopp | Applications Engineer | National Instruments

0 Kudos
Message 4 of 7
(4,388 Views)
Emilie, thanks.
 
I figured this out late last night after much re-installing of software and writing of test code.  It might be a bug -- it's certainly not a feature.  Here is what happened. 
 
My compact fieldpoint and computer are running static IPs on this subnet: 10.1.0.X.  Communication between the computer and cFP are fine. 
 
When I deploy the compact fieldpoint and computer applications, and all of the variables, a file called XXXX.aliases is created.  I finally opened this file and took a look at it.  Under my computer, the IP was listed as 168.x.x.x.    This is the IP for my wireless network card, not the wired card that is communicating with the compact fieldpoint network!  So, I guest the compact fieldpoint was trying to write to my wireless network card instead of the wired network card set with a static IP.  Once I disabled the wireless network card and re-deployed the application, the "aliases" file corrected itself and everything started working again.
 
So, is there someway I can prevent this in the future on machines with multiple ethernet boards?

Message Edited by rgentry on 04-29-2007 08:24 PM

0 Kudos
Message 5 of 7
(4,390 Views)

Excellent work, rgentry.

Yes, often times, when one has a wireless card in addition to a LAN ethernet port, any shared variable communication can show symptoms of incorrect behavior. This is because the logos thread is tied to a primary MAC address and it seems as though the application was automatically assigning the address of your wireless card. When you disabled the wireless card, the LAN port became the primary port and the alias file was automatically assigned to it.

While it certainly is possible to have both ethernet ports configured in your application, there are certain precautions one must take to ensure proper functionality. You can visit this KnowledgeBase article for a discussion regarding these precautions.

Also, I am wondering if perhaps rather than disabling the wireless card, you might try simply modifying the .aliases file to use the static IP of your ethernet card. Had you tried simply changing the IP address in the alias file to match that of your wired port?

Cheers,

Emilie Kopp | Applications Engineer | National Instruments

0 Kudos
Message 6 of 7
(4,374 Views)
Emilie -- I will try changing the aliases file manually.  I need to have two wired network cards running on at least one of my computers, and probably a wireless as well becase the machine with two network cards will act ast the "bridge" to the internet (with all of the cFPs and the other computers running a local static IP).  Thanks for your help.
0 Kudos
Message 7 of 7
(4,368 Views)