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
You're kidding, right?
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.
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.
Thanks to everyone specially to kirving for the valuable suggestions.