Introduction
ArcazeRC is a command line tool to remotely control the Arcaze USB Interface from the shell, batch files or any PC application. It’s possible to search for attached interfaces, connect to them, set port directions, read and write port values in multiple ways, or select one of the programmed configurations.
ArcazeRC is already contained in the installation of you Arcaze Config Tool. No additional installation is necessary.
Prerequisites
ArcazeRC only works with Arcaze USB Interfaces featuring firmware version 5.20 or higher. This firmare is freely available for download here.
ArcazeRC.exe required the ArcazeHid.dll. During installation of the Arcaze Toolkit this has already been copied into the same directory, therefore no additional steps are required here. If you move ArcazeRC.exe to a different directory manually, keep in mind to copy the DLL as well or set a path to it, so it can be found by ArcazeRC.exe.
ArcazeHid.dll in turn requires Microsoft .Net 2.0 or higher. During the installation .Net 3.5 should have been installed if required, so no manual steps to be done. If you want to copy ArcazeRC .exe to a different computer manually, make sure that .Net >= 2.0 is already installed.
Usage
ArcazeRC.exe is normally executed from the command line (shell), from batch files or from inside user applications. It receives its commands as arguments when executed.
Actually these arguments can be seen as “script commands” which are executed in order from first to last (left to right).
Commands
All commands have a “-” (minus) prefix. Therefore the “find” parameter actually is named “-find”.
find
Description
Shows all Arcaze USB Interfaces currently attached to the host. Informations shown are
- serial number (you will need this later)
- firmware version
- device name (which is the configuration name assigned in the Arcaze Config Tool)
Syntax
ArcazeRC.exe -find
Parameters
none
Example
> ArcazeRC.exe -find Serialnumber Firmware Name --------------------------------------------------------- 1 0000117 V5.11 Joysticks 2 0000763 V5.20 Display Panel ---------------------------------------------------------
echooff
Description
Similar function as in Windows/DOS batch files: All screen outputs are suppressed.
Syntax
-echooff
Parameters
none
Example
Doesn’t make much sense here, but all outputs are suppressed:
> ArcazeRC.exe -connect 0000117 -echooff -adcread
invertinputs
Description
Inverts input values bitwise.
For inputs normally the actual measured input values are directly used as logic values. A “high” voltage on a port (i.e. 3.3V) is a logic “1”, a “low” voltage on a port is a logic “0”.
In some cases it makes sense to invert this logic, because typically inputs use a pull-up resistor for recessive value. Therefore a connected pushbutton creates a logic “1” if released and a logic “0” if pressed. If you want to have it the opposite way, use -invertedinputs.
invertedinputs works on all following input commands. Preceding input commands are not affected.
Syntax
-invertinputs
Parameters
none
Example
The example reads the same port twice, once with standard inputs, once with inverted inputs.
> ArcazeRC.exe -connect 1234567 -portread A bin -invertinputs -portread A bin 11111111111111111111 00000000000000000000
connect
Description
Connects to an Arcaze USB Interface with the given serial number.
Nearly all other commands need to be preceded by a connect, because they can only work on a connected device.
Syntax
-connect <serial number>
Parameters
Parameter | Allowed Values | Description |
---|---|---|
serial number | any | Must be identical with one of the connected devices’ serial numbers. Leading zeroes may not be omitted. Arcaze uses 7 digit decimal serial numbers. |
Example
> ArcazeRC.exe -connect 1234567 -portread A bin 11111111111111111111
setconfig
Description
Activate one of the configurations of the Arcaze USB Interface.
Configurations are complete sets of all settings of an Arcaze Interface, including all devices, names, macros, etc. Only one configuration can be active at a time, but multiple configurations can be programmed into an Arcaze simultaneously.
Say, you want to control multiple different applications with the same Arcaze module and the same control panel. Each of the applications requires different setups of the connected buttons, or even needs completely different simulated devices. Then you can simply program 2 or more different configurations into the Aracze with the Arcaze Config Tool and switch between them with this command.
When executed, the command directly activates the desired configuration and re-enumerates the module. You hear the typical USB disconnect-connect “bing-bings”, then the new configuration is active. If you already know the “ShortCuts” from the Arcaze Config Tool, this can be seen as the same functionality in software.
The configurations are numbered upwards starting with 0. If you have 3 configurations in total, then they are 0, 1 and 2.
In the Arcaze config tool the configurations are numbered left to right. The leftmost configuration is 0, counting upwards to the right.
The default configuration is 0. When powering up or connecting physically, the module always starts with configuration 0.
Syntax
-setconfig <config number>
Parameters
Parameter | Allowed Values | Description |
---|---|---|
config number | 0 … (number of configs-1) | The configurations are numbered upwards starting with 0. If you have 3 configurations in total, then they are 0, 1 and 2. |
Example
This selects the second configuration if available:
> ArcazeRC.exe -connect 1234567 -setconfig 1
adcread
Description
Reads the internal analog inputs.
The 6 measured voltages are output as decimal values in the range 0 to 1023. (10 bits)
Printed output is formatted <AIN 0> <AIN 1> <AIN 2> <AIN 3> <AIN 4> <AIN 5>.
Syntax
-adcread
Parameters
none
Example
> ArcazeRC.exe -connect 1234567 -adcread 185 224 179 243 178 219
pindir
Description
Set the port direction of a single pin.
Syntax
-pindir <port> <pin> <direction>
Parameters
Parameter | Allowed Values | Description |
---|---|---|
port | refer to list of available ports and pins | port which contains the desired pin |
pin | refer to list of available ports and pins | the pin on which the direction is to be be set |
direction | in out | “in” defines the pin to be an input “out” defines the pin to be an output |
Example
> ArcazeRC.exe -connect 1234567 -pindir A 15 out
pinon
Description
Sets the output value of a single pin to logic “high”.
Note that the pin direction of the pin has to be “out” for this command to take effect.
Syntax
-pinon <port> <pin>
Parameters
Parameter | Allowed Values | Description |
---|---|---|
port | refer to list of available ports and pins | port which contains the desired pin |
pin | refer to list of available ports and pins | the pin of which the value is to be be set |
Example
> ArcazeRC.exe -connect 1234567 -pinon A 10
pinoff
Description
Sets the output value of a single pin to logic “low”.
Note that the pin direction of the pin has to be “out” for this command to take effect.
Syntax
-pinoff <port> <pin>
Parameters
Parameter | Allowed Values | Description |
---|---|---|
port | refer to list of available ports and pins | port which contains the desired pin |
pin | refer to list of available ports and pins | the pin of which the value is to be be set |
Example
> ArcazeRC.exe -connect 1234567 -pinoff A 10
pinread
Description
Reads the current state of a single pin.
Normally only inputs are read. Then the returned value simply reflects the actual currently measured state of the desired pin.
This is also the case if an output is read, which is perfectly valid. But note that the input value may differ from a previously set output value! Not the output value itself is returned, but the current state of the pin. Normally these are identical. However, for example, if a “high” is driven and the driven pin is short-cut to ground, a 0 will be returned, even the output value is a 1.
Syntax
-pinread <port> <pin>
Parameters
Parameter | Allowed Values | Description |
---|---|---|
port | refer to list of available ports and pins | port which contains the desired pin |
pin | refer to list of available ports and pins | the pin to be read |
Example
> ArcazeRC.exe -connect 1234567 -pindir A 15 in -pinread A 15 1 > ArcazeRC.exe -connect 1234567 -pinread B 11 -pinread B 12 -pinread B 13 1 0 1 >
portdir
Description
Set the port directions of a complete port. All pins of the port are affected.
Syntax
-portdir <port> <direction value>
Parameters
Parameter | Allowed Values | Description |
---|---|---|
port | refer to list of available ports and pins | port which contains the desired pin |
direction value | any | Each pin of the port is represented by a bit in this value: 0 = input 1 = output The value can be specified in: binary (prefix 0b) hexadecimal (prefix 0x) decimal (prefix 0d or no prefix) |
Examples
Set port A pins 1…12 to input and pins 13…20 to output:
> ArcazeRC.exe -connect 1234567 -portdir A 0b11111111000000000000
Set port A pins 0…12 to input and pins 13…20 to output (same functionality as above, just different notation):
> ArcazeRC.exe -connect 1234567 -portdir A 0xff000
portset
Description
Set the output values of all pins of a complete port. All pins of the port are affected.
Syntax
-portset <port> <output value>
Parameters
Parameter | Allowed Values | Description |
---|---|---|
port | refer to list of available ports and pins | port to be set |
output value | any | Each pin of the port is represented by a bit in this value: 0 = logic “low” = physical “low” 1 = logic “high” = physical “high” The value can be specified in: binary (prefix 0b) hexadecimal (prefix 0x) decimal (prefix 0d or no prefix) |
Examples
Set port A pins 1…4 to output and pins 5…20 to input, set pins 0 and 1 to high, other outputs to low:
> ArcazeRC.exe -connect 1234567 -portdir A 0x0000f -portset A 0b00000000000000000011
Set port A pins 1…4 to output and pins 5…20 to input, set all output values to high. But note this will only take effect for pins 1…4. The inputs are not affected.
> ArcazeRC.exe -connect 1234567 -portdir A 0x0000f -portset A 0xfffff
If outputs have been previously set, this setting keeps being set, it’s not required to set it again:
> ArcazeRC.exe -connect 1234567 -portdir A 0x0000f > ArcazeRC.exe -connect 1234567 -portset A 0b00000000000000000011 > ArcazeRC.exe -connect 1234567 -portset A 0b00000000000000001100
porton
Description
Set individual pins of port to high.
In contrast to portset, not all pins of the port are affected, but only those which have its corresponding bit in the output “OR mask” value set to 1.
Pins with “1” bits are set to high, Pins with “0” bits are not affected.
Syntax
-porton <port> <output "OR mask" value>
Parameters
Parameter | Allowed Values | Description |
---|---|---|
port | refer to list of available ports and pins | port to be set |
output “OR mask” value | any | Each pin of the port is represented by a bit in this value: 0 = not affected 1 = set to logic “high” = physical “high” The value can be specified in: binary (prefix 0b) hexadecimal (prefix 0x) decimal (prefix 0d or no prefix) |
Examples
Set port A pins 1…8 to output and pins 9…20 to input, then set pins 1 and 2 to high, other pins are not affected. Then additionally set pins 3…5 to high. After the third step, pins 1…5 are high, the others are low or input.
> ArcazeRC.exe -connect 1234567 -portdir A 0x0000f > ArcazeRC.exe -connect 1234567 -portset A 0b00000000000000000011 > ArcazeRC.exe -connect 1234567 -portset A 0b00000000000000011100
portoff
Description
Set individual pins of port to off.
In contrast to portset, not all pins of the port are affected, but only those which have its corresponding bit in the output “OR mask” value set to 1.
Pins with “1” bits are set to low, Pins with “0” bits are not affected.
Syntax
-portoff <port> <output "OR mask" value>
Parameters
Parameter | Allowed Values | Description |
---|---|---|
port | refer to list of available ports and pins | port to be set |
output “OR mask” value | any | Each pin of the port is represented by a bit in this value: 0 = not affected 1 = set to logic “low” = physical “low” The value can be specified in: binary (prefix 0b) hexadecimal (prefix 0x) decimal (prefix 0d or no prefix) |
Examples
> ArcazeRC.exe -connect 1234567 -portdir A 0x0000f > ArcazeRC.exe -connect 1234567 -portset A 0b00000000000011111111 > ArcazeRC.exe -connect 1234567 -portoff A 0b00000000000000000011 > ArcazeRC.exe -connect 1234567 -portoff A 0b00000000000000011100
What happens?
- Set port A pins 1…8 to output and pins 9…20 to input
- set all output pins to high
- set pins 1 and 2 to low, others are not affected
- set pins 3…4 to low, others are not affected
portread
Description
Read intput values of all pins of a complete port.
Note that the returned result of this command can be inverted by a preceding invertinputs command.
Leading zeroes are only displayed in binary numbering system.
Syntax
-portread <port> <number system>
Parameters
Parameter | Allowed Values | Description |
---|---|---|
port | refer to list of available ports and pins | port to be set |
number system | “hex” “dec” “bin” | Desired number system of the result: “hex” = hexadecimal “dec” = decimal “bin” = binary |
Examples
Set port A pins 1…4 to output and pins 5…20 to input, set pins 0 and 1 to high, other outputs to low:
> ArcazeRC.exe -connect 1234567 -portdir A 0x000ff -portset A 0 > ArcazeRC.exe -connect 1234567 -portread A bin 11111111111100000000 > ArcazeRC.exe -connect 1234567 -portdir A 0x000ff -porton A 0b0011 > ArcazeRC.exe -connect 1234567 -portread A bin 11111111111100000011 > ArcazeRC.exe -connect 1234567 -portdir A 0x000ff -porton A 0b110000 > ArcazeRC.exe -connect 1234567 -portread A bin 11111111111100110011
What happened?
- Set port A pins 1…8 to output, the rest to input. Set all outputs to low. Note that this 0 is interpreted as a decimal 0 here, so all bits=0.
- Read. Result: Outputs are all low, unsused inputs are high
- Set pins 1 and 2 to high. Note that trailing zeroes can be ommitted.
- Read. Result: The two output pins are now high
- Set pins 5 and 6 to high. Trailing zeroes have been ommitted again.
- Read. Result: The two output pins are now high.
help
Description
Displays a brief help screen with all available commands.
Syntax
-help
Parameters
none
Example
> ArcazeRC.exe -help ****************************************** * ArcazeRC - Arcaze Remote Control V5.21 * ****************************************** Usage: ArcazeRC.exe [command 1] [command 2] [...] Commands: -help -find -echooff -invertinputs -connect <serial number> -setconfig <config number> -adcread -pindir <port> <pin> {in|out} -pinon <port> <pin> -pinoff <port> <pin> -pinread <port> <pin> -portdir <port> <value> -portset <port> <value> -porton <port> <value> -portoff <port> <value> -portread <port> {hex|dec|bin} Values for <serial number>: as displayed from '-find' <port>: A or B <pin>: 1..20 <config number>: 0.. <value>: - prefix 0x - hexadecimal - prefix 0d - decimal - prefix 0b - binary - no prefix - decimal Examples: ArcazeRC.exe -find ArcazeRC.exe -connect 0000123 -setconfig 1 ArcazeRC.exe -connect 0000123 -pindir B 2 out >
Supported Ports and Pins
Currently the following ports and pins of the Arcaze USB Interface can be addressed with ArcazeRC:
Port Name | Available Pin Numbers | Description |
---|---|---|
“A” | 1 … 20 | Left 40 pin I/O header on Arcaze-USB Interface named “A” |
“B” | 1 … 20 | Right 40 pin I/O header on Arcaze-USB Interface named “B” |