Home
AN414 - Wireless Control Application Kit
Contents
1. NOTE Be sure to use the programming cable Part No 101 0513 supplied with this Appli Do not connect cation Kit the programming cable has red VBAT terminal shrink wrap around the RS 232 converter section located in the middle of the cable Programming cables from other Rabbit Semi conductor kits are not designed to work with the LP3500 NOTE Some PCs now come equipped only with a USB port It may be possible to use an RS 232 USB converter Part No 540 0070 with the programming cable supplied with the Application Kit Note that not all RS 232 USB converters work with Dynamic C 022 0115 Rev A 5 Connect Power Supply Hook up the connector from the 12 V AC adapter to header J5 on the Prototyping Board as shown above The orientation of this connector is not important since the VIN positive voltage is the middle pin and GND is available on both ends of the three pin header J5 NOTE Do not connect the AC adapter to the VBAT terminal on the Prototyping Board The VBAT terminal sup plies the backup battery voltage of 3 V and the LP3500 may be damaged if subjected to the raw DC voltage from the AC adapter through the VBAT terminal Plug in the AC adapter If you are using your own power supply it must provide 3 V to 30 V DC volt ages outside this range could damage the LP3500 NOTE A hardware reset may be d
2. amp w amp 2 Accessibility Add Hardware Add or Administrative Adobe Gamma Automatic Date and Time Options Remoy Tools Updates i e G gj w fF E amp Display Folder Options Fonts Game Internet Java Plug in Keyboard Controllers Options m T amp a a 2 B gt A Mail Mouse Network Phone and Power Options Printers and QuickTime Connections Modem Options Faxes ese 868d Regional and Scanners and Scheduled Security Sounds and Speech System Language Cameras Tasks Center Audio Devices a a Se Taskbar and UserAccounts Windows Wireless Start Menu Firewall Network Set 2 Click the Modems tab and press the Add Ph d Modem Opti HE button The Add Hardware Wizard will one and Modem pions open Dialing Rules Modems Advanced 3 Check the Don t detect my modem I will select The following modems are installed it from a list box and press Next Modem tached To 4 Click on Communications cable between two A Communications cable between two computers COM1 computers under Models and press Next 5 Click the COM port that the PC will be using for this connection and press Next 6 Press Finish and then press OK Add HeEmove Properties Cancel Apply 022 0115 Rev A 10 Set Up Network Connection 1 Go to the control panel Start gt Settings gt Control Panel and double click the Network Con nections icon Click the New
3. Remove Battery Tab The backup battery on the LP3500 has a plastic tab to protect the battery against discharging before the LP3500 is placed into service The backup bat P Plastic tery protects the contents of the SRAM and keeps the real time clock running f Tab when regular power to the LP3500 is interrupted Attach LP3500 to Prototyping Board Press the pins from the headers on the bottom side of the LP3500 firmly into the corresponding header sockets located at J1 J2 and J4 on the Prototyping Board NOTE Itis important that you line up the header pins on the LP3500 exactly with the corresponding header sockets J1 aaee J2 and J4 on the Prototyping Board The header pins may become bent or damaged if the pin alignment is offset and the LP3500 will not work Permanent electrical damage may also result if a misaligned LP3500 is powered up Prototyping Board Connect Programming Cable The programming cable connects the LP3500 to leader J5 is between the PC running Dynamic C to download programs the LP3800 and the and to monitor the LP3500 during debugging Connect the 10 pin connector of the programming cable labeled PROG to header J5 on the LP3500 shrink wrap Ensure that the colored edge lines up with pin 1 as shown Do not use the DIAG connector which is used for a normal serial connection Connect the other end of the programming cable to a COM port on your PC
4. RTS flow control PPP only CD D03 Configuration 2 low NOTE The D12 configuration varies depending on whether you will be working with the MODBUS SERIAL SLAVE C or the PPP sample programs Remember to reconfigure the wireless data module following Steps 7 8 when changing between these sample programs Now set the PC Settings tab to 9600 baud NONE flow control Modbus sample program or HARDWARE flow control other sample programs 8 data bits parity NONE 1 stop bit Click Test Query then click OK when you get the report Communication with modem OK that displays the modem type and firmware 022 0115 Rev A 9 Turn the Interface Board OFF then use the DB9M to bare wire leads serial cable to connect this Interface Rx 3 red TxC Board to header J41 on the LP3500 Prototyping Board Tx 2 brown RxC _ P3900 rototyping Turn the Interface Board back ON GND 5 black GND Board ICTS 8 yellow RxE J 10 Connect the other Interface Board to your PC COM port see Step 3 and repeat Steps 5 8 Leave this Interface Board connected to your PC IRTS 7 orange TxE After you place the Interface Board connected to the LP3500 some distance away from the PC workstation you will be able to try to control the LP3500 wirelessly from the PC workstation See Additional Reference Information for more information on signal loss and maximizing the range 022 0115
5. Connection Wizard then press Next to bring up the New Connection Wizard Select Set up an advanced connection and press Next Select Connect directly to another computer and press Next Select Guest and press Next Enter a specific name for the Rabbit based device for example LP3500 and press Next Select Communications cable between two computers and press Next Select Anyone s use and press Next then press Finish When the dialup window pops up press the Properties button 10 Verify that the COM port selected previously is displayed under the General tab and press the Configure button 11 Set the Maximum speed bps to 9600 and check only the Enable hardware flow control box leave the other settings unchecked and press OK 12 Check Display progress while connecting under the Options tab in the dialup window and leave other dialing settings unchecked 13 Select Typical recommended settings and Allow unsecured password under the Security tab in the dialup window 14 Press the Settings button under the Networking tab uncheck all the checkboxes then press OK 15 Double click Internet Protocol TCP IP then press the Advanced button uncheck Use IP header compression and uncheck Use default gateway on remote network under the General tab Now go to the WINS tab and select Disable NetBIOS
6. on your specific board int digInLabels web digInLabels select Din one Din two Din three Din four Din five Din six Din seven Din eight Din nine Din ten Din eleven Din twelve Din thirteen Din fourteen Din fifteen Din sixteen 022 0115 Rev A 18 Digital Outputs The control of the 10 digital outputs through the RabbitWeb interface is governed by the digOutSetup digOutLabels digOutStatus and digOutUpdate function calls You would simply change the name or add additional labels to digOutLabe1s to match the relays on your specific board int digOutLabels web digOutLabels select DO Sinking D1 Sinking D2 Sinking D3 Sinking D4 Sinking D5 Sinking D6 Sinking D7 Sinking D8 Sourcing D9 Sourcing Analog Inputs The control of the eight analog inputs through the RabbitWeb interface is governed by the anaInSetup analIns anaInStatus and anaInUpdate function calls The anaInSetup function call is used to assign the Analog Inputs name to the group header and to specify the number of inputs rows and col umn width Each anaIns label is unique because of the different configurations of each analog channel and that is also why the anaInStatus array has a value of 8 You would simply change the name or add additional labels to anaIns to match the inputs on your specific board int anaInSetup group header of inputs of rows column width web anaInSetu
7. over TCP IP and press OK 16 Press OK two more times to close the TCP IP properties page 17 Click OK to close the dialup window and save the settings The dialup connection should begin and the LP3500 running either sample program will be accessible wirelessly The dialup will be repeated a few times before timing out if there is a connection problem If you do encounter a connection problem turn both Interface Boards off verify that the DB9 connector is connected securely then turn the Interface Boards back on Double click the connection you named in Step 6 from the Network Connections window that may be reached from the control panel Start gt Settings gt Control Panel You may access the LP3500 in the future from here without having to set up the modem or configure the network parameters again What to Expect If you are running DIRECT_PPP C on the LP3500 you may ping the LP3500 to demonstrate the PPP wireless connection Run the Windows command dialog Start gt Run then enter cmd and type the following ping command ping 192 168 66 1 then click Enter The window will display the results of the ping Close the window exit return when you are done 022 0115 Rev A 11 If you are running DIRECT PPP HTTP C on the LP3500 you may also ping the LP3500 to demonstrate the PPP wireless connection following the above instructions You may also open your Web browser and enter the following URL to interface wirelessly w
8. point protocol directly and via a Web browser Possible applications include remote monitoring proximity sensor readings wireless I O control and data transmission 022 0115 Rev A 1 Table 1 compares the features of the MaxStream 900 MHz XCite and 2 4 GHz XStream RF modules used in the Wireless Control Application Kits Table 1 Maxstream RF Modules in Wireless Control Application Kit RF Module Feature MaxStream XCite MaxStream XStream Frequency 902 928 MHz 2 4000 2 4835 GHz Indoor Range up to 300 ft 90 m up to 600 ft 180 m Outdoor Line of Sight Range up to 1000 ft 300 m up to 3 miles 5 km Power Output 4 mW 6 dBm 50 mW 17 dBm Performance RF Data Rate 9 6 Kbps 9 6 Kbps Interface Data Rate up to 57 6 Kbps up to 57 6 Kbps Receiver Sensitivity 108 dBm 9600 bps 110 dBm 9600 bps Spread Spectrum Type FHSS frequency hopping FHSS frequency hopping e Peer to peer e Peer to peer e Point to point e Point to point NETON TO poDENS Suppers Point to multipoint e Point to multipoint e Repeater Networki e VID vendor ID number VID vendor ID number Serene Filtration Options e Channels e Channels e Addressing e Addressing Chanine Capacity 7 frequency hopping or 7 hop sequences share 25 single frequency 25 frequencies 65 000 network addresses 65 000 network addresses Addressing per channel per channel Supply Voltage 2 8 5 5 V DC reg
9. 00 htm 022 0115 Rev A 17 page then the getPage function calls the loadStatus function passing it a 0 for operation and 1p3500 htm for file name The loadStatus function displays that we are getting the Ip3500 htm page While all this is happing a script is called every 1000 ms to flash the message Loading lt baud gt bps When the iframe which contains the lp3500 htm file loads it also triggers its own onload event when it is fully loaded The event handler function loadStatus in the index htm page is called and passes a 1 and 1p3500 htm to indicate that the page has loaded Another function getScripts which is located in the 1p3500 htm page is called when the onload event occurs The getScripts function fetches the digital js analog js and ajax jx files one file at a time Each script file has a call to seriptcCb which is a function in 1p3500 htm This function lets the 1p3500 htm page know that the script has loaded The scriptCb function calls the loadStatus function just like the other pages to indicate this script has loaded The scriptCb function then calls getScript to load the next script and the process for load ing scripts continues until all the scripts are loaded The number of scripts to load is determined by the scripts array in the Ip3500 htm page When all files are loaded the loadStatus function is called with a 2 parameter to indicate that all files were loaded and to displa
10. 10 gt Digin 11 F Digin 12 F Digin 13 Digin 14 JE Digin 15 You may access the remaining LP3500 I O by checking the corresponding boxes and clicking the corre sponding Update button The ModbusMaster application performs the functions of a Modbus master in a system that may include up to five Rabbit based Modbus slave devices but is not a complete implementation of a Modbus master When the program first starts up it looks for a definition file ModbusMaster ini within the same folder If one is not found you will be prompted to find one You may also tell the program to use another definition file by selecting Read INI from the menu bar Additional information about the ModbusMaster application is available in the Dynamic C Modbus Docs folder 022 0115 Rev A 9 DIRECT PPP C and DIRECT PPP HITP C Before accessing the LP3500 wirelessly you will have to configure your PC or notebook If the PC or note book is connected to a network it is recommended that you disconnect it from the network The screen shots shown here are from Windows XP Professional the interface is similar for other versions of Windows Set Up PC Modem 1 Go to the control panel Start gt Settings gt Control Panel and double click the Phone and Modems Options icon E Control Panel ioj x File Edit View Favorites Tools Help ay Back z gt z D 9 Search Tier Folders gt Fs pre 1 E Address E Cortot Pane O Go
11. Ea 2 AN414 Wireless Control Application Kit Introduction The Wireless Control Application Kit highlights the interface of MaxStream s 900 MHz XCite or 2 4 GHz XStream wireless data modules with one of Rabbit Semiconductor s single board computers the LP3500 The Wireless Control Application Kit comes with sample programs that illustrate the simple con figuration and control of a new or existing Rabbit based embedded system via a wireless interface using either the Modbus protocol or a direct point to point protocol PPP serial connection with a Web browser The MaxStream wireless data modules are each mounted on an RS 232 RS 485 Interface Board that provides the power supply and a DB9 serial interface with flow control Two wireless data modules and two RS 232 RS 485 Interface Boards are included in the Application Kit to allow you to attach one assem bly to the LP3500 control system and to use the other assembly with your PC to interface wirelessly with the LP3500 control system LP3500 Prototyping Board RS 232 cable RS 232 cable Figure 1 Wireless Interface Setup The sample programs included with the Wireless Control Application Kit serve as a template for a robust wireless implementation with a serial connection A Modbus sample program shows how to control the single board computer which is set up as a slave device from a PC that serves as the Modbus master PPP sample programs show how to use the point to
12. ICK TO UPDATE M Relay One e Try pressing and holding down one of the switches on the LP3500 Prototyping Board say the corner switch S1 then CHECK the Auto Update for the Digital Inputs You will see GETTING DATA and SUCCESS FUL UPDATE status messages and then see a visual indication in the Web browser that Din one is high e UNCHECK any of the DO D3 Sinking Digital Outputs then click on CLICK TO UPDATE You Digital Inputs M Auto Update SUCCESSFUL UPDATE Din one Din five Din nine Din thirteen Din two Din six Din ten Din fourteen Din three Din seven Din eleven Din fifteen Din four Din eight Din twelve Din sixteen Digital Outputs CLICK To UPDATE n 7 M DO Sinki M D3 Sinki M D6 Sinki M D9 Sourci will then see the corresponding DS1 DS4 lights light F orsin P vasinking P De sinking sas F D2 Sinking M D5 Sinking M D8 Sourcing up on the LP3500 Prototyping Board Analog inputs and analog outputs may be handled accordingly 022 0115 Rev A 12 Additional Reference Information The following manuals are available from the documentation installed on your PC when you installed the Dynamic C CD and the supplemental CD for this application kit LP3500 User s Manual XCite RF Module Product Manual XStream RF Module Product Manual Check the Rabbit Semiconductor and the MaxStream Web sites for additional information and the latest versions of supporting documentation MaxStream has several documents dealing with RF
13. Rev A 8 Wireless Control Demonstrations You are now ready to access the LP3500 from your PC through a wireless interface The specific access instructions depend on the sample program you loaded on the LP3500 Appendix A documents the use of the Dynamic C function calls and macros in the sample programs MODBUS SERIAL SLAVE C Start the ModbusMaster application that you installed from the supplemental CD double click the ModbusMaster exe file in the Dynamic C Modbus folder Select the LP3500 from the Board pull down menu then select your choice of any of DigOut 0 to DigOut 3 The corresponding LEDs on the LP3500 Prototyping Board will light up once you click Update Digital Outputs If you experience any problems check that the COM Port to the right of the board matches the COM port on your PC If it does not you may change it using the COM menu on the menu bar Modbus Master version 1 0 A ModbusMaster ini ioj x ReadINI COM Help Board FESON 7 COM Port 1 TimeOut 5 Seconds F Enable Cycle F Enable Cycle Update Digital Inputs Update Digital Outputs Update Analog Inputs Update Analog Outputs E Test Line F DigOut 0 Analn 0 PWM O T Digni T Output 1 Analn 1 AnaOut 1 T Dign2 TE DigOut 2 Analn 2 AnaOut 2 F Digin 3 T DigOut 3 RAIN gt Digin 4 T DigOut 4 Anand Digin 5 T DigOut 5 Anain 5 _ Digin 6 T DigOut 6 Anan Digin 7 T DigOut 7 analra F Digins T DigQut 8 Diging F DigOut 9 F Digin
14. S 232 serial ports with no flow control The MODBUS_ PORT macro assigns Serial Port C as the Modbus serial port The CINBUFSIZE and COUTBUFSIZE macros set the buffer sizes of the circular input and output buffers The MODBUS BAUD macro sets the baud rate to 9600 bps The INPUT_ONE and OUTPUT_ONE macros set whether a logic one is a high or a low LP3500 Operation The remaining code sets up the analog and digital I O on the LP3500 so that the Modbus host can then execute the individual I O The MODBUS_Serial_tick function call checks for command from the PC that is acting as the Modbus master 022 0115 Rev A 14 DIRECT PPP HTTP C Let s examine some of the code in the DIRECT PPP HTTP C sample program In this sample program the LP3500 will be the host device which means that it will wait for the guest device to begin the PPP ses sion Once the PPP options are negotiated the host device will use the following network parameters HOST IP 192 168 66 1 GUEST IP 192 168 66 2 The host device will provide the guest device with the following network parameters HOST GATEWAY 192 168 66 1 HOST NETMASK 255 255 255 0 Once the connection is established the LP3500 will act as an HTTP Web server The Web server can be accessed by typing the host s IP address in the guest PC s Web browser First the program settings used at startup are defined These macros are used by the parameters in the function calls and you may change the ma
15. closed in parentheses All dimensions have a manufacturing tolerance of 0 01 0 25 mm Rabbit Semiconductor Inc www rabbit com 022 0115 Rev A 22
16. cro definitions to suit your needs PPP Compile Time Settings define TCPCONFIG 0 The TCPCONFIG macro tells Dynamic C to select the TCP IP configuration from a list of default configu rations When TCPCONFIG 0 is specified the network parameters are set in the program Use TCPCON FIG 1 or TCPCONFIG 3 if you are going to access the wireless data module via an Ethernet connection instead of via a direct serial connection define PPP BAUD 9600L This macro sets the PPP baud rate to 9600 bps i BOARD TYPE amp 0xFF00 LP3500 amp OxFFOO define LP3500 SBC endif ifdef LP3500 SBC tdefine USE PPP SERIAL 0x04 0x02 for B 0x04 for C 0x08 for D define IFS PPPp IF PPP2 IF PPPO for A IF PPP1 for B IF PPP2 FOE IC cus Shere define IFS PPPn IF PPP2 used for STDIO debugging info else assume RCM3720 and not using Ethernet define USE PPP SERIAL 0x08 0x02 for B 0x04 for C 0x08 for D define IFS PPPp IF PPP3 IF_PPPO for A IF PPP1 for B IF PPP2 for C define IFS PPPn IF PPP3 used for STDIO debugging info endif 022 0115 Rev A 15 This block of code specifies the LP3500 and assigns the serial ports Serial Port C is used for the PPP connection An alternate serial port configuration is provide for the RCM3720 RabbitCore module which may also be used without modifying this sample program the RCM3720 uses Serial Port D for the PPP connection The next macro
17. der and to specify the number of inputs rows and column width Each anaOuts label is unique to allow for different configurations of each analog channel and that is also why the anaOutStatus array has a value of 3 You would simply change the name or add additional labels to anaOuts to match the outputs on your specific board int anaOutSetup group header of outputs of rows column width web anaOutSetup select Analog Outputs 3 1 150px int anaOuts 3 label unit min max web anaOuts 0 select PWM 0 0 100 web anaOuts 1 select PWM 1 0 100 web anaOuts 2 select PWM 2 0 100 As the analog outputs are read the anaOutUpdate function call updates their values in the Web browser Each of the three PWM analog outputs is set up for a 100 duty cycle in this sample program via the pwmOut function call 022 0115 Rev A 21 Appendix B Specifications Complete specifications for the LP3500 and the LP3500 Prototyping Board are available in the LP3500 User s Manual on e 0 130 dia 4 3 3 Y A Eo ST o S 2 ate ot NO NEL NL A iB Y Y Y R lt 70 15 p 2 75 J 1 10 a o 4 70 28 e 4 00 5 102 ho oO T S 4 40 28 112 sw Figure A 1 RS 232 RS 485 Interface Board Dimensions with Wireless Data Module Installed NOTE All measurements are in inches followed by millimeters en
18. eS gram then press function key F9 to compile and run the program Remove the programming cable and reset the LP3500 once the program has com piled and is running A reset switch is located on both sides of the LP3500 near the programming header Eleos 2000 fs a O Sat wea FOr q EFE 293999999999999991 l RESET switch RESET switch 022 0115 Rev A 6 Wireless Data Module Setup 1 Set the DIP switches on both RS 232 RS 485 Interface Boards to the RS 232 Mode Switch 1 is ON up and the remaining 5 switches are OFF down Mount each wireless data module to an RS 232 RS 485 Interface Board as shown at right Use the DB9F to DB9M serial cable to connect one Interface Board to your PC COM port You may use the RS 232 USB converter Part No 540 0070 if your PC does not have a COM port ON OFF LEDs SERIAL POWER SWITCH CONNECTOR INPUT Riel Jeno RF Module button RS 232 RS 485 Interface Board Locate and double click setup_x ctu exe in the Dynamic C DCRabbit X CTU soft
19. etwork Settings The LOCAL VERBOSE macro enables the printing out of error messages in the Dynamic C STDIO win dow The colors are also defined here 022 0115 Rev A 16 RabbitWeb Macros define USE RABBITWEB 1 define SSPEC MAXNAME 32 define HTTP MAXSERVERS 1 The USE_RABBITWEB macro is defined to 1 to use the HTTP server enhancements The SSPEC MAXNAME macro defines the maximum length of mime type default 20 and the HTTP MAXSERVERS macro is set to 1 one server at a time to reduce RF traffic memmap xmem use dertcp 1lib use http 1lib The define of USE RABBITWEB is followed by a request to map functions not flagged as root into xmem The two use statements allow the application the use of the main TCP IP libraries all brought in by DCRTCP LIB and the HTTP server library which also brings in the resource manager library ZSERVER LIB Web Browser Display The ximport imports the support HTML and javascript pages that are served up by the LP3500 host ximport pages index htm index htm ximport pages 1p3500 htm 1p3500 htm ximport pages digital js digital js ximport pages analog js analog js ximport pages ajax js ajax js Let s look at how this is done When a Web page is requested by a Web browser the page is loaded and any images scripts CSS or iframes in the page will begin to load automatically as the main page is loaded Some Web browsers such as Internet Explorer can only have two si
20. ith the LP3500 via the Web browser http 192 168 66 1 You will get the following display keep in mind that it may take a minute or two to fully load the various image components whose loading status you will be able to watch in the Web browser Rabbit Semiconductor Wireless Control Application Kit Windows Internet Explorer go fe htp 77192 168 66 17 4 x File Edit View Favorites Tools Help Sy ae ep Home E Feeds J ee Print Page Tools Help 34 Research amp Yahoo Messenger Messenger Wireless Control Application Kit Relays I Relay One Digital Inputs M Auto Update Din one Din two Din three Din four Din five Din six Din seven Din eight Din nine Din ten Din eleven Din twelve Din thirteen Din fourteen Din fifteen Din sixteen Digital Outputs M DO Sinking M D3 Sinking M D6 Sinking M D9 Sourcing M D1 Sinking M D4 Sinking M D7 Sinking M D2 Sinking M D5 Sinking M D8 Sourcing Analog Inputs I Auto Update Analog In 0 Analog In 2 Analog In 4 Analog In 6 10 000 Volts 0 026 Volts 0 038 Volts 0 049 Volts Analog In 1 Analog In 3 Analog In 5 Analog In7 0 021 Volts 0 034 volts 0 042 volts 0 053 volts Analog Outputs PWM 0 PWM 1 PWM 2 fio 255 fs0 Done TOT LT TE O nene 410 5 e You may turn the relay ON or OFF by CHECKING or UNCHECKING Relay One then clicking on the CLICK TO UPDATE Relays CL
21. multaneous connections while other browsers can handle many more This can create too much bidirectional traffic for the wireless data modules to handle Hardware flow control only works for the wired serial interface to the wireless data modules so they can stop the data when their buffer is full There is no such capability for the wireless data flow the receiving wireless data module cannot stop the wireless data if its buffer gets full Most issues here are kept to a minimum by setting up the wireless data modules for a baud rate of 9600 bps and the amount of data flowing between them is further limited by setting the HTTP_MAXSERVERS macro to 1 one server at a time We also set the ETH_MTU macro to 400 bytes because the XCite module only has a 438 byte buffer this ensures that full packets are sent The TCP_BUF_ SIZE macro is also limited to 2 times the ETH_MTU value minus 40 because of extra Ethernet overhead to prevent windowing This basically means only one packet will be sent out and it must be ACKed before the next one is released The downloading process is long and javascript code keeps track of the loading and displays some kind of status To do this the index htm page uses the onload function to trigger an event when the page is fully loaded The event handler or get Page function is then called and sets an iframe s source file to 1p3500 htm the iframe is located in the index htm page This causes the browser to fetch the 1p35
22. nputs to measure current refer to the LP3500 User s Manual for information on how to do this and the Dynamic C function calls The corresponding labels in the sample program might then be as shown below int anaIns 8 label unit min max web anaIns 0 select Analog In 0 mA 4 20 web anaIns 1 select Analog In 1 mA 4 20 web anaIns 2 select Analog In 2 Volts 0 5 web anaIns 3 select Analog In 3 Volts 0 5 web anaIns 4 select Analog In 4 amp 176 C 0 20 web anaIns 5 select Analog In 5 amp 176 F 32 100 web anaIns 6 select Analog In 6 Volts 0 1 web anaIns 7 select Analog In 7 Volts 0 1 This reflects the following use of the analog inputs e 0 current measurement via anaInmAmps e 1 current measurement via anaInmAmps e 2 voltage measurement via anaInVolts 2 2 e 3 voltage measurement via anaInVolts 3 2 e 4temperature measurement in C via anaIn 4 SINGLE 0 e 5 temperature measurement in F via anaIn 4 SINGLE 0 e 6 voltage measurement via anaInVolts 6 7 e 7 voltage measurement via anaInVolts 7 7 022 0115 Rev A 20 Analog Outputs The control of the three analog outputs through the RabbitWeb interface is governed by the anaOutSetup anaOuts anaOutStatus and anaOutUpdate function calls The anaOutSetup function call is used to assign the Analog Outputs name to the group hea
23. one by pressing the RESET switch on the LP3500 The LP3500 may also be reset by unplugging the AC adapter then plugging it back in However when the LP3500 is operating in the power save mode the backup battery will provide sufficient voltage to prevent a reset from happening in which case you will have to press the RESET switch on the LP3500 Reset switches are located on both sides of the LP3500 board Run a Sample Program Once the LP3500 is connected as described start Dynamic C by double clicking on the Dynamic C icon or by double clicking on dcrab XXXX exe in the Dynamic C root directory where XXXX are version specific characters If you are using a USB port to connect your computer to the LP3500 choose Options gt Project Options and check Use USB to Serial Converter in Serial Options on the Communications tab Click OK to save the settings There are three sample programs available to set up the LP3500 to illustrate a wireless interface via the MaxStream 900 MHz XCite or 2 4 GHz XStream wireless data modules Type of Interface Sample Program Dynamic C Folder Modbus MODBUS SERIAL SLAVE C SAMPLES Modbus Point to Point Protocol DIRECT PPP C SAMPLES WirelessControl Point to Point Protocol DIRECT PPP HTTP C SAMPLES WirelessControl with Web Interface The sample programs are listed in order of their increasing complexity Use the File menu to open the desired sample pro SS
24. p select Analog Inputs 8 2 135px int anaIns 8 label unit min max web anaIns 0 select Analog In 0 Volts 0 20 web anaIns 1 select Analog In 1 Volts 0 10 web anaIns 2 select Analog In 2 Volts 0 5 web anaIns 3 select Analog In 3 Volts 0 4 web anaIns 4 select Analog In 4 Volts 0 2 5 web anaIns 5 select Analog In 5 Volts 0 2 web anaIns 6 select Analog In 6 Volts 0 1 25 web anaIns 7 select Analog In 7 Volts 0 1 void anaInUpdate As the analog inputs are read the anaInUpdate function call updates their values in the Web browser 022 0115 Rev A 19 for 1 0 1 lt 8 1i anaInStatus i anaInVolts i i The anaInVolts function call reads each of the eight analog inputs and in turn converts each raw reading to a voltage the first parameter in anaInVolts is the channel number 0 7 and the second parameter is the gain code 0 7 as explained in the function help or the LP3500 User s Manual The dif ferent gain codes for each channel represent different voltage ranges as shown below Analog Channel Voltage Range 0 0 20 V 1 0 10 V 2 0 5 V 3 04 V 4 0 2 5 V 5 0 2 V 6 0 1 25 V 7 0 1 V You may specify a standard gain code for all the channels you may set up an analog input channel with a thermistor to measure temperature or you may configure some of the analog i
25. settings improve the performance of the sample program when using the XCite wireless data module by compensating for its smaller buffer and lack of over the air flow control The macros are not needed when the XStream wireless data module is used define ETH MTU 400 XCite has a 438 byte buffer define HTTP MAXBUFFER ETH MTU 40 define TCP BUF SIZE ETH MTU 40 2 define TCP MINRTO 250 min RTO default 10 ms define RETRAN STRAT TIME 25 check RTO default 10 ms define TCP LAZYUPD 250 packet delays default 5 ms Finally the LP3500 or RCM3720 is identified as the host that will be listening for a guest define DIALUP _SENDEXPECT amp CLIENT CLIENTSERVER PPP Network Settings define HOST IP 192 168 66 1 define GUEST IP 192 168 66 2 define HOST GATEWAY 192 168 66 1 define HOST NETMASK 255 255 255 0 These macros set the IP addresses of the LP3500 RCM3720 host and the PC guest and define the gateway and netmask for the host define CHK SIGNAL 20 The CHK SIGNAL macro specifies a time limit in seconds for the HTTP socket to be idle when PPP is up Wireless data modules may lose their signal but the LP3500 will not recognize that this happened so the PC will be pinged when the time limit expires if there is no response the PPP connection is terminated and re initialized define PING TIMEOUT 1 The PING TIMEOUT macro specifies the number of seconds to wait for the ping response N
26. signal losses RF installation tips and selecting a radio frequency Indoor Path Loss Maximizing Range 900 MHz vs 2 4 GHz 022 0115 Rev A 13 Appendix A Software Reference Sample Programs MODBUS SERIAL SLAVE C Let s examine some of the code in the MODBUS SERIAL SLAVE C sample program In this sample program the LP3500 is the slave device and the PC is the master Macro Definitions define MODBUS DEBUG PRINT 0 define MODBUS SLAVE DEBUG nodebug define USE MODBUS CRC define BYTE TIME 32 Defining the MODBUS_DEBUG PRINT macro to its default value of 0 means that no messages will be printed The MODBUS_ SLAVE DEBUG macro is set to nodebug to compile the MODBUS_SLAVE LIB library without any debugging The USE_MODBUS_ CRC macro enables a cyclic redundancy check for the data The BYTE TIME macro sets the maximum number of byte times to wait between received bytes because the XCite wireless data module does not transmit all the bytes in a packet at once LP3500 Configuration Macros define MY MODBUS ADDRESS 3 define SERIAL MODE 0 define MODBUS PORT C define CINBUFSIZE 127 define COUTBUFSIZE 127 define MODBUS BAUD 9600 define INPUT ONE LOW define OUTPUT ONE LOW The MY_MODBUS_ ADDRESS macro sets the Modbus address of the LP3500 to 3 Modbus addresses of 1 247 may be used The SERIAL MODE macro is set to 0 which causes the serMode function call to set up Serial Ports B C and E on the LP3500 as regular R
27. ta logging applications e Peer to peer and point to point multipoint networking control What Else You Will Need Dynamic C must be installed on your PC Insert the Dynamic C CD from the Application Kit in your PC s CD ROM drive If the installation does not auto start run the setup exe program in the root directory of the Dynamic C CD Install the software from the supplemental CD and any Dynamic C software modules after you install Dynamic C Besides what is supplied with the Application Kit you will need a PC with an available COM or USB port to program the LP3500 in the Application Kit If your PC only has a USB port you will also need an RS 232 USB converter Note that not all RS 232 USB converters work with Dynamic C 022 0115 Rev A 3 Hardware Setup The Wireless Control Application Kit Getting Started instructions included with the Application Kit shows how to set up and program the LP3500 with its Prototyping Board then interface it wirelessly with your PC via MaxStream s 900 MHz XCite or 2 4 GHz XStream wireless data modules The following steps from the Wireless Control Application Kit Getting Started instructions summarize the setup process once Dynamic C the Dynamic C modules and the software from the supplemental CD have been installed on your PC 022 0115 Rev A LP3500 Setup LP3500 Connections Use the 4 40 screws to attach the metal standoffs to the LP3500 board as shown
28. ulated 5 V 0 25 V DC regulated Transmit Current 55 mA 2 85 V 150 mA Power typical Receive Current 45 mA 2 85 V 50 mA Sleep Current 20 uA 26 uA The maximum range can only be realized with a high gain antenna The actual range also depends on the environment any structures in the way network connections and on whether the Modbus or the point to point protocol is used the range will be less when using PPP See Additional Reference Information for more information on maximizing the range MaxStream also offers a 900 MHz XStream RF module Even though the wireless data modules will operate at baud rates faster than 9600 bps the 9600 bps baud rate is used in the sample programs to maximize reliable data transfer over the largest possible distance using the wire antennas on the wireless data modules included with the Wireless Control Application Kit 022 0115 Rev A Application Kit Features e LP3500 single board computer with LP3500 Prototyping Board Two 900 MHz XCite or two 2 4 GHz XStream RF modules with two MaxStream RS 232 RS 485 Interface Boards e Dynamic C CDs for RabbitWeb module Point to Point Protocol PPP module and Modbus module e Complete Dynamic C software CD and supplemental CD with sample programs and reference information related to the Application Kit Example Applications e Low cost wireless embedded control applications e Remote monitoring of equipment devices locations e Simple da
29. ware directory to install the X CTU application that you will use to set up the wireless data modules Connect a9 V AC adapter to the power input on the RS 232 RS 485 Interface Board Use the ON OFF switch on the RS 232 RS 485 Interface Board to turn the Interface Board on the red LED should light up Start X CTU from the desktop icon and set the PC Settings tab to 38400 baud XCite module or 19200 baud XStream module NONE flow control 8 data bits parity NONE 1 stop bit Click Test Query then click OK when you get the report Communication with modem OK that displays the modem type and firmware Note the modem type XC09 038 or X24 019 The settings in this step apply only when you have a module fresh out of the box otherwise use the settings in Step 8 Click Read on the Modem Configuration tab The modem type identified in the previous step should display and you will now set the serial options Click Write when you have set the serial options XC09 038 XCite X24 019 XStream 1 RTS flow control PPP only e AT Command Serial Interface Options e Networking CD D03 Configuration 2 low RR Retries FF e Non AT Settable Parameters Serial Interfacing Options Serial Interfacing Options Baud Rate 3 9600 BD Interface Data Rate 3 9600 DI2 Configuration 0 Disable Modbus only RT DI2 Configuration 0 Disable Modbus only 2
30. y the elapsed time to load The pageInit function in the 1p3500 htm page is called and all RabbitWeb variables are set up Finally the doneLoading function which is located in the index htm page stops the flashing Loading indicator and hides the loading status information The Web browser now displays the loaded iframe 1p3500 htm which displays all the I O controls The ajax js script is used to post and or get information from the Rabbit based LP3500 http server This is used to create more of a real time experience when dealing with I O control and monitoring AJAX asyn chronous javascripts and XML provides a more application type feel for Web pages since it allows the Web browser to communicate with the http server in the background This reduces the usual constant reloading of pages and images when interacting with the web server Relays The LP3500 has a relay whose control through the RabbitWeb interface is governed by the relaySetup relayLabels relayStatus and relayOutUpdate function calls You would simply change the name or add additional labels to relayLabel1s to match the relays on your specific board int relayLabels web relayLabels select Relay One Digital Inputs The control of the 16 digital inputs through the RabbitWeb interface is governed by the digInSetup digInLabels digInStatus and digInUpdate function calls You would simply change the name or add additional labels to digInLabel1s to match the relays
Download Pdf Manuals
Related Search
Related Contents
Pioneer VSX-515 User's Manual CM-980F-SF_DE_JUNI 2012 Benutzerhandbuch Sunalyzer Samsung SGH-F490V User Manual International Carbonic Big Fella - Soda HP 2500C User's Manual Solieque VT3122BLG.4.HDSOL,DSOM,DSOM Installation Guide Copyright © All rights reserved.
Failed to retrieve file