Fixed a bug in Select Case which resulted in incorrect evaluation of the Case statements. The problem was dependent on the state of memory.(Significant!)
Fixed possible source of skipped scans when using SDM instructions, SerialInRecord, or SerialOutBlock simultaneously in multiple sequences. The event used to synchronize measurement and processing in PipeLine Mode was being used in Sequential Mode and slow sequences. The synchronization is not needed in these cases because the acquisition code is called from processing. The problem was that the event was cleared prior to calling the acquisition code. If multiple threads (slow sequences) were using the event the possibility was present that the event could be cleared just after being set and prior to being recognized. This left a thread hanging until it timed out. This caused skipped scans. The fix was to only set and wait for the event if in PipeLine Mode in the fast scan. This added additional checking for the condition. This changed all SDM instructions, SerialInRecord, and SerialOutBlock. (Significant)
Added AVW200() instruction.
Added function FileTime(FileHandle). Returns file creation time as seconds since 1990. If the function fails it returns -2^31.
Added function FileRename(old_fname,new_fname) where the file names are strings. Returns TRUE if successful and FALSE if not. If no drive is specified CPU: is assumed. If the drives are different the file is moved to the new location and the old file is removed. If the new_fname already exists then FALSE is returned.
Added bit shift operators >> and <<.
Added a new mode to DisplayMenu to not show the system menu at all. This is done with AddToSystem parameter code -3. Security level 2 is used (same as setting variables from other display menus).
Added Range code MV2500C (MV5000C in the CR3000) which works like other open detect range codes but sets the excitation to full scale DAC (~2700mv for CR1000, and ~5200mV for CR3000) so that bridges will return a value > 1 if the bridge is open. Also added CR3000 range code MV1000C (sets excitation to ~1200 mV).
Added a check for empty DisplayMenu ... EndMenu, and empty SubMenu ... EndSubMenu. These were crashing the pre-compiler.
Added checking of security code before allowing variables to be changed in custom menus.
Added checking all Table instructions to make sure they are not used in conditional statements. Also, added checking to catch DataInterval occurring multiple times in a DataTable..EndTable.
Changed Security so that if it is set to -N, then it can be unlocked with 65536-N or with (-N AND 65535).
Changed Keyboard/Display security so that the Settings can be viewed (not changed) at the same level of security as viewing data tables.
Allow security parameter in communication instructions to be a variable or expression.
Fixed http (WebPageBegin/WebPageEnd) set value command when security is active.
Changed http security to be compatible with PakBus security.
FTP access to program files is restricted if security is active. Appending Admin to the username and the highest level of security to the password will allow program file access.
Mapped EX1..EX3 as predefined constants just like VX1..VX3. This matches the labeling on the datalogger wiring panel.
Changed Timer function to use "system time" as its reference. This eliminates issues with being called outside Scan...NextScan, and being called from subroutines etc., and allows timing within scans (with 10mS resolution) without disabling low power standby.
Fixed TimerIO edge setup. If setting for falling edge the adjacent channel in the pair shared by the internal register was setup instead of the desired one. The pairs are (1,2), (3,4), (5,6), and (7,8).
Enhanced Constant Table editing to include Alias declarations.
Changed Const to release the memory used for the expression after the constant is resolved.
Changed Data and DataLong to allow expressions. Expressions must evaluate to a constant.
Fixed passing constant strings in subroutines. The size of the string was not correctly evaluated if it was not a variable.
When declaring aliases make sure they are not predefined (or user defined) constants.
Don't increment Pipeline mode background calibration skipped scans while synchronizing the main scan to the scan interval.
Fixed If statement uninitialized variable passed into expression evaluator. This caused possible varoutofbounds errors if using a variable string in the expression.
Changed FileManage so if a variable is used in an expression to always evaluate the expression and check the operation. Also, changed checking of Run Now attribute to allow all drives (this fixed a problem where the logger could be left without a program to run).
Fixed Median with reps > 0. When the end of the table was reached data was being written beyond the end pointer causing possible watchdog errors.
Changed SendData, and SendTableDef to not be allowed with Hidden tables and to use the mapping of table ids that is sent to LoggerNet rather than the datalogger internal table id. This was required so that LoggerNet would only receive one way data from tables that it has in its table definitions and that map correctly to the id it associates with the tables.
Fixed a rare memory corruption bug caused by calling memory allocation routine requesting 0 bytes. The memory is checked two ways and if memory lined up just right the allocation of zero bytes caused the two passes to give different results for the number of unallocated blocks. This resulted in a mem fail3 error.
Fixed file download of OS to handle the case when there is not enough memory to store incoming OS. The memory was 1) being corrupted by the first packet that would not fit, and 2) was not being released after the failure was reported back to software.
Changed OS shutdown code to make sure pulse width modulation (PWM)is disabled.
Pulse width modulation (PWM) works with duty of 1.0 and 0.0.
Removed the edge parameter from the pulse width modulation (PWM) instruction. Not needed because inverting the edge is the same as 1 - duty.
Changed serial talk-through to not wait the full 100mS for characters from terminal mode. It now polls to see if a character is already present.
Changed serial talk-through mode to exit after receiving 3 ESC characters instead of 3 characters.
DNP3 implemented the object 40.4 (double precision), and fix a bug for variable slave address and master address. The addresses were being checked at compile time before they had valid values in them.
Changed DNP3 to make slave address a variable.
WebPageBegin/WebPageEnd: Added command=PakBusAddress. This command returns the next PakBus address, equal to or greater than 100, that is not contained in the datalogger?s routing table or neighbor list
Changed web page functionality to not hard code the content type in the header. This allows other font types to be used.
Fixed web page functionality to send out head and body tags, without which the Newest Records page will not refresh every 10 seconds.
Changed SMTP EmailSend so that larger attachments can be sent.
Fixed servicing multiple sockets using the same protocol (HTTP, TELNET, MODBUS, SMTP, POP3) concurrently.
Changed FTP Server to be more efficient such that errors writing to slow media due to out of buffer space, e.g., the CPU FLASH memory, are minimized.
Changed FTP so that it cannot read a hidden file.
Expanded hidden file support by not allowing a file that is hidden to be open for reading. Previously, hidden files were simply hidden from the directory.
If the routing table has been reset, then immediately try to find a neighbor on all PakBus TCP connections.
If a neighbor has not been established on a PakBus TCP connection, then attempt to find one through a Hello Request every 10 seconds.
Fixed DNS setting entry when attempting to delete existing entries.
Fixed PPP so communications can be throttled down during large file transfers in order to protect buffer memory.
If the PPP dial string is PPP, then act as a PPP client but bypass the AT command dialing operation, to be used when the Raven modem is setup for PPP.
Changed response to FileUpload and FileDownload when the file cannot be opened to "file not currently accessible". Previously insufficient memory code was returned.
Changed FileClose() to return EBADFP (17) if the file handle is not valid, instead of 0.
Changed ComME and Com310 set up as PPP to not shut down after timeout when rung up.
Changed the ^ operator to always return a float even when the operators are longs.
Changed Ln(X) when X is NaN or X <= 0 to return NaN instead of 0.
Fixed FileSend() so that it closes the file if the communication fails after a timeout.
Fixed attempt to read a hidden file so that a file handle is not left open.
Changed Delay to allow variable for interval if delaying processing.
Changed removing a neighbor who advertised that a modem was attached to not remove all the other neighbors on the comport.
Fixed GetDataRecord() to send the correct signature, used if the table id parameter is not or'd with &H8000.
Changed the response to a one way data packet to ignore it instead of responding with a PakBus delivery error.
Fixed niche stack domain name look up when the name is longer than 30 characters.
Fixed SortSpa and Median to deal with NAN's, and +/- INF. NAN will be sorted to the top of the array (most minimum values).
Fixed PortGet in Sequential Mode in slow sequence.
Fixed PulseCount memory allocation when using all 10 Pulse channels (2 PC, and 8 control ports), with individual instructions for each.
Added the CRBasic '&' operator that concatenates strings, which is compatible with Visual Basic.
Fixed TGA to handle signature of zero with valid data. When good data resulted in a signature of zero the logic to detect the non-zero data was incorrect and resulted in NAN being stored for good data.
Fixed custom collect of tables when some tables are hidden by returning the correct table ID.
Don't truncate table names in the tablenames field of the status table.
Changed Keyboard/Display Realtime Data display to deal with final storage read pointer not on a 4 byte boundary. CR1000/CR3000 can deal with reading and writing to 4 byte values that are not 4 byte address aligned, but the CR5000, and CR9000 crash (watchdog error) in this situation.
Changed table to table sampling to accommodate the CR9000. The upper bits of a address (pointer variable) were being used to pass information. This will not work in the CR9000 because the upper bits are needed for the address.
Fixed subroutine passing longs and floats to strings. The conversion to string was not correct.
Fixed converting parameters of different data types when entering subroutines. Since the parameters are copied upon entering, if the declared parameters are different data types than what was being passed, the parameters must be converted to the new type. There were cases where this conversion was not correct.
Translated NAN when converting from floats to integers and integers to floats.
Fixed setting time before the first background slow sequence completes. This was causing background gains to be wrong which in turn caused measurements to be converted to mV incorrectly. This was only a problem if the time was set within 90 Sec (worst case) after starting a program.
Fixed converting Long NaN to strings.
Histogram4D - if all 4 dimensions are used then the output will be linearized. Since the OS only keeps 3 dimensions internally, the output must be linearized to successfully pass the tabledefs to LoggerNet.