Host Communication API
The Host Communication API encompasses the needed software for the motion
control board to communicate with the host computer.
Example Use

-
addCmdSeqHandler ()
removeCmdSeqHandler ()
initComm ()
communications()
xmitInt ()
xmitFloat
xmitFloat ()
xmitBlock ()

addCmdSeqHandler
int addCmdSeqHandler (unsigned int baseCmdValue, unsigned int range,
void (*handlerFunc) (unsigned int, unsigned int, int *));
-
Adds a new Command to the set of commands available for communication with the
motion control board.
Parameters
-
baseCmdValue: starting address of comand sequence
-
range: total range for address of command sequence
-
(*handlerFunc) (unsigned int, unsigned int, int *): pointer to function
which handles this particular comand sequence.
-
Returns
- 0 for success, -1 for failure.
removeSeqHandler
int removeCmdSeqHandler (unsigned int type, unsigned int baseCmdValue);
-
Removes a command from the set of commands available for communication
with the board.
Parameters
-
type: type of comand ?? for Data comand, ?? for ??
-
baseCmdValue: starting address for command sequence to be
removed.
-
Returns
- 0 for success, -1 for failure.
initComm
void initComm ();
- Initializes the communication
between host PC and motion control board.
communications
void communications();
-
Establishes communications in the background between the motion control
board and with the host computer.
xmitInt 12>
xmitInt
void xmitInt (int value);
-
Transmits an integer value from the host to the board.
Parameters
-
value: integer to be transmitted from host computer to board.
xmitFloat
void xmitFloat (float value);
-
Transmits an integer value from the host to the board.
Parameters
-
value: floating point number to be transmitted from host computer
to board.
xmitBlock
void xmitBlock (int *baseAddr, int range, unsigned int isFloat);
-
Transmits a block of words from host computer to board.
Parameters
- *baseAddr: pointer to starting address for block transfer.
- range: Total range of address for block transfer.
- isFloat: 1 if word is a floating point number, 0 if integer.
Last modified: Wed July 15 00:02:37 Eastern Standard
Time 1999