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.

Working with SerialIn


ccowin Apr 15, 2019 05:52 PM

Howdy,

I'm setting up a mobile weather station with the following components:

CSI CR310-Wifi - Datalogger

RM Young 32500 Electronic Compass w/ Serial Interface

RM Young 86000 Ultrasonic Anemometer

EE181 Temp/RH

I've gotten the Anemometer to interact through the Compass and it is providing an ASCII string through the RS232 port in the following format:

0474 0027 0000 0000 1896 0118 3467 0160

I've tried several different functions, but none have been providing me with any of the data that I can see going through the RS232 port via hyperterminal. I also used the SerialInChk function and it is saying that there is 0 bytes going in though the RS232 port.

Here is my code

SerialOpen (ComRS232,9600,0,0,1000)
SerialInRecord (ComRS232,Rawstring,0,0,0,352,00)
SerialCheckRS232 = SerialInChk (ComRS232)

I also tried the "Comportisactive" function and it was returning a -1 which I assume means there is something wrong with the SerialOpen expression, but I'm not sure what it would be.

Thanks for any input!


JDavis Apr 17, 2019 03:54 PM

 If the data string ends with both a carriage return and a line feed, you can use those to mark the start and end of string in SerialInRecord.

SerialOpen (ComRS232,9600,0,0,1000)
SerialInRecord (ComRS232,Rawstring,10,0,13,SerialCheckRS232,00)

 


ccowin Apr 17, 2019 04:39 PM

I had an email conversation with Brad Althouse and we narrowed it down a bit, although has not been resolved. He had me connect the CR310 through USB to use the Terminal Emulator in Device Config Utility. We were unable to get the terminal emulator to receive the data that I could see going to Hyperterminal with the same cable and wiring.

So right now I think the issue lies in SerialOpen not actually opening the port or a faulty RS232 port. Going to try and use another data logger to see if that is the issue.

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