# Building Wireless Control Applications with XBee and LabVIEW
## 1 Introduction  
Industry 4.0 is seen as \"the integration of complex physical machinery and devices with networked sensors and software, used to predict, control, and plan for better business and societal outcomes\" [1]. The network capabilities are identified as some of the defining characteristics of Cyber Physical Production Systems (CPPS), which are at the core of Industry 4.0 [2]. In this scenario, new network technologies are required to connect more devices, such as sensors, actuators, and autonomous systems in industrial applications. Some technologies such as industrial wireless networks (IWNs) or Industrial Internet of Things (IIoT) are expected to act as key enablers at smart factories and intelligent manufacturing systems [3, 4]. In particular, IWNs have great potential for monitoring and control tasks in factory automation, since they might introduce benefits such as--(1) flexibility to easily modify the layout of the links; (2) connection between monitoring or decision nodes and mobile devices or parts; and (3) reducing, or even eliminating cabling, which might be expensive and cumbersome. Thus,the introduction of wireless networks in the industry is expected to improve the productivity and efficiency of the processes [5]. Unfortunately, the nature of wireless communications introduces known issues, such as fading, multipath propagation, shadowing, and interferences, which increase the bit error rate and make them unpredictable [6]. For this reason, introduction of these technologies in factories face several challenges, such as--(1) reducing the interferences (caused either by other networks, the industrial processes or the environment); (2) avoiding congestions to achieve the demanded Quality of Service (QoS) of applications; and (3) adequately manage the frequency spectrum, which is especially complex in large factories [5]. In addition, wireless nodes are frequently fed with batteries, which provide energy for a limited period of time. During the last years, there have been considerable advances in wireless technologies but these technologies are still far from being mature, especially in critical applications. In [7] some indicators of their scarce maturity were identified such as weak security, lack of a dedicated spectrum, lack of a dedicated physical layer, overromised performance, and poor scalability. Despite these challenges, wireless technologies are considered to be at a critical point for deployment in industrial applications since the benefits that they introduce might overcome the disadvantages. For this reason, more research is needed in order to find out whether the benefits of using wireless technologies--in certain layouts--overcome the drawbacks, to understand in which applications they might be introduced, as well as the best practices, especially in critical applications like those that involve control operations over wireless networks [3; 5]. Wireless technologies are already accepted in non-critical industrial applications, i.e., those in which a communication failure does not cause severe concerns (for humans) or large economic losses [7]. The appropriateness of IWNs in different types of applications have been discussed in [5], essentially, they are regarded as safe for factory and building monitoring, condition alarming, and supervisory control. For other operations, such as feedback control and safety operations, they are still often discarded, since they are not considered to provide sufficient reliability, integrity, and security, when compared to wired technologies. Some authors assume that wireless technologies might not be adequate for some operations and propose the use of hybrid approaches, i.e., combining both wired and wireless technologies in order to improve the overall flexibility, efficiency, and performance of the control systems [8], or using IWNs at control applications with wired backups. IWNs are now starting to be considered for critical operations.