Code Description

To compliment hardware design this project offers design of C and VB software, you can use “C” and Visual Basic” executable files. 

“C” is a medium-level programming language and could be run on almost any computer. It is ideal for configuring programmable input-output devices.  When you connect and set-up system described in Introduction, you could run C-executable file. You can see details in the Code Description.

VB is a powerful language for programming a GUI (graphical user interface). VB affords rapid front-end development but has some limitations (I/O is not possible). VC++ can serve as back-end code, which can be stitched to VB using DLLs. DLL must be installed in C:\windows\system\directory (WIN 95/98) in the Client and Server computer. In VC++ one can create a DLL that access I/O ports. In VB the DLL is stitched during run-time and can then read and write to ports. Visual Basic executable file  you can use to run DC Motor if yours system is connected as explained in Introduction. You can see details in the Visual Basic code description .

In the VB Client/Server program is used activeX technologies. ActiveX is an outgrowth of two Microsoft technologies called OLE (Object Linking and Embedding) and COM (Component Object Model). ActiveX can be very confusing because it applies to a whole set of COM based technologies. Most people think only of ActiveX controls, which represent a specific way of implementing ActiveX technologies. ActiveX technologies afford software recycling.

VB Client/Server executable file (see VB Client code and VB Server code) you can use for application and control over Internet. One need download VB Client or/and VB Server executable files and start RegAX (axPanel is used to display (author Yuris Puteinis) numbers with LCD panel style. It is ActiveX control, which may be used in any development environment for example Visual C++ or Visual Basic.  Winsock is short for Windows Socket. Winsock is an Application Programming Interface (API) for developing Windows programs that can communicate with other machines via the TCP/IP protocol. TCP/IP is the most popular network protocol today, virtually all computers support it. Winsock affords Internet programming.

VB Server executable file need to be run on the Server (see Fig. 3, Fig. 2 and Fig. 1 ).

VB Client executable file need to be run on the Client’s computer(s) (see Fig. 3 ). 

Client will be prompt to enter the remote host (the Server) IP Address in order to establish connection between Server and Client.  One will see message on the Server if connection is successful.

The message will be like following:  “Client from IP Address: xxx.x.x.x  is successful.  Port #: xxxx “                

One will see the message on the Client computer if connection is successful.

The message will be like following:  Connected to IP address: xxx.x.x.x.   Port #: xxxx”. 


The Client can make a selection and choose the Output Voltage from 0 (zero) V to + 5 V. The Client will have following information (see Fig. 4 ):

-       Desired Output Voltage (V)

-       Status Textbox with Decimal Value of the output voltage

-       DC Motor Speed (RPM) 


On the Server you can read the chosen output voltage (see Fig. 5 ). The Server can not change output voltage and can not control DC Motor Speed.