AID Command Language Reference

Development Kit

AID Command Language terms and syntax

 

First a very simple explanation of the command terms, followed by a very detailed description of the command syntax.

 

To get a list of commands type:

         h

 

Result is:

Read  (AID bus)        -->    [rR] [<address>][*]

Write (AID bus)          -->    [wW] <address> <data>

PWM (duty cycle)      -->    [pP] <address> <dutycycle>

PWM (frequency)      -->    [pP][fF] [<frequency>][!]

A/D                               -->    [aA] <address>

EOL(end of line)        -->    [eE][oO][lL] [<rR>][<nN>]

Help                             -->    [hH]

 

Description:

The first column of the listing above is a list of possible command actions. The second column gives the format of the corresponding command.

 

Commands can be in upper or lower case text.

 

There must be a space between each element of the command line and the command is entered by using the enter key or its equivalent on your computer system.

 

The AID system has 16 addresses of 8 bits each. The addresses are numbered 0 to 15 and are set by the switch blocks on the input and output cards. Each address controls 8 pins allowing for 256 combinations of ON and OFF pins per address. When writing to an address values from 0 to 255 can be used. When reading the values returned are in the range  0 to 255.

 

When using the A/D (analogue to digital) command "a" the address range is from 0 to 7.

 

 

---------
AID Command Language Reference: 

Revised September 2nd 2003

All commands can have a variable amount of whitespace between the command and arguments.

All commands can be terminated with "\n" or "\r" or "\n\r".

Read From 8-bit Bus:

	"r [address]\eol" 
	where [address] is the peripheral board address (0-15)
	Returns the 8-bit data from the peripheral board, 
	followed by "\eolOK\eol"

	Example: "r 15" (to read address 15)

	"r *\eol"
	Returns a space-delimited list of the results from all the peripheral cards, 
	followed by "\eolOK\eol"

	Example: "r *" 	(to read from all addresses)

Write to 8-bit Bus:

	"w [adresss] [data]\eol" 
	where [data] is 0-255
	Returns "\eolOK\eol".

	Example: "w 0 127\eol"

Pulse Width Modulation (PWM):

	"p [port] [duty cycle]\eol"
	where [port] is 0-1, [duty cycle] is 0-100%
	Returns "\eolOK\eol"

	Example: "p 0 50\eol"

	"pf [frequency]\eol"
	where frequency is 0-???, Default frequency is 20Khz.
	Returns "\eolOK\eol"

	Example: "pf 500\eol"

Analog to Digital (AtoD):

	"a [port]\eol" 
	where [port] is the AtoD channel, from 0-7
	Returns the AtoD value read on [port] (0-1023) followed by "\eolOK\eol".

	Example: "a 7\eol"

End Of Line (eol): (Changes the default end of line character "\n\r" to "\r" or "\n")

	"eol [r|n]\eol"
	where r sets eol to "\r", n sets eol to "\n"
	Returns "\eolOK\eol"

	Example "eol r\eol" Change eol to the Macintosh standard "\r".