Wireless Mobile applications consist of a client and a service. The client is the Mobile application that monitors or controls remote services over the network and communicates directly with a service on a server or another device. Services are VIs or other applications that perform tasks that the client accesses. For example, a service might be a VI that monitors temperature or tank level. The client might be an application on a Mobile target that uses the TCP Open Connection function to connect to a remote service on the network and then uses the TCP Read function to read the temperature or tank level data that the remote service broadcasts over TCP. You build service VIs just like any other VI.
You can use the TCP or UDP functions to communicate between the client and the service, or you can call the service by reference using the Call By Reference Node.
You also can call a service by reference using the Call By Reference Node.
The Mobile Module supports the Call By Reference Node for remote references. The VI Server must run on the server to support the Call By Reference Node, and the services available on a server must be in memory so you can reference them.
To use a Call By Reference Node, create an application reference and a VI reference and then use the Call By Reference Node to call a VI by reference. Specify the communication method in the machine name input of the Open Application Reference node as Serial:: for serial communication, and TCP::<IP address> (for example TCP::12.3.45.678) for TCP/IP communication. For example, if you have a serial cable connected to a PXI device, you can connect using the VI Server to LabVIEW running on the PXI device. Normally, the VI Server only communicates using TCP/IP, so you need a VI running on the remote device that translates serial into TCP/IP communications. Use the ser-tcp VI, located in the labview\vi.lib\PDA directory, to translate from serial communications to TCP/IP communications.
The Mobile Module also supports using IrDA to communicate. If you use IrDA, specify the communication method in the machine name input of the Open Application Reference function as IR:: for infrared (IrDA) communication. Because the VI Server only communicates using TCP/IP, you need a VI running on the remote device that translates IrDA into TCP/IP communications. Use the Ir-TCP VI, located in labview\vi.lib\PDA\IrTCP.llb, to translate IrDA communications to TCP/IP communications.
To establish communication between a Mobile application and another LabVIEW application instance, you must know both the machine name and the port number on which the VI Server in the other LabVIEW application is listening. If you have more than one LabVIEW application instance on the same machine, one or more of those applications may be listening on a port other than the default VI Server listener port. In this case, make sure to supply the port number.
![]() | Note The VI Server settings in the Options dialog box apply to the default application instance and VIs not in a project. To set VI Server settings for a project application instance, right-click the target in the Project Explorer window. |
You can use the Bluetooth VIs and functions to develop Bluetooth Mobile applications that communicate with devices that use Bluetooth wireless technology.
Refer to the NI Example Finder, available by selecting Help»Find Examples, for examples of wireless Mobile applications. In the NI Example Finder, browse according to task and open Toolkits and Modules»WindowsMobile»Networking to open the examples.