How to Use piTest

piTest is a software tool that allows you to access the process image of your system. The code of this tool can be found on your RevPi Core in the folder “/home/pi/demo” and in the download area of our website.

You can use piTest on the command line. Use the command “piTest” to open it.

Commands

In the following table you will find a list of all commands you can use with piTest

Command Use
-1 single output, non-continuous.
-d Displays a list of the devices used. This can be useful, for example, if a device has not been configured in PiCtory.
-f Update firmware
-g <o>,<b>
Read bit “b” from offset “0”.
-l Warten auf Reset des Treibers.
-q Nur der Wert, ohne Text wird ausgegeben.
-r <var_Name>

[<f>]

Lesen der Variable und Ausgabe des Wertes.

f* optionaler Parameter für das Ausgabeformat (h = hexadezimal, d = dezimal (standard), b = binär).

-r <o>,<l>

[<f>]*

Lesen von l Bytes ab Offset o.

f* optionaler Parameter für das Ausgabeformat (h = hexadezimal, d = dezimal (standard), b = binär).

-R <addr>,<bs> Zurücksetzen der Zähler oder Encoder eines DIO oder DI Moduls.

<addr> die adresse des Moduls wie in der Ausgabe mit –d

<bs> ist ein Bitfeld, um die betroffenen Eingänge auszuwählen. Wenn der Zähler am Input Pin N resettet werden soll muss das Bit Nr. N auf 1 gesetzt werden.

Zum Beispiel: -R 32,0×0014

Reset der Zähler für die Eingänge I_3 und I_5 des Moduls auf Adresse 32.

-s <o>,<b>,<0|1> Setzen von Bit b (0-7) ab Byte Offset b mit dem Wert 0 oder 1.
-v <var_Name> Gibt Informationen zu einer Variable aus, z.B: Offset und Länge
-w <var_Name>,<v> Schreibe den Wert in die Variable
-w <o>,<l>,<v> Schreibe l Bytes ab Offset o im hexadezimalformat mit dem Wert v.

Länge kann 1,2 oder 4 sein.

-x Treiber Reset, entspricht Neustart des piControl Prozesses.