FAQs: Quarch Instrument Server
Install QIS for automation
The recommended way is to install the Quarch Python package QuarchPy using the command “pip install quarchpy” in a terminal window. This will install the complete python package into your python directory on your machine. Please make sure you install python in a location you have permissions. QuarchPy comes with QIS and QPS already packaged within. QIS can be found at the following location:
**PythonLocation**\Lib\site-packages\quarchpy\connection_specific\QPS\qis
It can then be launched from the command line using QuarchPy’s run function “python -m quarchpy.run qis”
For automation, head to our application notes page for some simple Python examples
Manual QIS download
Go to the Quarch website and either search for QIS or DOWNLOAD QIS HERE
Sign in and click the download button to start the download, or give your email address and company name to start a quick download.
Unzip the folder in the desired location and run qis.jar by double clicking it or navigating to the directory and using the command “java -jar qis.jar”
TIP: You can pass the argument “-terminal” to launch QIS with the terminal window open. “java -jar qps.jar -terminal”
You would normally automate QIS with out Python examples, but you can do so from any TCP capable terminal or language:
The default ports to talk to QIS are TCP Port: 9722 and HTTP/Rest Port: 9780. If you have launched QIS on an OS that does not have the system tray you can send the shutdown command via the preferred port. If you have used a custom port number you will need to take note of this and send the command over the correct port number.
Note that for streaming power data, you MUST use the TCP option. HTTP/Rest is only available for basic commands.
You can set up a network connection to QIS using the port number and IP address. QIS can be run locally but it can be used over a network so doesn’t even have to be running on the same machine.
How to close QIS
QIS can be closed simply by sending it the command “$shutdown” or by right clicking on the icon in the system tray and selecting Exit.
If you are having issues with either of these ways then QIS can be force closed in other ways which are listed below:
1. Closing on task manager
If you are using windows QIS can be identified using the “command line” column in the task manager. It will show “javaw -jar qis.jar”, or similar.
2. Closing using QuarchPy to close QIS
If you launch QIS in headless mode it will not appear in the system tray. Use the “-shutdown” argument in quarchpy to locate QIS on the default port and shut it down if found. “python -m quarchpy.run qis -shutdown”
QIS in the task manager needs to be renamed so that it is clear that the process is QIS and not another java application. Then a FAQ can be written to show the user how to end the QIS process through the task manager.