Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Xbee Serial Com and CR1000 help


Joeyp Oct 30, 2014 08:12 PM

Hi!

Thanks for reading this! I have been working on this for a few months and would like any kind of guidance or advice.

Background:
I am trying to develop a simple control system that will turn on a humidifier when there is low %humidity detected in a room. A Campbell CR1000 Data logger is collecting humidity data in the room continuously. I need some way for the serial coms on this data logger to send information to my Arduino within the humidifier. I need to send a time stamp and other serial data to com port 1 then wirelessly to my computer/controller.

Parts:
2- Xbee WRL-10421 - XBee Pro 63mW Wire Antenna - Series 2B from Sparkfun
https://www.sparkfun.com/products/10421

1 – Xbee Explorer hooked up to my computer to receive the data.
https://www.sparkfun.com/products/11812

1 - Voltage regulator for the xbee
https://www.sparkfun.com/products/11373


Xbee configuration as follows

Router ----- interface with the computer
Modem XB24-ZB
Function Set - AT Mode Router
PanID-1221
JV-enabled
DH-Serial # High of Coord
DL-Serial # low of Coord
Baud rate set - 115200
Remainder left as default settings

Coordinator ----- interface with the CR1000
Modem XB24-ZB
Function Set - AT Mode Coordinator
PanID-1221
DH-Serial # High of Router
DL-Serial # low of Router
Baud rate set - 115200
Remainder left as default settings


I have the Xbee and voltage regulator breakout board are attached to the COM1 of the CR1000. Below is the code I am implementing
Public rTime(9) 'declare as public and dimension rTime to 9
Alias rTime(1) = Year 'assign the alias Year to rTime(1)
Alias rTime(2) = Month 'assign the alias Month to rTime(2)
Alias rTime(3) = DOM 'assign the alias Day to rTime(3)
Alias rTime(4) = Hour 'assign the alias Hour to rTime(4)

'Main Program
BeginProg
'Set up communication ports to send and receive data

SerialOpen (Com1,115200,16,0,100)
Scan (1,sec,0,0)
RealTime( rTime )
If TimeIntoInterval (0,1,Sec) Then
SerialOut (Com1,Hour,"",1000,0)
EndIf
NextScan
Endprog
------------------------------------------
The Xbee is configured in TTL (RS232 Port not usable on CR1000) as follows:
115200 baud Rate
No flow control
8 data bits
No parity
1 stop bit.

The CR1000 is configured as follows --- CR1000 is programed at 115200 baud at initial set up :
TTL Logic;
No parity,
one stop bit,
8 data bits;
No error checking;
PakBus communication can occur concurrently on the same port


When I view the data that is being sent, I only see “.”. From my understanding, the period is produced when the Xbee software (XTC-U) cannot intemperate the data being sent. I can use the loggernet terminal window to determine that ASCII data is being sent to the COM1 port, but I am not receiving it on the other end.

Things that I have tried
1) Changing the Serial port format
2) Changing Xbees
3) Changing com ports
4) I would like to keep the baud rate the same so I have not messed with that.

Any suggestion or inputs would be highly appreciated

* Last updated by: Joeyp on 10/30/2014 @ 2:24 PM *


Sam Nov 10, 2014 01:18 AM

sounds to me like you are not sending all the data commands needed to address the remote. you should connect both up to your pc and get that working first. use the XTC-U software to build up the type of message you want to send and make sure it is received on the other end. once that is working you can see what you're missing by snooping the serial traffic into the transmitter.

Log in or register to post/reply in the forum.