Graphic interface for numerical commands on the USB port of PC compatible computers

. Computers are increasingly used in the present technological processes. Several numerical input/ output electronic modules were designed and made to support computer automated technological process in the wood industry. This paper presents the software for these modules, built in the Delphi language and aimed to obtain numerical commands by using the USB port of a computer. As modern computers are no longer provided with parallel ports, a K8055 USB Experiment Interface Board manufactured by VELLEMAN was used. The board includes a PIC16C745-IP microcontroller, which enables communication via specific software.


Introduction
The present technological processes in the wood industry are increasingly computer automated. An example in this respect is the use of numerical input/output electronic modules. These modules can be used both in production and research to verify the correct functioning of the electric, pneumatic and hydraulic actuators as well as to test controls and connectors (buttons, limiters, proximity sensors, pressostats etc.).
According to their version, the electronic modules can command 8 electromagnetic relays or 8 thyristors with the aid of a computer, by means of an electronic interface connected to the USB port. The K8055 interface is manufactured by Velleman and includes the PIC16C745-IP microcontroller, which is programmed to ensure communication with a PC compatible computer in the following way: A USB cable connects the command electronic interface to the computer. The command electronic module is outside the scope of this paper. Focus is directed to an original graphic interface built in Delphi [1], whose purpose is to work with the above mentioned electronic modules and interface. Specifically, the graphic interface aims to take over numerical signals from the process and/ or obtain (8-bit) numerical commands with the aid of a PC compatible computer [2,3].

The graphic interface for numerical Input / Output
The graphic interface (Fig. 1) includes a main window with 11 buttons and a BMP figure.
The first 10 buttons are used to open secondary windows, while the last one closes the interface. The scope of the secondary windows is to carry out different numerical commands or to take over exterior numerical signals. The included figure presents a few command and connection elements that can be used by the electronic interface (on and off buttons, limiters, photoelectric or inductive detectors, pressostats, contactors etc.). All the secondary windows are essentially specialized command panels featuring virtual on and off buttons. On panels there are virtual rectangular electroluminescent diodes, whose light is turned on or off depending on the given commands.
To use the secondary graphic interfaces, which are appealable from the main window, initially check if the electronic command interface is connected to a USB port, then click the CONNECT virtual button. If the connection is realized, the numerical commands can later be carried out. Figure 2 presents the secondary window for commands carried out by entering into the port values ranging between 0 and 255. The output data on the microcontroller port is signalled through 8 electroluminescent diodes, which correspond to the B0...B7 bits.
Another possibility of direct command is shown in Figure 3. The window allows commands that can be carried out independently at bit level. Electric, pneumatic, or hydraulic motors can be operated this way. Lit LEDS and the display of the decimal value signal the state of the commanded bits. The on and off commands are carried out by clicking the button corresponding to the bit.  The commands can be carried out only after the validation button has been hit. To cancel the commands on the whole port entails activating the cancel button.
The window presented in Figure 4 allows the command of a stepper motor through the use of an electronic interface built for the automated distribution of impulses. The command panel shown in the window allows the input of such values as the rotation direction, the number of impulses (therefore the motion that has to be performed), and the speed of the stepper motor. The speed and the rotation direction can be modified dynamically. The panel continuously displays the entered number of impulses as well as the active state of the output bits of the commanded port. Figure 5 demonstrates the command window through which one or several execution elements is turned on or off at a certain time of the day.  The automated command according to time is carried out with the aid of a computer without the presence of a time delay relay. The start delay command can be carried out either by clicking a button (Fig. 6), by means of an electric limiter (Fig. 7) or through an inductive, photoelectric etc. proximity sensor.
The time (in seconds) is to be entered into the window's panel, the seconds being counted by the internal clock of the computer. Once the delay is started, the passing of the seconds is continuously displayed until the execution elements are turned on or off. The state of the 8 bits of the output port is presented by means of 8 electroluminescent diodes.  The command according to a certain number of impulses (Fig. 8) is carried out after the computer has read the state of the input bits of the microcontroller. The state of bit sk1, to which an electric limiter is connected, is tested and counted. The panel displays the number of impulses given by the limiter. When the programmed impulses correspond to the ones given by the limiter, the commands that turn on or off some electric, pneumatic or hydraulic motors are carried out.
The automated command according to stroke (Fig. 9) entails using both the input port (to which two limiters sk1 and sk2 are connected) and the output port of the microcontroller so that the driving motor is activated in one direction or another.
The following commands can easily be carried out by means of a computer: -by clicking a start button, the advance stroke is executed with automated return to the initial position, and stop; -advance stroke and repeated withdrawal with a final stop in withdrawn position.  In the case of commands carried out via a computer, the number of up-and-down strokes can be imposed, with the functioning coming to a stop in withdrawn position.
The numerical input/ output interface program can be installed on a PC laptop and used only in conjunction with the electronic interface that includes an optocoupler galvanic isolation module.
The presented graphic interfaces can be utilized in the wood industry to simulate, verify and debug automation equipment. Examples include the command of stepper motors on the mini numerical control machines (Fig. 4), and the command of adhesive heating before adhesive use (Fig. 5). Likewise, the interfaces are effective in the case of 90-degree transfer conveyors to adjust the delay (Fig. 6 and Fig. 7), or in strip counting to form the panel core (Fig. 8).

Conclusion
The demonstrated graphic interface for numerical input/ output is authentic. It was built for applications using the USB port and aims to be employed in the wood industry technological processes. The use of the presented graphic interface entails the existence of DOI: 10.1051/ , 0100 (2017) 79401008 94 matecconf/201 MATEC Web of Conferences CoSME'16 8 the electronic modules that take over exterior numerical signals and command electric, pneumatic and hydraulic actuators.
The electronic modules are connected through an electronic interface fitted with a microcontroller, which ensures the bidirectional communication (input/ output) on the USB port of modern computers.
The commands are usually carried out by clicking virtual buttons on the panel of the graphic interface windows. These buttons can command up to 8 actuators. The commands can also be carried out by 5 classical limit stops or binary proximity sensors.