Hi all,
I'm looking for a way to use an external file. My goal is to create a "generic program" for 20 Cr1000 and modify the parameters (calibration constants, ports used, etc.) in external files.
I'm thus looking for a way to use an instruction like the PHP "include()".
Thanks in advance.
Take a look at the CalFile instruction. From the help:
The CalFile instruction can also be used to write one or more stored calibration files to the datalogger's non-volatile flash memory. When the datalogger is powered up, all such files located in flash memory will be loaded into SDRAM memory, which can then be accessed by the program through the use of the CalFile instruction.
Let us know if that doesn't do it for you.
Janet
CRBasic also has an "Include" option as in the following:
Include "device:filename"
This instruction works like the C pre-processor #include directive and tells the compiler to include the contents of the specified file in the place of the Include statement. The downside to using this is the the program will not compile unless the file specified is present. This would mean that, for at least the first time, you would need to send at least two files to the datalogger before telling it to compile the program.