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.

CR Basic Editor could not compile program


Bertholon Apr 27, 2016 08:40 AM

Hi,

I'm writing to you because I have 2 problems with CRBAsic that I can't solve and actually I don't understand :

- First : when I try to compile the program the CR Basic checking Errors tell me  : "Could not find Status.IPInfo(1)" . Previously I never had some prob with this instruction.

Could you tell me where this error could come from ?

- Second, separatly from the first program, when I try when I try to compile the program the CR Basic checking Errors tell me  : "Could not compile the program" without any errors in the CR Basic checking errors

Could you tell me where this error could come from ? It appears on several programs...

Tell me if you need the program.

Thank by advance.

Regards

A. Bertholon


rlwoell Apr 27, 2016 12:22 PM

I had a "Compilw Failed" with the new editor on a program that had compiled on the previous version.  No error message was given to help find the error.  I found that if I had sampled the same data twice in a DataTable, the compiler rejected it.

I had been sampling the same data twice to hold a place in the data file that an Excel macro used to process the the data.  In my case I just added a dummy variable as the place holder.

The code below fails because the sampling of LoggerBattery is in DataTable twice.

DataTable(Hourly,True,2)'<-- Began using 140814.1459.
   DataInterval(0,1,Hr,0)
   CardOut(0,-1)
    Sample (1,LoggerBattery,FP2)
    Sample (1,Inst_Box_RH, fp2)
    Sample (1,Engine_Hours,FP2)
    Sample (1,LoggerBattery,FP2)
    Sample (1,Cab_Pwr_Feed_V,FP2)
EndTable

Remove one occurance and it compiles correctly.

My original program was quite large and I found the error by chopping out sections of the program and compiling it again.  After removing 100's of lines of code, it compiled.  I then had a smaller section to work with to find the offending code.

With the new release of the compiler, there is a file listing the changes to the software.  Check to see if there is something about the the other error you are getting.


JDavis Apr 27, 2016 02:55 PM

As we come out with new operating system versions for dataloggers, we make the compile catch more programming errors. It is stricter rules enforcement to protect users from the problems caused by breaking rules.

For example, a data table can't have two columns with exactly the same name. It would cause data collection and processing problems. The Fieldnames() instruction could have been used after the second Sample instead of creating a dummy variable.


Dana May 2, 2016 06:55 PM

In OS 28, we made some changes where we tried to be better organized about putting Settings in the settings table and Status info in the Status table. In this change, the location of IPInfo was changed. Not all fields in the datalogger Settings are accessible using the data table access syntax, and IPInfo falls into that category.

However, we did add an instruction to the OS called IPInfo. If you have the latest version of the help & DEF files for the CRBasic Editor, you will see this new instruction in the list. If you do not have these files, you can install them by downloading and installing the files for the latest operating system to your computer. When you run this executable, it puts the OS on your computer so that you can download it to your datalogger, but it also updates the precompiler, help file, and DEF (instruction definition) file for that particular datalogger in the CRBasic Editor.

Best,

Dana

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