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.

[CR200X] reading data with perl


lbrutti May 29, 2013 08:55 AM

Hello, i'm reading data from CR200X with this Perl script http://pastebin.com/wV2zFXpG.
Everything would be fine, but, when re-launching the script, the logger gives me the last 6 records since the last call.

I.E.:
first call gives me logs number: 12,11,10,9,8,7
second call gives me logs number: 6,5,4,3,2,1,0

If I open minicom on the same port and quit, the port get cleaned properly.

how can i clean it on leaving the script?


thanks
Lorenzo

* Last updated by: lbrutti on 5/29/2013 @ 7:13 AM *


Sam May 30, 2013 02:49 AM

It looks like you are running back to back queries for the same table. The CR200X is picking up where you left off with the query. One way to reset the pointer is to query a different table, for example 4 for Status or 5 for Public. Then start your query again with 6.


\r\r\r\r\r to get CR2XX>

6\r to get T0 record from table1
6\r to get T-1 record from table1
6\r to get T-2 record from table1
6\r to get T-3 record from table1
6\r to get T-4 record from table1
6\r to get T-5 record from table1

4\r to get status table

6\r to get T0 record from table1
6\r to get T-1 record from table1
6\r to get T-2 record from table1
6\r to get T-3 record from table1
6\r to get T-4 record from table1
6\r to get T-5 record from table1


lbrutti May 30, 2013 07:13 AM

Sam, i will be grateful for the rest of my life :D

thank you!
everything works fine now!

thank you very much

Lorenzo


salim Feb 14, 2020 01:54 PM

Hello every body,

i'm a student working on a project  with a a datalogger CR200x.

i tried pbcdl_comm library and i have the same problem, i always get a messy data.

i ve heared here about a perl script that can allow getting data from the datalogger.

i can't get ithe script once i enter in the website :  http://pastebin.com/wV2zFXpG.

i would be thankful for your help

best regards


lbrutti Feb 15, 2020 04:59 PM

Hello Salim,

here's the script originally put on pastebin: https://www.dropbox.com/s/y8h16ht6rch66yx/CR200X_min10.pl?dl=0

I have't touch it for 6 years, hope it works ;)

Let me know if it helps you


salim Feb 17, 2020 11:34 AM

Hello Ibrutti,

thank you so much for your answer, i get the script.  now i m just waiting for the CR200x Datalogger to test it.

once done, i let you know.

Best regards


SJ Feb 27, 2020 05:21 AM

Hello Ibrutti

I am trying to use the perl script you suggested on CR300 series but after initial handshaking, script terminates. The handshaking data is also garbled data. Can you suggest what might be the issue? Also, it will be a great help if can you please suggest how can I put my device in terminal mode? 

Thank You.


lbrutti Feb 27, 2020 09:44 PM

Hello SJ,

sorry, I don't mantain that script anymore...hope someone from Campbell Scientific support is reading this thread ;)


SJ Feb 27, 2020 10:35 PM

Thank You Ibrutti for the prompt response. 

Is there anyone here who can suggest some resolution to my query.

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