By default the Application Server listens on TCP/IP port 51234.


In order to communicate with the server, we need to send TCP/IP text commands from an external utility to perClass Mira. The utility may run on the same computer as perClass Mira, but it is possible to run it on a separate computer as well. Typical demonstrators will run perClass Mira on a separate computer dedicated to a "second screen" and control it from already available control computer or PLC system orchestrating the entire process (belt control, actuators, lights, etc.).


In the following example, we use the free PacketSender software, which you may download from https://packetsender.com


To prepare perClass Mira for running the Application Server session, we need to initialize the acquisition. Once we are able to start and stop acquisition from the perClass Mira side, then we may do the same remotely. The Application Server provides a number of text commands that invoke actions.


TIP: The perClass Mira installation contains a ready-to-use data base of commands in PacketSender format in the share directory. You may import these to a PacketSender session.


In PacketSender, we define two commands, namely "acq start" and "acq stop". For each command, its name and payload (content) are defined in section . Section defines the Application Server machine address and port. In our situation, we fill "localhost" as both perClass Mira and PacketSender are running on the same machine. We can send the command by pressing the Send button. The command can be saved for later use with Save button.



In the perClass Mira window, we can see the text command listed in the Output window and the acquisition will start:



Below you can see that the PacketSender window lists both the command sent and the response of the Application Server. The response always starts with "ok;" or "error;" denoting whether the command was successful, followed by the actual command string, then a semicolon delimiter, and finally an additional comment.