Cmd: Navigation Settings
updated on 06-11-2009

dsNav communication

Detailed commands description
Service group commands

Commands (Cmd field) are one single character long and case sensitive.           

In following list:

- r        this is a command that request parameters reading from dsNav to the master

- w       this is a command that writes parameters to dsNav from the master

- TX    these are the parameters sent from supervisor and received by dsNav

- RX    these are the data sent back by dsNav after a correct decoding of the command and received by external board or PC.

The TxData and RxData procedures will be used as example. The code examples are written in Processing language on the PC side.

#

- w

Start scheduler sequence

Read detailed explanations in manual

            - TX:

                        CmdLen = 1    Params 0

Example:

TxData(0, '#', 0, 1);

            - RX:

                        N/A

 

*

- w

Board software reset

For security reason, this command has to be sent three times consecutively in order to perform reset

            - TX:

                        CmdLen = 1    Params 0

Example:

TxData(0, '*', 0, 1);

            - RX:

                        N/A

 

R

- r

Software firmware version request

            - TX:

                        CmdLen = 1 Params 0

Example:

TxData(0, 'R', 0, 1);

            - RX:  

                        CmdLen = 24  Params 25 (string "Ver")

                        Example:

                        if (RxData('R',26))

            {

for (i=HeadLen; i < 26+HeadLen; i++)

{

            Ver[i-HeadLen]= (char)(RxBuff[i]);

}

            }

e

- r

Read the code of the last error occurred and reset error condition

            - TX:

                        CmdLen = 1    Params 0

                        Example:

TxData(0, 'e', 0, 1);

            - RX:

                        CmdLen = 3    Params 2         (1 int = 2 byte. Most Significant First)

                        Example:

                        if (RxData('e',2))

{

ErrorCode = ((RxBuff[HeadLen] << 8) + (RxBuff[HeadLen+1]));

}

 

f

- w

set "Console Debug" mode

JUST FOR DEBUG

The dsNav firmware acts as a loopback, sending back to the console some values proportional to other received values, in order to check communication and right decoding and encoding of received and transmitted packets.

- TX:

                        CmdLen = 1    Params 0

Example:

TxData(0, 'f', 0, 1);

            - RX:

                        N/A

 

s

- w

Scheduler parameters setting

Read detailed explanations on the manual for the meaning of every single value

- TX:

                        CmdLen = 1    Params 0

Example:

for (i=0; i<64; i++)

            {

               TxIntValue[i] = Seq[i];

            }

            TxData(0, 's', 64, 1);

            - RX:

                        N/A

 

z

- r

the dsNav sends back a text string, for a bidirectional debug of the communication chain

- TX:

it just needs HEADER + character 'z'. Just type  @z on a simple terminal program

(e.g. Hyperterminal)

            - RX:

                        CmdLen = 25, the test string that will be displayed on terminal console