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.

Difficulty in understanding CRBasic Program for CR1000


rajabadsha Sep 20, 2010 03:33 PM

Hi,
I am a VB.NET programmer and I recently started doing some project on CRBASIC. I found this language very tied to the machine upon which measurements are made. Can anyone advice me what would be a suitable way to understand this language.
Thanks


dberdes Sep 20, 2010 04:48 PM

You're kidding, right?


kirving Sep 20, 2010 06:04 PM

I think it's a legitimate question. CRBasic is getting very close to what I would call a pascal-like language, Visual Basic being another, with support for named variables, arrays, subroutines and functions, various control structures, etc.. But while VB and other general purpose languages are intended to run on general purpose machines, CRBasic runs on a special purpose machine, the various Campbell Scientific loggers.

Fundamental to the logger machine is the scan cycle or sequencing, reading inputs, executing program instructions, and writing outputs. To a large extent those details can be hidden from the programmer, but for non-trivial programs or to get high and robust performance, I think it's essential to be able to at least be aware of how the machine itself functions, if not to fully understand it.

My advice to the OP would be to study the manual for details about scanning, sequencing, interrupts, etc.., but I'm not sure all the details are there. In some cases there may be information in manuals for other loggers than the one you're using (there's little on SlowSequence in the CR1000 manual, but more in the CR5000 or some other one).

It might even be worth studying the older CR10 or CR10X manuals to get a feel for how those rather simpler loggers worked (and still do). I think those manuals were able to describe things more completely than can be done for the current generation of loggers.

The price of having no or limited understanding of the machine is ending up with skipped scans or outright programming errors (pulses not counted, tables not updated, etc.). I'd like to see more details on the inner workings in the manuals or appendices, particularly as things change with OS updates.

Finally, I'd suggest that the CSI loggers are very accurate and low-power programmable voltmeters. Details matter if you want to get the most out of the machine.


IslandMan Sep 21, 2010 10:27 AM

Another quick way to see a program and to try and understand the flow is by using Short Cut or PC200W to generate a program. Both of these are free downloads from this web site.


rajabadsha Sep 21, 2010 10:59 AM

Thanks to everyone specially to kirving for the valuable suggestions.

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