Added Conditional compilation with #if, #elseif, #else and #endif. All expressions must evaluate to constants, but can use constants already declared.
Added Predefined Constants: CR1000, CR3000, CR800, CR5000, and CR9000X. Also added predefined constant LoggerType that will be set to the same value as the corresponding constant for the respective logger type. This allows the conditional compilation to work across logger types (one program can run in multiple logger types). Example: #if LoggerType = CR3000 const MYRANGE = MV20 #else const MYRANGE = MV25 #endif)
Added FileList function.
Added FileCopy function. Works like FileRename (when different drives are specified), but the source file is not removed.
Fixed GetRecord() when there are no records stored in the Data Table source and when one or more of the fields in the Data Table are of type String and when the destination array is not of type String. In this case, GetRecord() writes beyond the bounds of the destination variable array.
Changed RealTime(X) to allow X to be declared as type LONG.
Changed Round() function to be perfectly symmetrical.
Fix WindVector using aliases.
Added checking in WindVector of NaN due to sqrt of very small numbers < 0.
Changed GetDataRecord() to accept a large (>1000 bytes) record.
Changed SerialOutBlock so that when using SDM-SIO1 it can run in the digital task sequence along with other SDM instructions.
Changed NSEC data table field so that if the source is a float, it must be dimensioned >= 7 to avoid using incorrect values for the source.
Changed SerialClose(comport) in the case that comport is a TCP socket, in which case it will close the socket instead of corrupt memory.
Changed GetRecord to give out of bounds warning, and not proceed if destination array is not large enough to hold data.
Added a method to access data via a time stamp instead of record number. In GetRecord(Dest,TableName,N) and TableName.FieldName(M,N), if N is negative, it references a timestamp of Secs Since 1990.
Fixed Replace, Mid and other string functions when one of their parameters other than the first is an expression that includes a string function.
Fixed the CHR so that it does not use excess memory.
Fixed TimeIntoInterval() in the case when the clock was set backward the function returns true on the first instance of the time into the interval is TRUE.
Changed SerialClose() so that if the comport is Com1..Com4 it will remain active for PakBus communication.
Fixed comms instructions (PakBus and ModBus) to return a correct result code if the parameter included a variable index into an array.
Change SendData, and SendTableDef to send the non-hidden id mapping if the special string ".secured" is found after the tablename. This allows users who want to allow some users to see tables and others to not see tables (via security) to still be able to use SendData. If the .secured is not present then sending a hidden table results in a compile error. The user is responsible to program the correct PakBus address so that the table definitions LoggerNet has match up with the mapping used (e.g. If using .secured then LoggerNet should have security enabled when it retrieves the table defs).
Changed Network(ResultCode) instruction so that ResultCode can be of type LONG.
Fixed Move() instruction to work when the destination array overlaps the source array.
Fixed vibrating wire with reps > 1 and reps delay > 200mS. The task sequencer was using a loop to do the delay and the same loop counter for the reps.
Changed EmailRecv filters to ignore leading spaces.
Fixed SendData() when sending the Public Table to send the correct table id.
Changed DNP3: 1) fixed the problem during server shutdown and restart 2) fixed a bug for drop application layer packet. 3) separated link layer and application layer to different tasks 4) fixed bugs for new 300 packet version. 5) fixed memory leak 6) fixed event callback 7)Fixed communication issue with keepserver 8) fixed write problem 9) prevented losing events sometimes 10) removed timeout for linktimer when application packet comes in. 11) fixed a bug for converting floating 0 to double 0.
Changed PPP so that if the comport interface or the user name or pass word are changed via program control, do not recompile.
Changed PPP IPCP so that if we have not obtained a peer IP address by the time we bring IPCP up, we set the peer address as the same as our own. This allows us to connect with a new network that was previously un-connected.
Changed PPP connection initiation so it no longer waits until program compile is complete.
Fixed PPPOpen() so that it allocates the right amount of memory for itself.
Improved TCP/IP and PPP: limited the number of packets allocated for incoming data. If too much coming in, it throws it away. Previously, if all of the packets were used the internal function panic() forced a watchdog.
Improved PPP connect negotiations by removing check for loop back on Magic Number NAK's.
Improved TCP and PPP shutdown before OS recompile.
Improved PPP dialing so when changing PPP dial and/or dial response via SetSettings(), if both the current and the new are not NULL, then do not force a recompile.
Fixed using PPP on com1..com4 such that re-compiling will not disable the control ports being used as a comport.
When changing PPP or IP settings via DevConfig, disconnect PPP before recompile.
Changed PPP and DialCallback() dialing so that ';' in the DialString following a ';' adds a 1 second pause.
Changed dial string in ModemDial(), ModemCallback, PPP such that if it is not prefaced with "AT", then preface with "ATDT" instead of "ATV0;ATS7=180;ATDT".
Fixed measurement issue when running in sequential mode and making measurements outside of a Scan..NextScan in a slow sequence. Occasional NAN's showed up in the measurements because Analog Power was switched off. The problem only showed up in the CR3000 (because of the additional speed).
Fixed PeriodAvg measurement to avoid conflict if timeout occurs at the same instant that the number of cycles are measured. If both occurred simultaneously there was a chance that the task sequencer could be called twice when it should only advance once. This could cause memory corruption or timestamps to advance incorrectly.
Stopped slow processing when pausing program execution (stop without deleting data). If slow sequences were running in a loop and not in a scan..nextscan they were not stopped, only the scan was stopped.
Fixed slow sequence skipped scans getting incremented when the main scan stops due to running its required number of scans.
Fixed PipeLine mode background slow sequence not getting shut off when there was not enough time for the slices to be done. The warning message was correctly displayed at compile time, but when the scan started the slow sequence was not correctly getting disabled. In the case tested this resulted in the first measurements of the main scan returning erroneous values. This was only an issue if you received the warning about background calibration being disabled.
Change AutoRange measurements to delay the user specified settling time prior to the range determining measurement and then again prior to the real measurement. The exception to this is when doing Reps on the same channel with auto-ranging. This case gives about 450uS between range determining measurement and the actual. The user settling time for reps on the same channel (channel < 0) determines the sampling interval. This functionality is maintained for auto-ranging.
Fixed sampling interval (set with the settling time parameter) for reps on the same channel when doing 1/2 cycle integration (_50Hz/ 2500mv or 5000mv and _60Hz/ 2500mv or 5000mv). The delay between measurements was not correct. Also fixed reps on the same channel for reverse excitation and reverse differential measurements.
Changed excitation shutoff after bridge measurements. The excitation is set to zero (while still selected) wait 10 uS then de-select the excitation. Previously, the excitation was de-selected then the DAC was set to 0. This allowed the external excitation to float (or be pulled if loaded) down. This change was made to avoid asymmetry of excitation for bridges.
Fixed Pipeline mode slow slicing problem where measurements were still being sliced when the fast scan interval was due to start. This caused memory corruption.
Removed AC excitation asymmetries which resulted in certain sensors being polarized.
Fixed calling subroutines with a variable indexed string array.
Fixed comms instructions when called from a subroutine running in a different sequence than where they are declared in the program.
Fixed IfTime(), WorstCase(), and Timer() functions to use the correct timestamp when called from a subroutine.
Improved wizard for FieldCal: if reps is a constant it must either be 1 or the size of the measurement array for wizard to work properly. Other size will now give compile error. Added checking to make sure valid options are used for FielCalStrain.
Updated Custom menu: 1) don't leave '>' at end of line, if no sub menu, when scrolling. 2) Fixed mode -3 to not show the initial screen at startup. 3) Fixed to correctly show long strings in pick lists. 4) Improved to allow variable names to be string variables.
Changed TableFile 1) make sure the card bytes free is correct before verifying that the files will fit. 2) initialization of the current file number when first starting up is fixed. 3) When time to output and no records have been stored,don't create empty file and return 0 in result param.
Fixed ModBusMaster was using wrong baudrate when the comport is a variable. - Improved ModBusSlave: 1) Skips servicing any requests during program compilation else we could get Variable out of bounds errors. 2) Optional start register offset is initialized correctly at compile time if possible to initialize (for TCP). 3) Allowed to return an odd number of registers as 16 bit values.
Fixed SDMSW8A when incrementing the multiplier pointer via the () syntax and not returning the state of the port the multiplier was not "repping". The increment was taking place outside of the reps loop rather than each time through the loop.
Fixed Terminal TalkThru to SDM-SIO1 comport so that it does not corrupt memory.
Fixed compiler crash caused by invalid source parameter in SDMCD16AC.
Changed SDMSIO4 to remain at the same priority level when running the acquisition code.
Change SDMGeneric to handle destination type string when numvalues > 1 and bytes per value = 1, to not give out of bounds error at compile.
Changed SerialInRecord: 1) Fixed SDMSIO1 to set filled flag when buffer is filled, previously, would sometimes report erroneously "NO DATA". 2) Fix when both start and end sync words are 0 and when getting most recent record. 3) fixd when SyncChar and NBytes are both non-zero so that records are not missed. 4) When expected number of bytes (or size of SerialOpen buffer if bytes in = 0) is odd. Any SDM input instruction (or another SerialInRecord) that followed one with odd bytes would have a mismatch between where the data was stored and where processing thought it was.
Changed SDI12Recorder(): (1) store NAN into a string variable correctly and (2) fixed a possible problem on the first measurement if the destination variable is referenced with a variable index into an array. 3) storing into an array of strings fixed to not skip by 4. 4) Storing into a single string changed to store the literal string returned by the Sensor in response to the D! command, excluding the cr, lf terminator. 5) If the command terminator '!' is not present in the command parameter, then a measurement command will not be issued, even though it will still pick up the data when it is due from a previously issued "C!" command. 6) when loading a value that is out of range or NaN load up 9999999 instead of 99999999 (one less digit). This is what the spec requires.
Changed SDI12Sensor to handle retries of the 'D' commands. This was done by loading up the entire response in a buffer and then returning the appropriate string. Also, improved handling case where requested data is out of bounds of the source array.
Added REST command support in FTP Server.
Changed FTP Server to delete a file first before opening it for writing.
Fixed multiple instances of FTPClient() to work correctly.
Changed Status SlowScan fields so that"System" scan information is added and the numbering of the Slow Scan info follows the order of entry in the program.
Changed Status such that if there are no DataTables and/or no Slow Sequences, their respective fields are eliminated.
Changed Status.CommsMemFree such that the display is LargePktsFree * 1000000 + MiddlePktsFree * 1000 + LittlePktsFree.
Changed Long &H80000000 (NAN) to be stored as FP2 -7999 instead of 0.
Changed +INF float to be convert to string as "+INF" instead of "INF"
Changed Float to Long +INF converts to most positive integer instead of most negative integer.
Changed WaitDigTrig: 1) don't allow different edges to be used on same port. 2) fixed getting a false trigger when starting up a scan.
Improved Sampling of TableName.TimeStamp into a field of type NSEC to give the full resolution of the timestamp instead of only second resolution.
Changed Time of Maximum and Time of Minimum, to use the timestamp of the sequence that calls the table, not necessarily the main scan's timestamp.
Improved so if out of memory errors occur when creating tables, stopped the task and let software get the error. Don't continue running or system may crash. This will occur if variables are too large to fit in memory.
Reduced the amount of memory consumed by variable declarations.
Changed retrieving the Directory via BMP5 such that when small fragments are requested, it only calculates the card bytes free on the first fragment and thus is much faster when a card is present.
Fixed illegal units declaration from crashing the pre-compiler.
Changed precompiler to write the tdf file to the same directory as the program file (if using the -z command line option).
Changed precompiler -l and -z options to accept full path name with files as well as filename only. If only the filename is passed in, it is opened in the same directory that contains the CRBASIC program file.
Changed UDPDataGram() to work between two dataloggers.
Fixed PakBus routing to use a Static Route if necessary when forwarding a message.
Fixed Case statement to work with functions that have string parameters.
Fixed an erroneous "Variable out of bounds." message when strings are used inside expressions.
Fixed expression that is Long + String or Long & String.
Fixed RS-232 power always on setting so that it will, under all conditions, keep the main CPU awake to accept the first incoming characters. This requires more power, but ensures that no bytes will be dropped due to waking up hardware.
Improved to not require space between If and '(' or ')' and Then. Also applies to While and Select.
Fixed resolving the type of expressions using only table.field. This was found by DisplayValue when a type other than float was used.
Fixed spatial instructions, Sample and MoveBytes to work correctly with an array of TableName.FieldName data.
Fixed const strings. To conserve memory a change was made to release all constant expression memory after the constant was resolved. The problem with this was that string constants were using the expression memory space as the location for the string. A pointer to this location was later used to resolve references to the constant. With the memory freed the desired constant was no longer there. This was fixed by allocating new memory for the string alone, then the string is copied into the new memory and the expression memory released.
Fixed asynchronous (RS-232, and CS I/O ME) communications locking up. This occurred at high baud rates when comms were disrupted and then reestablished. When processing of packets was disrupted several bytes were received and required processing. Since the packet start was not detected the bytes are processed such that all ASCII chars are sent to terminal mode and non-ASCII cause a new service to be requested. This processing required more time than the 10 mS tick. The fact that the flusher was held off too long caused the input DMA stream to count down to zero, which resulted in an interrupt. The interrupt shut off the incoming stream to allow the processing of bytes to catch up. This all worked fine, but after the error condition caused data to stop, the flusher did not get things going again. Changes were made to reduce the time processing the bytes, but this error condition is still possible. The recovery from the condition is now handled correctly by the flusher.
Changed return code for file download when disk is full or root directory is full (no more files can be created). The error code will now be out of resources instead of inaccessible file.
Changed formatting drives and deleting files to nullify the powerup and run file if they are set, but the files do not exist.
Allowed expressions of length greater than 256 to compile correctly.
Fixed possible packet leak in DHCP if it has an error condition.
Changed receiving an OS file to detect wrong type or insufficient memory near the beginning of the download process.
Fixed router so it does not shut off a comport through which it is routing out but there have not been any in coming packets due to PleaseWait messages.
Changed Default Settings to restore ComME and ComRS232 to -115200 K baud.
Improved TimerIO so any non-zero interval < scan interval is now set to a timeout of 1 scan. Previously the interval had to be at least 100uS before it was set to 1.
Changed TDR100 cable length parameter to accept variables and also to allow "repping" through multiple cable lengths if the () syntax is used with an array.
Improved checking so when adding a variable it is checked to see if it is already used as an alias.
Added table definition output command line option to pre-compiler.
Fixed code that allows for concurrent retrieval of table definitions by multiple clients.