CR3000 OS 7

  1. 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!)
  2. 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)
  3. Added AVW200() instruction.
  4. Added function FileTime(FileHandle). Returns file creation time as seconds since 1990. If the function fails it returns -2^31.
  5. 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.
  6. Added bit shift operators >> and <<.
  7. 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).
  8. 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).
  9. Added a check for empty DisplayMenu ... EndMenu, and empty SubMenu ... EndSubMenu. These were crashing the pre-compiler.
  10. Added checking of security code before allowing variables to be changed in custom menus.
  11. 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.
  12. Changed Security so that if it is set to -N, then it can be unlocked with 65536-N or with (-N AND 65535).
  13. Changed Keyboard/Display security so that the Settings can be viewed (not changed) at the same level of security as viewing data tables.
  14. Allow security parameter in communication instructions to be a variable or expression.
  15. Fixed http (WebPageBegin/WebPageEnd) set value command when security is active.
  16. Changed http security to be compatible with PakBus security.
  17. 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.
  18. Mapped EX1..EX3 as predefined constants just like VX1..VX3. This matches the labeling on the datalogger wiring panel.
  19. 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.
  20. 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).
  21. Enhanced Constant Table editing to include Alias declarations.
  22. Changed Const to release the memory used for the expression after the constant is resolved.
  23. Changed Data and DataLong to allow expressions. Expressions must evaluate to a constant.
  24. Fixed passing constant strings in subroutines. The size of the string was not correctly evaluated if it was not a variable.
  25. When declaring aliases make sure they are not predefined (or user defined) constants.
  26. Don't increment Pipeline mode background calibration skipped scans while synchronizing the main scan to the scan interval.
  27. Fixed If statement uninitialized variable passed into expression evaluator. This caused possible varoutofbounds errors if using a variable string in the expression.
  28. 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).
  29. 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.
  30. 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.
  31. 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.
  32. 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.
  33. Changed OS shutdown code to make sure pulse width modulation (PWM)is disabled.
  34. Pulse width modulation (PWM) works with duty of 1.0 and 0.0.
  35. Removed the edge parameter from the pulse width modulation (PWM) instruction. Not needed because inverting the edge is the same as 1 - duty.
  36. 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.
  37. Changed serial talk-through mode to exit after receiving 3 ESC characters instead of 3 characters.
  38. 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.
  39. Changed DNP3 to make slave address a variable.
  40. 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
  41. Changed web page functionality to not hard code the content type in the header. This allows other font types to be used.
  42. Fixed web page functionality to send out head and body tags, without which the Newest Records page will not refresh every 10 seconds.
  43. Changed SMTP EmailSend so that larger attachments can be sent.
  44. Fixed servicing multiple sockets using the same protocol (HTTP, TELNET, MODBUS, SMTP, POP3) concurrently.
  45. 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.
  46. Changed FTP so that it cannot read a hidden file.
  47. 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.
  48. If the routing table has been reset, then immediately try to find a neighbor on all PakBus TCP connections.
  49. If a neighbor has not been established on a PakBus TCP connection, then attempt to find one through a Hello Request every 10 seconds.
  50. Fixed DNS setting entry when attempting to delete existing entries.
  51. Fixed PPP so communications can be throttled down during large file transfers in order to protect buffer memory.
  52. 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.
  53. Changed response to FileUpload and FileDownload when the file cannot be opened to "file not currently accessible". Previously insufficient memory code was returned.
  54. Changed FileClose() to return EBADFP (17) if the file handle is not valid, instead of 0.
  55. Changed ComME and Com310 set up as PPP to not shut down after timeout when rung up.
  56. Changed the ^ operator to always return a float even when the operators are longs.
  57. Changed Ln(X) when X is NaN or X <= 0 to return NaN instead of 0.
  58. Fixed FileSend() so that it closes the file if the communication fails after a timeout.
  59. Fixed attempt to read a hidden file so that a file handle is not left open.
  60. Changed Delay to allow variable for interval if delaying processing.
  61. Changed removing a neighbor who advertised that a modem was attached to not remove all the other neighbors on the comport.
  62. Fixed GetDataRecord() to send the correct signature, used if the table id parameter is not or'd with &H8000.
  63. Changed the response to a one way data packet to ignore it instead of responding with a PakBus delivery error.
  64. Fixed niche stack domain name look up when the name is longer than 30 characters.
  65. Fixed SortSpa and Median to deal with NAN's, and +/- INF. NAN will be sorted to the top of the array (most minimum values).
  66. Fixed PortGet in Sequential Mode in slow sequence.
  67. Fixed PulseCount memory allocation when using all 10 Pulse channels (2 PC, and 8 control ports), with individual instructions for each.
  68. Added the CRBasic '&' operator that concatenates strings, which is compatible with Visual Basic.
  69. 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.
  70. Fixed custom collect of tables when some tables are hidden by returning the correct table ID.
  71. Don't truncate table names in the tablenames field of the status table.
  72. 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.
  73. 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.
  74. Fixed subroutine passing longs and floats to strings. The conversion to string was not correct.
  75. 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.
  76. Translated NAN when converting from floats to integers and integers to floats.
  77. 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.
  78. Fixed converting Long NaN to strings.
  79. 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.