PDS commads

User Commad Interface for accessing PDS modules

» Posted on 20. May 2013

Related links:   PDS-Modules | Quick Start | Programmer | Interfacing


PDS-Module Commands

The software of PDS module contains beside the AMOS operating system several applications and services to fulfill sensing and processing demands. From user’s point of view following major aspects are categorized into commands to configure individually a PDS module:

  • sdds : Sensor Digital Data Streaming to a Host / PC over the RS-232
  • afe  : Configuring the Analog Front End of a module individually
  • sup  : Storing User Profile into the PDS module
  • reset: Resetting the module

With a terminal program like PuTTY a PDS module can be access for monitoring and configuring purposes. For this the PDS module should be connected to an available serial port of the PC (see Interfacing PDS modules for more details). The terminal program should then be able to communicate with the PDS module using the selected serial port number with following configuration:

115200 baud, 1 stop bit, no parity and no flow control

The PDS module contains a command processor, which allows the user to interact with the module over the terminal program. Any character typed by user into the terminal program is echoed back by the PDS module followed by command’s output.


The SDDS command

Syntax:     sdds -n -gG -sS -vV -tT -pPPPP -mMMMM -cCCC

This is the main command to a PDS module to receive sensor data. The parameters of this command can be grouped into two categories: One group is responsible for WHAT to send and the second group deals with aspects of HOW to send the sensor data to the host. There is no need to send the command with all its parameters or in a fixed order to the PDS module. Missing parameters will be handled with default values.

The parameters dealing with WHAT to send are:

  • Node-ID
    Since PDS modules can be cascaded on one digital line, a node ID is needed to seperate received sensor values of different modules. The node ID at start of a record of a data line shows to whom a specific sensor value is belonging.
    Parameter syntax: -n
    if the switch is used with the command, then the node ID will get also printed in the terminal program. (Example
    The default value is not to print the node ID. 
  • Graphical curve
    Sensor samples can be displayed as a semi-graphical-curve within the text window of the terminal application. The user is helped by this mode to get a simple imagination of received sensor data. This is not a power full graphic display mode of sensor data.
    Parameter syntax: -gG
    G in the syntax stands for a single digit of 0 for off and 1 for on
    Default value is 0
  • Stamp
    Any taken sample by PDS module has a time stamp. The time stamp can be shown in three formats when sending the data to the terminal as described below.
    Parameter syntax: -sS
    S in the syntax stands for a single digit value in the range of 0 to 2. With 0 only milliseconds are displayed. With 1 the time stamp is shown in Hour:Min:Sec format and with 2 a number of days will be also included to the time stamp. (Examples)
    Default value is 2, which means Hour:Min:Sec
  • Value
    Sensor samples can be displayed in three different formats when they are sent to the terminal program as described below:
    Parameter syntax: -vV
    V in the syntax stands for a single digit value in the range of 0 to 2. With 0 the sensor data is shown in mV. With 1 the ADC raw data as a HEX value is shown and with 2 both formats are displayed. (Examples)
    Default value is 0, which means displaying the sensor data in mV 
  • Temperature
    Together with any taken sensor sample the actual temperature is also sampled. The temperature for each sample data can be displayed using this parameter.
    Parameter syntax: -tT
    T in the syntax stands for a single digit value in the range of 0 and 2. With 0 the temperature is shown in °C. With 1 the temperature value is shown as ADC raw data in HEX. The value 2 leads the software to show the temperature in °C and HEX format. (Examples)
    Default value is 0, which means showing the temperature in °C.


The parameters dealing with HOW to send are listed below. They can be used in any combination; all together or as pairs in any combination or only one of them:

  • Periodically
    The PDS can be configured to take a sample of the sensor in fixed time intervals.
    Parameter syntax: -pPPPP
    PPPP in the syntax stands for a four digit decimal value in the range of 0 to 9999. The value defines the periodical time intervals in milliseconds for taking sample data.
    For example -p2500 means to take a sample each 2,5 seconds.
  • Monitoring
    The ADC of the PDS has 12-bit resolution. In decimal it means the ADC would deliver a value between 0 and 4095. Translated in HEX this means a value between 0000h and 0FFFh. The user can tell the PDS to monitor the delta HEX change of sensor value relative to actual value. This is defined in PDS system as monitoring.
    Parameter syntax: -mMMMM
    MMMM in the syntax stands for a four digit HEX value in the range of 0010h and 0FFFh. 
    For example if -m0020 is used, then the PDS will print out a sensor data record if the sensor value changes more than 20h relative to the last printed sample value. Then the PDS continues to monitor relative to this new printed value, if the difference gets more than 20h, and so on.
  • Counter
    This switch limits the sending of data records to a host to a defined number. When a period and/or monitoring is defined, additionally the user is able to tell the PDS to stop sending data after a number of sent records. 
    Parameter syntax: -cCCC
    CCC in the syntax stands for a three digit decimal value in the range of 001 and 999. 
    Default value is 10.
    For example if -c100 is given in the command, the PDS stops sending samples data after sending 100 records to the host.

When a PDS module is connected to a PC and the user types the command “sdds” without any parameters, then the PDS module provides the user with a brief help information how to use the command. The picture bellow shows this screen shot:





The AFE command

Syntax:     afe -gG -oOOO -agcS -gmM -cCC -aAA -rR

The PDS analog front end hardware allows the software to apply offset voltages or gains to received signals from the detector on its way to the ADC converter. Using the “afe” command the user can set following parameters before detector signal reaches the ADC:

  • Gain
    Eight different fixed gains can be applied to the detector signal.
    Parameter syntax: -gG
    G in the syntax stands for a single digit value in the range of 0 to 7
    G={0, 1, 2, 3, 4, 5, 6, 7} would result in gains={1, 2, 4, 8, 16, 32, 64, 128}
    Default value is 3 means a gain of 8
  • Offset
    An offset threshold to detectors signal level results to eliminate unwanted DC and noise signals. The implemented differential OpAmp, amplifies only positive levels relative to the configured threshold level. Noise and unwanted signal levels below this threshold are not seen by the ADC using this technique.
    Parameter syntax: -oOOO
    OOO in the syntax stands for a up to 3 digit decimal value between 0 and 256
    Default value is set to 0 
    Each step means 5034µV of offset voltage to detector signal level
  • Auto-Gain-Control
    The gain for the detector signal can be changed automatically based on last taken sample.
    The gain increases one step if signal level falls below 30% of ADC’s dynamic range, or 
    decreases one step if the detector signal level rises over 90% of ADC’s dynamic range.
    Parameter syntax: -agcS
    S in the syntax stands for a single digit value in the range of 0 to 1
    Default value is 0
    0 means automatic gain is turned off and 1 means it is active
    Example of active gain control on oscilloscope
  • Max-Gain (for auto-gain option)
    When auto-gain option is activated and no detector signal is present, the auto gain would apply the maximum gain of 128 to the detector signal. This maximum can be reduced to the value given by this parameter.
    Parameter syntax: -gmM
    M in the syntax stand for a single decimal digit in range of 0 to 7
    M={0, 1, 2, 3, 4, 5, 6, 7} would result in max-auto-gains of {1, 2, 4, 8, 16, 32, 64, 128}
    Default value is 7

When the detector signal is conditioned as explained above, the ADC itself allows various configuration possibilities. Most of them are application based and handled internally by the PDS module. Only following configurations were made available to the user in actual firmware:

  • Channel
    Due to multi-channel capability of ACU2, the channel must be set to the detector signals
    In case of PDS modules the detector channel channel is fixed to channel 17 by the hardware.
    Parameter syntax: -cCC
    CC in the syntax stands for a two digit decimal value in the range of 0 to 21
    Default value if 17
  • Averaging
    Each sample value delivered to the higher level software by the ADC module can be
    averaged by 2,4,8 or 16 taken samples.
    Parameter syntax: -aAA
    AA in the syntax stand for 1, 2, 4, 8 or 16
    Default value is 4, which means that any value presented to the system is an average of
    four taken samples within approx. 20µSec
    Setting to 1 means no averaging.
  • Vref-
    The ADC converts a value against a reference value, normally against the ground level, but it can also convert the signal against a level other than ground. The PDS can be configured to convert a signal against the offset value configured in the section above.
    Parameter syntax: -rR
    R in the syntax can be either 0 or 1. With 0 the Vref- will be set to internal ground of ADC and if set to 1, then the Vref- of the ADC will be the configured offset value described earlier.
    Default value is 0, means the reference is the internal ground of the ADC.

When a PDS module is connected to a PC and the user types the command “afe” without any parameters, then the PDS module provides the user with a brief help infoirmation how to use the command. The picture bellow shows this screen shot:




The SUP command

Syntax:     sup 

This command will save the actual configuration of the PDS module into the FLASH. After a power cycle or after a reset the PDS module will exactly continue to work as in the moment of executing this command.



The RESET command

Syntax:     reset 

With this command a warm reset will apply to the PDS module. Following information will be displayed in the terminal window after a reset:


Submit a Comment

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>