Troubleshooting and Common Questions

Where is my database on my disk?

The NI-XNET driver works with database aliases, which can cause some confusion when trying to share the actual database file. This also can cause problems if the database file is deleted on the disk, but the alias remains in the editor. There are two ways to find the path of your database on your disk:
  • In the NI-XNET database editor, select File » Manage Aliases.
  • In LabVIEW, right-click the I/O control and select Manage Aliases.

The NIXNET_example database is at C:\Documents and Settings\All Users\Documents\National Instruments\NI-XNET\Examples.

How is the example database alias automatically added?

NI-XNET is hard coded to detect whether you are trying to open a session using the NIXNET_example database and programmatically adds the alias for you if it is not already present.

How is the example database automatically deployed on LabVIEW RT?

The NI-XNET LabVIEW RT installer automatically deploys the NIXNET_example database during the installation. This makes it easier to test the example on your LabVIEW RT system.

The example database is added automatically on Windows and LabVIEW RT. Can I erase all traces of it?

Yes. Complete the following steps to erase all traces of the example database.

On Windows:
  1. Open the Manage NI-XNET Databases dialog (see above), select the NIXNET_example alias on your local machine, and select Remove Alias.
  2. Browse to C:\Documents and Settings\All Users\Documents\National Instruments\NI-XNET\Examples on your local machine and delete the nixnet_example.xml file.
Note The NI-XNET LabVIEW, CVI, and C examples work with this database file and therefore are not guaranteed to work if you delete the database file. The NI-XNET database is installed automatically with NI-XNET.

Can I permanently set the baud rate setting for my device as in NI-CAN?

There is no way to set the baud rate permanently in NI-XNET. The cluster in the FIBEX database file sets the baud rate. If you are using a frame streaming session without a database, you must set the baud rate programmatically.

Can I permanently set the transceiver type for my CAN XS device as in NI-CAN?

There is no way to set the transceiver type permanently in NI-XNET. The NI-XNET CAN XS device always defaults to a High Speed (HS) transceiver type. If you want a different transceiver type, you always must set it programmatically. You can set it programmatically in the following ways.
  • (LabVIEW) Change the value (e.g., LS, HS) of the XNET Session property Intf.CAN.Tcvr.Type.
  • (C) Use the following code:
    Property = nxCANTcvrType_LS;
    //(or Property = nxCANTcvrType_HS or Property = nxCANTcvrType_SW)
    nxGetPropertySize (SessionRef, nxPropSession_IntfCANTcvrType, &PropertySize); 
    nxSetProperty (SessionRef, nxPropSession_IntfCANTcvrType, PropertySize, &Property);

Can I change the database or object properties setting programmatically (for example, change the cycle time of a cyclic frame)?

Yes. You can open an object and change its properties programmatically. This has no effect on the actual database. It only changes the properties of the objects loaded in memory until the session is closed and the objects are released from memory. An example of how to do this is in the example finder at Hardware Input and Output » CAN » NI-XNET » Intro to Sessions » Frame Sessions » CAN Change Frame Properties Dynamically.

Why is there no XNET Clear VI at the end of the examples?

When the VI or application is stopped, NI-XNET takes care of closing all references for you. This makes programming simpler and more robust, as you do not need to ensure all references are closed.