Preview only show first 10 pages with watermark. For full document please download

Adcboxma V1.0jp 240306

   EMBED


Share

Transcript

Reference manual ADCBox Bausch Datacom NV Tiensesteenweg 56 B-3360 Korbeek-Lo +32 16 461288 ADCBox Reference manual – V1.0 / JP Bausch Datacom NV 2 17/03/2006 ADCBox Reference manual – V1.0 / JP ! CAUTION ! ELECTRIC SHOCK HAZARD IF COVER REMOVED SERVICE BY QUALIFIED PERSONEL ONLY Document History Date Version Status 17/03/2006 V1.0/JP Preliminary Bausch Datacom NV Author Filip Lavaerts Creation 3 Info 17/03/2006 ADCBox Reference manual – V1.0 / JP Bausch Datacom NV 4 17/03/2006 ADCBox Reference manual – V1.0 / JP 1. Introduction 7 2. Block Diagram 8 3. Specifications 10 3.1 3.2 3.3 3.4 3.5 10 11 12 14 14 4. Housing Power supply Input and Output GSM Module GSM antenna Ports and Connectors 15 4.1 4.2 4.3 4.4 4.5 4.6 16 17 18 18 19 19 Power connection Configuration interface Analogue input Digital input Digital output SIM card reader 5. LED Indicators 20 6. Used Telegram Format 21 6.1 6.2 6.3 6.4 6.5 21 23 24 24 26 7. Telegram format Field description Check sum Scale factor and AI value Telegram examples ADCBox configuration menu’s 27 7.1 7.2 28 33 Configuration mode Running mode 8. Bausch Socket Server 35 A. EC-declaration of conformity xx Bausch Datacom NV 5 17/03/2006 ADCBox Reference manual – V1.0 / JP Bausch Datacom NV 6 17/03/2006 ADCBox Reference manual – V1.0 / JP 1. Introduction This manual is the reference book when setting up the ADCBox RTU device. Because of the nature of this product and it's field of application, some degree of technical background knowledge regarding the application and data-communication is assumed. This RTU has the technical specifications to monitor 8 digital and 4 analogue inputs. It can send data to a CTU (central processing unit) or host via GSM data, GPRS or SMS messaging. The main functionality’s of the ADCBox RTU are : ? ? IP65 enclosure Configuration, setup and monitoring via serial interface ? ? ? ? 4 x galvanically separated and independent analogue inputs bipolar input with 4 different scaling factors per channel : +/- 100mV / 3V / 7V / 50V 8 x galvanically separated and independent digital inputs 4 x galvanically separated and independent digital outputs ? ? Wavecom Q2406B module Build in antenna Bausch Datacom NV 7 17/03/2006 ADCBox Reference manual – V1.0 / JP 2. Block Diagram The block diagram below details the location and interconnection of the different functional units within the RTU. Power Supply There are two ways to power the RTU ; via the ac mains or via a long life battery pack. When the RTU is powered from mains a rechargeable NiMH backup battery pack can be connected to give the necessary energy during mains power failure. Configuration interface All local communication with the RTU for configuration, setup and monitoring is done via the serial “config interface”. GSM Module This RTU has a build-in Wavecom GSM/GPRS module. This module will be used to transfer data from/to the CTU or host system. The GSM module needs a SIM card with a disabled PIN code request. A dual band GSM antenna is mounted into the enclosure. Bausch Datacom NV 8 17/03/2006 ADCBox Reference manual – V1.0 / JP Atmel AVR processor All functionality’s are automatically guided by the Atmel processor. This processor will control the following tasks ; - enables/disables power supply regulators and DC/DC converters communication with the real time clock communication with the Wavecom GSM/GPRS module communication with the AD converters to measure the AI’s calculation on measured AI data read data from DI write data to DO write and read data in non volatile memory IO This RTU has 4 analogue inputs, 4 digital outputs and 8 digital inputs. All IO are galvanically separated from each other and from the other circuitry of the RTU. FRAM The RTU has 2 FRAM (ferro electric RAM) of 64 Kb (8.192 x 8 bits). This non volatile memory will be used to store the configuration, measured data and log information. All stored data can be recovered after a complete power down of the RTU. RTC The RTU has a built-in real time clock. Bausch Datacom NV 9 17/03/2006 ADCBox Reference manual – V1.0 / JP 3. Specifications 3.1 Housing The RTU is packed into a light grey RAL7035, ABS (Acryl Butadiene Styrene) enclosure. The enclosure complies with the protection class IP 65 according to DIN 40050. The fastening grooves are situated outside the seal range. The lid screws cannot be lost and are made of stainless steel. The neoprene lid seal is resistant against oil and petroleum. ? ? ? temperature resistant dimensions IP65 - 40°C to + 80°C. 200 mm x 120 mm x 90 mm The RTU has 6 membrane cable glands to enter cables into the RTU enclosure. Each gland can be used for a 3-5 mm cable. The electronics of the RTU consists of 2 PCB’s (printed circuit board) ; the µPboard (micro processor) and the IOBoard (input output). Bausch Datacom NV 10 17/03/2006 ADCBox Reference manual – V1.0 / JP 3.2 Power Supply 3.2.1 Mains power supply ? ? ? ? Input voltage range Frequency range Safety standards Withstand voltage 85 ~ 264 Vac / 120 ~ 370 Vdc 47 ~ 440 Hz UL1950, TUV EN60950 3 KVac 3.2.2 Rechargeable NiMH backup battery The RTU includes a fast battery charger (LTE4011) for 4 NiMH (4 AH) batteries. This charger is charging with a 1500 mA current and is using –dV/dt, maximum voltage/temperature and/or maximum time termination. This option can be used when the RTU is powered via the ac mains. 3.2.3 Long life battery pack If necessary the ADCBox can be powered from a long life battery pack. Time of live depends of the energy consumption. For example : Tadiran TLP-93121/B/AL1 ? ? ? ? ? Output voltage Capacity to 6 V Maximum 1 s. pulse Operating temperature Weight 7.26 Vdc 38 Ah 3A - 40 °C ~ +85 °C 450 gr. Contact us for more info about using the Tadiran long life battery pack. Bausch Datacom NV 11 17/03/2006 ADCBox Reference manual – V1.0 / JP 3.3 Input and Output 3.3.1 Analogue input - - - 4 galvanically separated and independent analogue input channels the 4 AI’s have 4 independent voltage scales, via software configurable (menu) - (0) +/- 100 mVdc - (1) +/- 3 Vdc - (2) +/- 7 Vdc - (3) +/- 50 Vdc input impedance - (0) +/- 100 mV range : > 10 Mohm - (1) +/- 3 V range : > 10 Mohm - (2) +/- 7 V range : > 10 Mohm - (3) +/- 50 V range : > 10 Mohm measurement precision : better then 1 % automatic calibration check at each measurement maximum voltage : 1500 Vdc @ 3 seconds ? Simplified schematic of the 1/1 and 1/100 AI interface Bausch Datacom NV 12 17/03/2006 ADCBox Reference manual – V1.0 / JP 3.3.2 Digital input - 8 galvanically separated digital input channels minimum input voltage : 5 Vdc (@ 1 mA) maximum input voltage : 24 Vdc (@ 7 mA) this input is polarity dependant (protected with a diode) ? Simplified schematic DI interface 3.3.3 Digital output - 4 galvanically separated digital output channels OptoMos relay contact - Ron = +/- 30 Ohm - Iload = 100 mA maximum - Ifuse = 62 mA - Umax = 350 Vpeak ? Simplified schematic DO interface Bausch Datacom NV 13 17/03/2006 ADCBox Reference manual – V1.0 / JP 3.4 GSM module The ADCBox includes a Wavecom Q2406B dual band GSM/GPRS module. General Specifications ? ? ? ? ? ? Dual-band 900/1800 MHz operation Maximum power output: 2 Watts 3V SIM reader Asynchronous DTE interface with speeds up to 115.200 bps Flow control (RTS/CTS – XON/XOFF) and speed buffering AT command set support Data Features GSM DATA : ? ? Data circuit asynchronous, transparent and non transparent up to 14400 bit/s Fax group 3 (Class 1 and Class 2) GPRS packet Data : ? ? ? GPRS Class 10 Coding Schemes : SC1 to CS4 PBCCH support Message services ? ? Point to point (MT/MO) and cell broadcast EMS Embedded IP The following TCP/IP features and protocols are available : PPP / ICMP / DNS / SMTP / POP3 / FTP / TCP socket 3.5 GSM antenna The RTU includes a dual band GSM antenna. This antenna is mounted into the lid of the enclosure. ? ? ? ? ? Frequencies: GSM dual band Gain : 0dB Impedance : 50 Ohm Cable : 30 cm RG-178 Teflon coax Dimensions : 105x15x3mm Bausch Datacom NV 14 17/03/2006 ADCBox Reference manual – V1.0 / JP Disconnect the mains power before connecting or disconnecting the power and/or DTE plugs ! 4. Ports and Connectors Before you start the installation, take a moment to become more familiar with the possible connections to and from the ADCBox. Bausch Datacom NV 15 17/03/2006 ADCBox Reference manual – V1.0 / JP 4.1 Power Connection The ADCBox can be powered from 2 different sources ; - ac mains with rechargeable NiMH battery backup long life battery pack 4.1.1 ac mains connection Always disconnect the mains power before connecting the power connection. Connect the ac mains power supply to the ac mains connector. Make sure the voltage supplied to the RTU is in the range of the RTU power supply specification (see specifications for details on voltage range). NiMH + NTC - mains Connect the NiMH rechargeable battery pack (with 10K NTC resistor) to the battery connector. Only battery packs with a 10K NTC resistor can be used. Beware the correct polarity, black (-), red (+) and yellow (NTC) wire. Do not connect the rechargeable NiMH battery to the long life battery pack (Tadiran) connection (3) or visa versa. This can be very dangerous ! 4.1.2 long life battery connection If no mains power is available the RTU can be powered on a long life battery pack. See specifications for more details. Tadiran + - Connect the long life battery pack to the battery connector. Beware the correct polarity, black (-) and red wire (+). Do not connect the long life battery pack (Tadiran) to the rechargeable NiMH battery connection (2) or visa versa. This can be very dangerous ! Bausch Datacom NV 16 17/03/2006 ADCBox Reference manual – V1.0 / JP 4.2 Configuration interface Only devices which are conform with the safety regulations can be connected to the DTE port! All local communication with the RTU for configuration, setup and the necessary maintenance tasks is done via the serial “configuration interface”. Configuration interface The RTU has a standard RS-232 interface (DB-9 female) which can be connected to a computer or similar device via a standard (straight) serial cable. Only RxD (pin2, from RTU to PC), TxD (pin3, from PC to RTU) and DTR (pin 4, from PC to RTU) are used. If DTR is active the green LED, located above the DB-9 connector, will illuminate. Pin I/O V.24/V.28 TEXT DB9 CCITT DIN 2 104 D2 RD O Receive data 3 103 D1 TD I Transmit data 4 108 S1 DTR I Data terminal ready 5 102 E2 GND --- Output: Input: EIA Signal ground from DCE (ADCBox) to DTE (terminal) from DTE (terminal) to DCE (ADCBox) A terminal software program (eg. HyperTerminal) must be used to communicate with the RTU. The following parameters must be used : Speed : Data bits : Parity : Stop bits : Flow control : Bausch Datacom NV 38.400 bps 8 none 1 none 17 17/03/2006 ADCBox Reference manual – V1.0 / JP 4.3 Analogue input connection The ADCBox can monitor up to 4 analogue signals. See specifications above for the possible input voltages. The 4 input signals must be connected via a Phoenix connector located on the IOBoard of the ADCBox. Conductor cross section : rigid min. 0.2 mm2 flexible min. 0.2 mm2 rigid max. 2.5 mm2 flexible max. 2.5 mm2 - + - + - + - + AI1 AI2 AI3 AI4 4.4 Digital input connection The ADCBox can monitor up to 8 digital signals. See specifications above for the possible input voltages. The 8 digital input signals must be connected via a Phoenix connector located on the IOBoard of the ADCBox. Conductor cross section : rigid min. 0.2 mm2 flexible min. 0.2 mm2 rigid max. 2.5 mm2 flexible max. 2.5 mm2 DI1 DI2 DI3 DI4 DI5 DI6 -+ -+ -+ -+ -+ -+ -+ -+ DI7 DI8 Bausch Datacom NV 18 17/03/2006 ADCBox Reference manual – V1.0 / JP 4.5 Digital output connection The ADCBox can control up to 4 digital outputs. See specifications above for the possible input voltages. The 4 digital output signals must be connected via a Phoenix connector located on the IOBoard of the ADCBox. Conductor cross section : rigid min. 0.2 mm2 flexible min. 0.2 mm2 2 rigid max. 2.5 mm flexible max. 2.5 mm2 DO1 DO2 4.4 DO3 DO4 SIM card reader Install a SIM card into the SIM card interface socket. Without a SIM card installed the ADCBox will not be able to communicate with the host system. How to install the SIM card: 1. Open the ADCBox enclosure (4 screws). 2. Disconnect the mains power or long life battery pack. 3. The SIM cardholder is placed in the middle of the uPBoard onto the PCB. 4. 5. 6. 7. 8. Carefully slide the metal bracket to the right (OPEN) position. Open the SIM card holder. Insert the SIM card (! marked corner). Close the SIM cardholder Carefully slide the metal bracket to the left (LOCK) position. 9. Connect mains power/NiMH battery pack or long life battery pack. 10. Close the ADCBox enclosure (4 screws). In order to work correctly the PIN request of the SIM card must be disabled. Bausch Datacom NV 19 17/03/2006 ADCBox Reference manual – V1.0 / JP 5. LED indicators GSM Module active 1234 1 1 NiMH charge active ac-mains available DTR Config Interface Bausch Datacom NV 20 17/03/2006 ADCBox Reference manual – V1.0 / JP 6. Used Telegram format ASCII messages (Telegram) will be send to the host system via a TCP/IP socket in a GPRS link. There is a one way communication from ADCBox to host system. Available data type are : Digital input (DI) and Analogue input (AI). 6.1 Telegram format Byte nb. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 Bausch Datacom NV Field Source Address (MSB) Source Address Source Address Source Address Source Address Source Address (LSB) Sequence Number (MSB) Sequence Number Sequence Number Sequence Number (LSB) Year (LSB) Year Year Year (MSB) Month (LSB) Month (MSB) Day (MSB) Day (LSB) Hour (MSB) Hour (LSB) Minute (MSB) Minute (LSB) Second (MSB) Second (LSB) Power Supply Status Info (LSB) Info (MSB) / Number of analogue channels (LSB) Number of analogue channels (MSB) AI1 Voltage Scale AI1 Value (MSB) AI1 Value AI1 Value AI1 Value AI1 Value (LSB) AI2 Voltage Scale AI2 Value (MSB) AI2 Value AI2 Value 21 Value 0000 0010 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx 0101 1100 0000 0000 0000 0100 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx 17/03/2006 ADCBox Reference manual – V1.0 / JP 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70+ 71+ 72+ 73+ 74+ Bausch Datacom NV AI2 Value AI2 Value (LSB) AI3 Voltage Scale AI3 Value (MSB) AI3 Value AI3 Value AI3 Value AI3 Value (LSB) AI4 Voltage Scale AI4 Value (MSB) AI4 Value AI4 Value AI4 Value AI4 Value (LSB) / Number of digital channels (LSB) Number of digital channels (MSB) DI1 Value DI2 Value DI3 Value DI4 Value DI5 Value DI6 Value DI7 Value DI8 Value Identification Length (MSB) Identification Length (LSB) Identification (MSB) Identification Identification (LSB) Check Sum (MSB) Check Sum (LSB) 22 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx 0101 1100 0000 0000 0000 1000 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx 0000 1101 17/03/2006 ADCBox Reference manual – V1.0 / JP 6.2 Field descriptions ? Start Character Hex(02) ? Source Address ASCII “000000” – “999999” Unique Address of the ADCBox ? Sequence Number ASCII “0000” – “9999” Each message is marked with an event number. ? ? ? ? ? ? Year Month Day Hour Minute Second ASCII “2000” – “2099” ASCII “00” – “12” ASCII “00” – “31” ASCII “00” – “23” ASCII “00” – “59” ASCII “00” – “59” ? Power Supply Status ASCII “0” ASCII “1” No mains detected. Mains detected. ? Info ASCII “AI” ASCII “DI” Trigger for telegram TX was AI info. Trigger for telegram TX was DI change. ? ? Separator / Number of analogue channels ? AIx Voltage Scale Hex(5C) ASCII “00” to “99” (ADCBox default 04) ASCII “X” X = “0” X = “1” X = “2” X = “3” ? ? ? ? +/- 100 mV +/- 3 V +/- 7 V +/- 50 V ? AIx Value ? ? Separator / Number of digital channels ? DIx Value ASCII “0” or “1” ? Identification Length ASCII “00” – “99” Number of bytes in the identification string. ? Identification String ASCII Identification string of the ADCBox. All characters are allowed. ? Check Sum ASCII “00” – “FF” More info in following chapters. ? Stop Character Hex(13) Bausch Datacom NV ASCII “00000” – “99999” ASCII representation of the ADC output value. More info in following chapters. Hex(5C) ASCII “00” – “99” (ADCBox default 08) 23 17/03/2006 ADCBox Reference manual – V1.0 / JP 6.3 Check Sum The check sum is presented as an hexadecimal code in two ASCII characters. This check sum is calculated on all bytes between the and the checksum field in the message. and checksum info are excluded from the check sum. The used check sum is a 8-bit arithmetic sum. Example : Message string : STX, “1”, “2”, “3”, “4”, “1”, checksum “1” Hex(31) + “2” Hex(32) + “3” Hex(33) + “4” Hex(34) + “1” Hex(31) = Hex(FB) The check sum in the message will be ‘displayed’ with the ASCII chars “F” and “B”. The complete message would be : STX, “1”, “2”, “3”, “4”, “1”, “F”, “B” 6.4 Scale factor and AI value Some calculations, depending on the Scale Factor, must be done to determine the measured voltage on the input of the ADCBox. The used Scale Factor is given before each ADC value in the message. Scale Factor 0 (+/- 100 mV) Resistor Divider = 1/1 Scale0 = 2500 Scale0 = Scale0 / 32768 Scale0 = Scale0 / 16 (Scale0 = 0.004768372) (Uref. x 1000 ? mV) (16bit – 1bit (bipolar) = 15 bit ? 215 = 32768) (ADC gain 16x) Scale Factor 1 (+/- 3V) Divider = 101.045 (Uadc = U i x 100K / ((10M + 3K3 + 1K2)+ 100K) = 101.045) Scale1 = 2.5 x Divider (Uref. x 1 ? V) Scale1 = Scale1 / 32768 (16bit – 1bit (bipolar) = 15 bit ? 215 = 32768) Scale1 = Scale1 / 64 (ADC gain 64x) (Scale1 = 0.000120455) Scale Factor 2 (+/- 7V) Divider = 101.045 (Uadc = U i x 100K / ((10M + 3K3 + 1K2)+ 100K) = 101.045) Scale2 = 2.5 x Divider (Uref. x 1 ? V) Scale2 = Scale2 / 32768 (16bit – 1bit (bipolar) = 15 bit ? 215 = 32768) Scale2 = Scale2 / 32 (ADC gain 32x) (Scale2 = 0.000240910) Bausch Datacom NV 24 17/03/2006 ADCBox Reference manual – V1.0 / JP Scale Factor 3 (+/- 50V) Divider = 101.045 (Uadc = U i x 100K / ((10M + 3K3 + 1K2)+ 100K) = 101.045) Scale3 = 2.5 x Divider (Uref. x 1 ? V) Scale3 = Scale3 / 32768 (16bit – 1bit (bipolar) = 15 bit ? 215 = 32768) Scale3 = Scale3 / 4 (ADC gain 4x) (Scale3 = 0.001927280) Example : ADCBox with 4 AI’s parallel connected to the same voltage source. The AI information content in the telegram is : …/04149347116173149343116177… /04 4 AI’s are present info AI1 149347 ? scaling 1 / ADC value 49347 info AI2 116173 ? scaling 1 / ADC value 16173 info AI3 149343 ? scaling 1 / ADC value 49343 info AI4 116177 ? scaling 1 / ADC value 16177 AI1 AI2 AI3 AI4 Ui = (49347 – 32768) x Scale1 = 1.9970 V Ui = (16173 – 32768) x Scale1 = -1.9989 V Ui = (49343 – 32768) x Scale1 = 1.9965 V Ui = (16177 – 32768) x Scale1 = -1.9984 V (Note : 1 % on 2 V is 0.02 V !) Bausch Datacom NV 25 17/03/2006 ADCBox Reference manual – V1.0 / JP 6.5 Telegram Examples 6.5.1 DI example 1234560953200603211809541DI/04149349116171149345116175/080000000006LeuvenEA ‘123456’ ‘0953’ ‘20060321’ ‘180654’ ‘1’ ‘DI’ ‘/04’ ‘149349’ ‘116171’ ‘149345’ ‘116175’ ‘/08’ ‘00000000’ ‘06’ ‘Leuven’ ‘EA’ ADCBox Source address Sequence number Year Month Day Hour Minute Second Mains on Digital input change or report hour 4 analogue inputs Voltage Scale and AI value for channel 1 Voltage Scale and AI value for channel 2 Voltage Scale and AI value for channel 3 Voltage Scale and AI value for channel 4 8 digital inputs DI1 to DI2 Identification Length Identification Check Sum 6.5.2 AI example 1234561048200603220959511AI/04149349116169149347116175/080000000006LeuvenEF ‘123456’ ‘1048’ ‘20060322’ ‘095951’ ‘1’ ‘AI’ ‘/04’ ‘149349’ ‘116169’ ‘149347’ ‘116175’ ‘/08’ ‘00000000’ ‘06’ ‘Leuven’ ‘EF’ ADCBox Source address Sequence number Year Month Day Hour Minute Second Mains on Analogue input report time period 4 analogue inputs Voltage Scale and AI value for channel 1 Voltage Scale and AI value for channel 2 Voltage Scale and AI value for channel 3 Voltage Scale and AI value for channel 4 8 digital inputs DI1 to DI2 Identification Length Identification Check Sum Bausch Datacom NV 26 17/03/2006 ADCBox Reference manual – V1.0 / JP 7. ADCBox configuration menu’s The setup of the ADCBox is done via configuration menus. To access the ADCBox a PC with a terminal program (Microsoft HyperTerminal) must be connected on the serial configuration port. Baudrate is fixed to 38400 bps (8N1). The ADCBox has two basic operation modes : ? ? Configuration mode Running mode Normal mode is Running mode. To configure and/or test the ADCBox the user has to enter into the Configuration mode. When the ADCBox is starting up the user has 5 seconds to enter the Configuration mode by sending a random character to the ADCBox. … ? Wait 5 seconds to RTU start or ? press any key to enter Main Menu … When the ADCBox is in Running mode a ‘S’ must be send to enter the Configuration mode. Bausch Datacom NV 27 17/03/2006 ADCBox Reference manual – V1.0 / JP 7.1 Configuration mode This chapter describes the different menus into the Configuration mode and shows how to configure and test the ADCBox. The Main Menu is the starting point to configure and test the ADCBox. *** ADCBox RTU Main Menu *** 1. View configuration 2. Configuration 3. Test 4. START RTU ? 7.1.1 GPRS and TCP/IP configuration Configuration starts with the input of the GPRS and TCP/IP server parameters into the Wavecom GPRS module. The ADCBox has a Wavecom transparent mode into the Test Menu. This mode allows the user to communicate directly with the Wavecom GPRS module. Select 3. to enter the Test menu. *** Test Menu *** 1. Wavecom transparent 2. Send test SMS 3. GSM factory init A. Analog test . Return ? Select 1. to enter the Wavecom transparent mode. ? Transparant to/from Wavecom … ? ctrl-a to end … At this point all characters to and from the configuration port of the ADCBox are transmitted and received to and from the Wavecom GPRS module. If at is transmitted to the Wavecom GPRS module, the module will respond with OK. Default echo is disabled ; characters send to Wavecom GPRS module are NOT echoed. To enable echo (that easier during input) type ate1. ate1 (you don’t see an echo) OK at (now you will see an echo) OK Bausch Datacom NV 28 17/03/2006 ADCBox Reference manual – V1.0 / JP The following parameters has to be configured directly into the GPRS module : #APNSERV Access point name parameter info from the GSM operator for providing GPRS access. Set at#apnserv=”Value” Get at#apnserv? / at#vall / at#vgprs Value Alphanumeric ASCII text string up to 120 characters #APNUN Access point username parameter info from the GSM operator for providing GPRS access. Set at#apnun=”Value” Get at#apnun? / at#vall / at#vgprs Value Alphanumeric ASCII text string up to 120 characters #APNPW Access point password parameter info from the GSM operator for providing GPRS access. Set at#apnun=”Value” Get at#apnun? / at#vall / at#vgprs Value Alphanumeric ASCII text string up to 120 characters #DNSSERV1 #DNSSERV2 In order to translate the server names from literal format into an IP address, the TCP/IP stack implements the Domain Name System protocol. Set at#dnsserv1=”Value” / at#dnsserv2=”Value” Get at#dnsserv1? / at#dnsserv2? / at#vdns / at#vall Value 32-bit number in dotted-decimal notation ? xxx.xxx.xxx.xxx Default 0.0.0.0 #TCPSERV To exchange data over TCP, the TCP/IP stack must now the address of the remote host TCP server that is used Set at#tcpserv=1,”Value” Get at#tcpserv=1 / at#vtcp / at#vall Value 32--bit number in dotted-decimal notation ? xxx.xxx.xxx.xxx or Alphanumeric ASCII text string up to 120 characters if DNS is used #TCPPORT To exchange data over TCP, the TCP/IP stack must now the port of the remote host TCP server that is used Set at#tcpport=1,”Value” Get at#tcpport=1 / at#vtcp / at#vall Value from 1 to 5 digits (above 65535 is illegal as port id. fields in a TCP header are only 16 bits wide) Note : It’s important not to change other TCP/IP stack settings. Some settings are specially defined for the interoperability with the ADCBox firmware. Bausch Datacom NV 29 17/03/2006 ADCBox Reference manual – V1.0 / JP Example (basic Proximus GPRS) at#apnserv=”internet.proxumus.be” at#apnun=”” at#apnpw=”” at#dnsserv1=”0.0.0.0” at#dnsserv2=”0.0.0.0” at#tcpserv=1,”212.219.182.110” at#tcpport=1,”405” ate0 at&w APN no username needed no password needed not needed if TCPSERV is IP addr. “ IP address host PORT host to disable echo again to save all parameters It’s best to check the settings with the view command at#vall or with at#vgprs, at#vdns and at#vtcp. When config is OK the Wavecom transparent mode can be closed with ctrla character. Press to return to the Main menu. 7.1.2 ADCBox specific parameters configuration Select 2. from the Main Menu to enter the Configuration Menu. *** Configuration Menu *** 1. Set Source Address 2. Set Identification Id’s 3. Set Data and Time 4. Set SMS Phone Numbers 5. Set AI Info TX period 6. Set DI report hour 7. Set Analog input parameters 8. Set Battery type 9. Reset Sequence Numbers . Save Configuration and Return ? 7.1.2.1. Set Source Address Input of the Source Address of this ADCBox. Value 000000 - 999999 7.1.2.2. Set Identification Id’s Input of the Identification field of this ADCBox. Value Alphanumeric ASCII text string up to 50 characters 7.1.2.3. Set Data and Time Input of Day Value 01 – 31 Input of Month Bausch Datacom NV 30 17/03/2006 ADCBox Reference manual – V1.0 / JP Value 01 – 12 Input of Year Value 00 – 99 Input of Hour Value 00-23 Input of Minutes Value 00-59 Input of Seconds Value 00-59 7.1.2.4. Set SMS Phone Numbers Input of Host SMS number enter 0 if not used. This telephone number (=/= ‘0’) shall be used to transmit an SMS message after 3 unsuccessful attempts for sending a DI telegram to the host system. Value +32xxxaabbcc Input of Test SMS number. This telephone number shall be used when an test SMS is initiated from the Test Menu. Value +32xxxaabbcc 7.1.2.5. Set AI Info TX period The measured AI info from the 4 ADC’s will be send to the host system each x minutes. Value 1 to 180 minutes 7.1.2.6. Set DI report hour Changes of one of the DI’s will automatically be reported by sending a telegram to the host. But it’s possible to configure a report hour ; each day at this hour the ADCBox will send a DI telegram. Value 0 to 23 7.1.2.7. Set Analog input parameters Select 7. to enter the Analog Input Configuration Menu. Analog input Configuration 1. Voltage Scale CH 1 2. Voltage Scale CH 2 3. Voltage Scale CH 3 4. Voltage Scale CH 4 . Save configuration and Return ? Select 1 for AI1, 2 for AI2, 3 for AI3 and 4 for AI4. After selecting a channel enter the correct voltage scale. Value 0 (+/-100 mV) / 1 (+/-3V) / 2 (+/-7V) / 3 (+/-50V) Bausch Datacom NV 31 17/03/2006 ADCBox Reference manual – V1.0 / JP 7.1.2.8. Set Battery type This option is used to input the battery type that will be used. Value 1 (Tadiran) / 2 (NiMH) After the battery selection, the battery threshold will be asked. This value depends on the battery and the application. Value 1 to 15 Volt This value is presently not used (ADCBox V1.0/JP firmware version). 7.1.2.9. Reset Sequence Numbers Select 9. to reset (0000) the Sequence Number. 7.1.3 View Configuration Select 1. from the Main Menu to enter the View Configuration Menu. The most important settings will be displayed on the screen. FIRMWARE VERSION Date & Time : V1.0/JP : 23/03/06 14:58:03 Source Address Identification : 123456 : Leuven AI Info TX period DI report hour Host SMS number Test SMS number : 10 min : 17 h : +32475123456 : +32475654321 Current sequence number AI : 0035 1 2 3 4 Voltage Scale 1 1 1 1 (0:100mV 1:3V 2:7V 3:50V) Vbatt= 9.66 V AC Power ON Charge OFF Vin= 9.66 V TH= 5.00 V T1=20.2 T2=21.4 T3=20.1 T4=22.1 ? Tavg=21.0 Most parameters are already discussed above. Additionally parameters are : Vbatt TH AC Power Charge measurebattery voltage battery threshold voltage on when present / off when not present on when charging / off when not charging Bausch Datacom NV 32 17/03/2006 ADCBox Reference manual – V1.0 / JP Vin T1…4 Tavg measured voltage before the GSM module switched dc/dc converter temperature of the ADC convertors °C average temperature T1 T2 T3 T4 °C Note : this temperature measurement is not very accurate but it’s included in the View Configuration Menu for checking the communication with the ADC chips. If the temp input from an ADC is complete out of range, the user knows that there is a problem with the hardware. 7.2 Running mode This chapter describes the Running mode of the ADCBox. To enter the Running mode select S. from the Main Menu. *** ADCBox RTU Main Menu *** 1. View configuration 2. Configuration 3. Test S. START RTU ? Or, the Running mode is automatically started when the ADCBox is powered on without a key press after … ? Wait 5 seconds to RTU start or ? press any key to enter Main Menu … . Next info will be displayed on the screen when the ADCBox starts it’s Running mode. … RTU Started … Current date time : 23/03/06 15:36:22 Next update at day 23 on 16:36:42 ? Current DI : 00000000 The ADCBox will display current time and the time when the next AI telegram will be send to the host. The first time difference is always 20 seconds. After this telegram the time difference with for sending the next AI telegram will be the time (minutes) as saved into Configuration Menu. The current DI status is also displayed. Bausch Datacom NV 33 17/03/2006 ADCBox Reference manual – V1.0 / JP Hereafter the ADC info and the calculated voltage level (CH1 … 4) will be displayed onto the screen. | 32755 > | 32755 > | 32755 > … | 32755 > 0.00 V | 32755 > 0.00 V | 32755 > 0.00 V | 32755 > 0.00 V | 0.00 V | 32755 > 0.00 V | 32755 > 0.00 V | 32755 > 0.00 V | 0.00 V | 32755 > 0.00 V | 32755 > 0.00 V | 32755 > 0.00 V | 0.00 V | 32755 > 0.00 V | 32755 > 0.00 V | 32755 > 0.00 V | When current time is equal to the AI time (first time always 20 seconds) the ADCBox will communicate with the host to send the AI telegram. ? AI update Current date time : 23/03/06 15:36:42 Next update at day 23 on 15:46:42 When AI time is valid the next AI time will be determined. The time difference is now as defined via the Configuration Menu. | 32755 > 0.00 V | 32755 > 0.00 V | 32755 > 0.00 V | 32755 > 0.00 V | Next ADC measurement will be used to transmit into an AI telegram to the host. To communicate with the host it’s necessary to attach the GPRS modem to the network to start a PPP session and to open a TCP socket to the host server. This process can be step-by-step monitored via the configuration port. Note : This is useful for debugging unsuccessful communications. All Wavecom actions (commands and responses) are displayed. Errors are displayed on the screen to determine the cause of the communication problem. … Opening Socket : sending (0036) AI info … Checking GPRS state ? GPRS STATE : CONNECTED … Opening Socket … ? Ok_Info_WaitingForData detected ? Socket open The AI telegram will now be transmitted to the host system. After a successful transmission the socket can be closed. … Closing socket … ? Ok_Info_SocketClosed detected ? Socket closed And the transmitted telegram will be displayed. 1234560036200603231536441AI/04 … After this the ADCBox will wait for the next AI time or a DI change to send a next telegram to the host. Bausch Datacom NV 34 17/03/2006 ADCBox Reference manual – V1.0 / JP 8. Bausch Socket Server Bausch has created a basic socket server program written in Visual Basic, based onto the Mabry Socket/X Com Object. Socket/X provides you with full access to the power of Windows Sockets, making it easy to write TCP/IP or UDP client and server software. Socket/X comes in ActiveX control and COM object forms. Because Socket/X is both an ActiveX control and a COM object, you can use it nearly anywhere -- ASP pages, Visual Basic applications, Visual C++ applications, anywhere that supports either COM objects or ActiveX controls. Socket/X provides complete support for Windows and Visual Basic's event-driven programming model and lets you do nearly anything that can be done with WinSock. Socket/X goes beyond the normal Visual Basic event-driven model by providing a scheme for Fast Notifications. Fast Notifications allow your program to quickly receive events through simple functions, rather than going through the lengthy process to fire an event. Fast Notifications considerably reduce the amount of time required to handle an event and only require a couple extra lines of code on your part. Want to stick with events? No problem! Those are still supported. You can also use Socket/X in a "blocking" mode. This enables you to use Socket/X where events and callbacks are impractical (such as ASP pages). Socket/X supports stream-based and datagram sockets. Stream-based sockets provide sequenced, reliable, full-duplex, connection-oriented byte streams. With stream-based sockets your data is guaranteed to arrive. This uses the Transmission Control Protocol (TCP) for the Internet address family. Datagram sockets are connectionless, unreliable packets (typically small) of a fixed maximum length. These kinds of sockets are good for broadcasting large quantities of small pieces of information to a lot of clients. This style of socket uses the User Datagram Protocol (UDP) for the Internet address family. Copyright 1998-2004 by Mabry Software, Inc. All Rights Reserved. Socket/X is a trademark of Mabry Software, Inc. Double click on “SCK_SRV_JP” icon to start the Socket Server. During startup the program will open two files from the c:\bausch directory, ip.inf and port.inf to collect the local IP address and the used Port Only this info may be present into the ip.inf and port.inf file. No Carriage Return or Line Feed character !! The user has 10 seconds to enter another IP address or Port then saved in the IP and Port .inf files. Press OK or wait until the 10 seconds are passed. Bausch Datacom NV 35 17/03/2006 ADCBox Reference manual – V1.0 / JP After startup the following screen will be opened. When a Socket is received, with an AI or DI telegram an additional screen will be opened. This is a view onto a (one) socket session. The remote IP and Port information of the ADCBox will be displayed together with the received telegram. When the socket session is closed the telegram will be added to the list together with the date and time. At the same time a file will be written into the c:\bausch directory with the filename : “Source Address – Sequence Number.log” with the received telegram. Bausch Datacom NV 36 17/03/2006 ADCBox Reference manual – V1.0 / JP Bausch Datacom NV 37 17/03/2006