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 02: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 29, 2013 08:49 PM

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 01: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 06:54 AM

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 09:59 AM

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

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