Author Topic: Looking for someone knowledgeable in Campbell Scientific CRBasic  (Read 4905 times)

0 Members and 1 Guest are viewing this topic.

Offline DaleReid

  • Forecaster
  • *****
  • Posts: 2026
    • Weather at Eau Claire, WI
I have been given some code that was custom written to have a Campbell Scientific CR300 read several sensors and then encapsulate the data table, and send it out over the RS232 port to be read by a WeeWx driver.

I'm modifying it for my own sensor packages, and then running it on a CR1000 to do the work before sending it to the WeeWx.

There is a piece that does the main tweaking, and what I'd like to do is find some way of seeing what the CR1000 is actually picking  up, and formating to send over the Com Port.

Is there a way to look at the data string coming out of the CR1000, like watching it with TerraTerm or PuTTY?  I know that there is a 'terminal' part of the PC400 software, but can't seem to get it to display the output as I was hoping.

when I fiddled with the RMYoung 28600 which I had generate an output string with the values I needed, the concatinate the string, I could 'watch' the output by attaching TerraTerm to the com port and seeing line by line the output.

Here is the basis of the code that I want to watch:

' send to PC
    GetRecord(OutString,WeatherData,1)
    OutString = Mid(OutString,1,Len(OutString)-2)   
    OutString = "<" + OutString + ">"       
    SerialOut (COMRS232,OutString + CRLF,"",0,0)

  NextScan


I might not have something set up right, which is the whole point of testing, but can't seem to watch the output.
Is there something in PC400, or should having TerraTerm attach to the com port and watching work as I would like it?
Dale

PS. Enormous thanks to Craig Young, Crystal Lake Observatory for sharing the relavent parts of his working code.
Dale
ECWx.info
&
ECWx.info/t/index.php

Offline TheBushPilot

  • Senior Contributor
  • ****
  • Posts: 191
Re: Looking for someone knowledgeable in Campbell Scientific CRBasic
« Reply #1 on: July 24, 2024, 12:06:35 AM »
Dale:

You can monitor the com ports with the Dev Config terminal.

Connect to your CR1000, select the terminal tab, press enter a few times to prompt the CR1000> entry, then send W. From here you can select which com port you would like to monitor. Entering the listed number for the com port prompts you if you'd like to convert the ASCII data, enter Y. From there it will read what's being sent or received on that particular port.

 [ You are not allowed to view attachments ]

Hope this helps - I think this is what you were looking for.


Cheers
Met Instruments Project
Station Work In Progress...

Offline DaleReid

  • Forecaster
  • *****
  • Posts: 2026
    • Weather at Eau Claire, WI
Re: Looking for someone knowledgeable in Campbell Scientific CRBasic
« Reply #2 on: July 24, 2024, 12:16:47 AM »
Exactly the info I was looking for!

Just a question more; how did you find out how to do this?  I thought I read a bunch of stuff, but never came across the option and how to use it.

I was thinking that some of the video tutorials CS has on line would have something like this, but didn't see anything.

Thanks again for sharing the information but also details on the way to get to it.  Dale
ECWx.info
&
ECWx.info/t/index.php

Offline TheBushPilot

  • Senior Contributor
  • ****
  • Posts: 191
Re: Looking for someone knowledgeable in Campbell Scientific CRBasic
« Reply #3 on: July 24, 2024, 12:37:47 AM »
I believe I found the info on one of Campbells forums. I was actually trying to troubleshoot the serial communication similar to you a few months ago. :lol:

And not a problem, always happy to help. [tup]


Cheers
Met Instruments Project
Station Work In Progress...

 

anything