Professional Documents
Culture Documents
Page 1
Page 2
Page 3
Document history
Revision
001 18/11/2009 002 20/11/2009 003 26/11/2009 004 27/11/2009
Comments
First release Added serial cable picture. Grammar corrections. Added examples for the Extended EV tag. Added Pin-out diagram of the RS-232 Input port.
Page 4
Introduction
This application note explains the functionality of the Analog Interface for the Antares SB tracking device. The Analog Interface has three inputs that measure resistance 1 and can work with any type of sensors that reflect changes on their resistance value to measure certain physical phenomena changes, for example: temperature, weight, pressure, tension, water levels, humidity, etc. The resistance measured is presented as a TAIP message which contains three millivolts values (one for each input) that feeds the Event Machine of an Antares device with firmware version 5.31, so a user can define thresholds, event reports and extended EV tags.
IMPORTANT: The Antares SB Firmware that supports the Analog Interface is 5.31 or superior. This note is intended for people already familiar with the Antares SB device
1 Depending on the hardware version of the Analog Interface, it is also possible to measure voltages from 0V to 5V. Please contact support@digitalcomtech.com for more information.
Page 5
Operation
The integration with the Antares Event Machine can be done in the following ways: Defining thresholds with the >SXAEA< TAIP message. These thresholds configure how the events are triggered by the M boolean signals. The values measured by the Analog Interface can be obtained using Extended EV tags and using the >QXAADC< TAIP message. Refer to the TAIP messages section of this document for more information on the >SXAEA< and >QXAADC< TAIP messages. The Analog Interface inputs will only work correctly with ranges between 0 and 35K. This should be considered when choosing the sensors for the Analog Interface. It is possible to use all the three inputs at the same time or just two or one if desired. Additionally, it is possible to use an average of the values of all the inputs with a sensor connected for more precise measurements. The output of the Analog Interface is connected to the Antares' RS-232 port through a one-to-one serial cable (Cable not included). This cable must have all the 9 pins connected one-to-one. No external power source is required, the Antares' RS-232 port will provide the necessary power to the Analog Interface. No additional configuration is necessary. Simply connect the Analog Interface to Antares' RS-232 input and it will be ready to be used. The Analog Interface is designed to work with Antares but it can be connected to other RS-232 serial interfaces, like a computer. To connect the Analog Interface directly to a computer, the serial cable must be crossed and it must have a 7V to 12V input to the Analog Interface's pin 9 so it can work properly, and pin 9 on the computer's RS-232 must be left disconnected. The RS-232 port of the Analog Interface is a DTE port. The interface sends the values measured every five seconds to Antares. When Antares stops receiving the data from the Analog Interface, it will hold the last values received, and after 30 seconds if no data is received again, Antares will undefine the signals on the Event Machine associated to the Analog Interface.
Page 6
The following diagram shows the pins where each sensor is connected on the Analog Interface's RS-323 input port:
The voltage outputs can be used by Antares' Event Machine to generate reports. This is done by setting a threshold with the XAEA TAIP message (See the TAIP Messages section on this document.) The use of the Analog Interface as a Temperate Sensor is intended for temperatures from -23C to 60C. working more accurately at the lower temperatures. A table and a graphic which contains the average Voltage output of the Analog Interface for a range of temperature from -23C to 60C, can be found on the Appendix A section of this document.
Use thresholds to Trigger Events using the rising or falling edge of the M00-M09 signals. Create periodic reports that are controlled by the Event Machine. Change the status of the Antares' outputs.
Page 8
Examples
The following are some examples of how the Analog Interface can be used as a Temperature Sensor. For more information on the TAIP messages please refer to the TAIP Messages section of this document. Trigger Events: First set a threshold that will use the average of the value measured by the three sensors for a temperature of -6C (Please refer to Appendix A on this document for voltage vs temperature values), use the following message: >SXAEA001A1700< Then an event that uses this threshold is defined, for this example the falling edge of the signal will be used, meaning that the event will be triggered when the temperature goes above -6C: >SED00NV0;M00-< Periodic Reports: A continuous timer is needed to create a periodic report that will send the temperature measured to the server. A 5 minute timer will be used for this example. To create the timer use the following message: >SGC00TR00300< Then an event is defined that will query the values measured by all the sensors connected, using the timer previously defined: >SED01NV0;C00+;ACT=QXAADC<
Page 9 Change Outputs State: Using a temperature threshold and the Event Machine, it is possible to change the state of the Antares' outputs. For example, the output can be connected to a relay that switches on the heater in a room when the temperature is below 3C. First, set the threshold for 3C: >SXAEA011A1106< The raising edge of the signal will be used in this case to define an event that will change Antares' output 1 to high when the temperature goes below 3C: >SED02NV0;M01+;ACT=SSSXP11< Use Extended EV tags: The value measured by the Analog Interface can be associated to an event definition using an Extended EV tag. To create the Extended EV format use the following message: >SXAEFA;EA< Then define an event that will use the Extended EV format defined previously. For this example the event will be triggered each time the vehicle is turned off: >SED03NA0;F00-<
Page 10
TAIP messages
XAEA Analog Interface Thresholds [S, Q, R] Ten voltage thresholds may be set for the Analog Interface. The threshold can be associated to 1 input or to an average of the values of all the inputs. If an input does not have a sensor connected, it will be ignored in the calculation of the average. When using the S qualifier: AABCDDDD[EEEE] AA: B: C: DDDD: [EEEE]: Threshold index. 00-09 or ** Action: U: Undefine Threshold 1: Set Threshold Associated input: 1,2,3 or A for average Threshold value. In millivolts. Range: 0mV to 5000 mV. Hysteresis. In millivolts. Prevents multiple reports when the values measured change rapidly within this range. Default value is 50 mV. Range: 0mV to 5000 mV. This value is optional
When using the Q qualifier: [AA] AA: Threshold index. 00-09 or blank to consult all indexes.
Page 11 XAADC Analog Interface Output Message [Q, R] This TAIP message is sent continuously by the Analog Interface to Antares every 5 seconds. It has the following format: AAAABBBBCCCCD Where: AAAA: BBBB: CCCC: D: Value measured in millivolts by sensor on input 1. Value measured in millivolts by sensor on input 2. Value measured in millivolts by sensor on input 3. Codification algorithm. Only 0 is available, which indicates no codification is being used.
When using the Q qualifier: The >QXAADC< message will respond like this: >RXAADCA[XX...]B[YY...]C[ZZ...]< Where the A, B and C characters are fixed, and: [XX...]: Indicates the value measured in millivolts by sensor on input 1. Can be 1 to 4 characters long. [YY...]: Indicates the value measured in millivolts by sensor on input 2. Can be 1 to 4 characters long. [ZZ...]: Indicates the value measured in millivolts by sensor on input 3. Can be 1 to 4 characters long. If a sensor is not connected to an input, the value will be shown as a * character. For example, the following response: >RXAADCA749B*C2085< Indicates that input one has a value of 749 mV, input 3 has a value of 2085 mV and input 2 does not have a sensor connected.
Page 12
Extended EV Tags
A new Extended EV tag was added to the XAEF message. ;EA This new tag has the following format: A[XX...]B[YY...]C[ZZ...] Where the A, B and C characters are fixed, and: [XX...]: Indicates the value measured in millivolts by sensor on input 1. Can be 1 to 4 characters long. [YY...]: Indicates the value measured in millivolts by sensor on input 2. Can be 1 to 4 characters long. [ZZ...]: Indicates the value measured in millivolts by sensor on input 3. Can be 1 to 4 characters long. If a sensor is not connected to an input, the value will be shown as a * character. For example, to set a Extended EV format using this tag, use the following message: >SXAEFA;EA< To associate the Extended EV format to an event that will display the values measured: >SED03NA0;F00-< The values will be shown like this: >SEV031447147509+2578250-0802813901519512;EA=A749B*C2085< Meaning that input one has a value of 749 mV, input 3 has a value of 2085 mV and input 2 does not have a sensor connected.
Page 13
Appendix A
Temperature Voltage relation graphic
The values shown in the table have an error margin of: 60C to 0C: 0,2C 0C to -12C: 0,3C -12C to -23C: 0,4C
Page 15
END OF DOCUMENT