Run Test-Program
Tobias Müller, M. Eng edited this page 5 years ago

📜 Table of Contents


Run Test-Program

To run the test-programs make sure, that the Xcom_API.py is inside the python search-path. More Informations about that can you find in section: Create and Delete an Object. The test-programs needs the following python-modules:

  • ptvsd
  • serial (pyserial)
  • pigpio

You can check, whether these modules are available with the bash-command:

pip3 list

If one of these modules are missing, you can install it with the bash-command:

pip3 install <module-name>

You can start the test-program with the bash-command:

python3 <program-name>.py

The "<program-name>" should be either "Xcom_Test_Loop_Program" or "Xcom_Test_Program". After starting one of these test-programs, it will start the program-setup and will ask you for some initialize parameters. These are:

  • COM-Port (Normally: /dev/ttyAMA0)
  • Baudrate (depends on your Xcom-232i setup)
  • Destination-Address (Xtender-Module)
  • Soure-Address (Normally your-Raspberry Pi: 1)
  • CRC-Check (True/1 or False/0)

You can skip the program-setup by starting the test-program with the mentioned parameters. The sequence of the parameters must not be changed. For example:

python3 <program-name>.py /dev/ttyAMA0 115200 101 1 True

If everything is ok, you are now inside the main menu of the test-program and you can follow the instructions, which are displayed.


Hochschule Anhalt | Anhalt University of Applied Sciences | Department 6 EMW
Xcom-API

Tobias Müller, M. Eng.
📧 Tobias.Mueller@HS-Anhalt.de

© es-lab.de, 31.10.2017