Added new GPS() instruction. This is used to read in data from a GPS sensor. It can read in information such as Latitute, Longitude, Speed, Course, etc. This can also be used to keep a datalogger's clock synchronized with the GPS system.
Added support for COM320.
Added support for SC115.
Added SemaphoreGet and SemaphoreRelease
Added SerialBrk(port,duration) instruction. Sends a break on Com1..Com4 com ports. The duration parameter is in mSec.
Added EthernetPower(state) instruction. The state parameter is a variable. Non-zero is on and zero is off.
Added NewFieldNames(GenericName, NewNames) instruction. Used to assign a fieldname to a generic variable.
Added GetFile() instruction.
Added ClockChange() function that returns the change in the Clock, in milliseconds, since the last execution of the instruction.
Added EndSequence instruction and flagged compile error when illegally locating Declaration Sequences such Sub/EndSub, DataTable/EndTable, ShutDown/ShutdownEnd, DialSequence/EndDialSequence, ModemHangup/EndModemHangup, and WebPageBegin/WebPageEnd. EndSequence ends the current sequence that started at BeginProg or after a SlowSequence and any accompanying Declaration Sequences. Only Declaration Sequences can occur after EndSequence and before SlowSequence or EngProg. Declaration Sequences can be located (1) prior to BeginProg, (2) after EndSequence or an infinite Scan/NextScan and before EndProg or SlowSequence, and (3) immediately following SlowSequence. SlowSequence code starts executing after any Declaration Sequences. The rule prevents insertion of a Declaration Sequence in the middle of some other executing sequence of code.
Added PingIP("IPAddress",MsecTimeout). Returns response time in msec (0 if no response).
Added FileEncrypt(filename) function. Returns true (success) or false. Used to encrypt CRBasic program files in the datalogger.
Added Function/EndFunction, ExitFunction, and Return to CRBasic. Allows creation of user-defined functions.
Added MuxSelect instruction. MuxSelect(clk_port,res_port,clk_pulse_width,mux_chan,mode) selects the specified channel on a multiplexer. Mux_chan can be a variable in sequential mode (it will auto-switch to sequential). Mode of 0 uses AM16/32A clocking, 1 uses AM16/32B clocking. This instruction can be used in conjunction with SubScan and PulsePort to control multiplexers. Example: MuxSelect(1,2,5,4,1) ' selects the multiplexer to channel 4 in B Mode SubScan (0,0,5) VoltDiff(Meas(i),1,mV5000,1,0,3000,250,1.0,0.0) PulsePort(1,5000) ' advance the multiplexer i = i + 1 NextSubScan portset(2,0)'shut off multiplexer (whether in A or B mode)
Added ShutdownBegin/ShutdownEnd CRBasic declaration that defines a sequence of CRBasic code that will execute whenever the currently running program is gracefully shutdown. Such a shutdown event happens prior to compiling a new program or restarting the same program or by starting no program. Example: ShutdownBegin, SerialClose(Com1), ShutdownEnd
Added RoutersNeighbors(DestArray(MaxRouters,MaxNeighbors+1)). Returns a list of all PakBus routers and their neighbors known to the datalogger.
Added CSIXML data file type to TableFile. Model name, serial number, OS version, and program name are included with the xml file header.
Added function so when downloading a new OS via LoggerNet, it saves all of the old settings even in the case that a new setting has been added.
Added a new setting called Filter List that, if not empty, will allow only specified source and destination messages through that can alter the state of the datalogger. NOTE: This will cause settings to be reset, regardless of how the OS is loaded.
Added support for DNP3 to use non-volatile final storage memory. It uses non-volatile memory reserved for data tables so that state and history is preserved through power resets and other reset conditions that preserve data tables.
Added a warning in compile results if re-initializing final storage memory due to table mismatch or DNP3 change.
Added a check for invalid Measurements per excitation in bridge instructions.
Added SDM-SIO4 to terminal mode 'P' talk-through.
Added trace info on DNS queries: address, age, time to live.
Added Compile Error if a duplicate Sub is declared.
Added Compile Error if the option parameter in Delay is > 2.
Added "Name Server" and "Include File" as settings that can be changed via the SetStatus instruction. Name Server specifies up to two domain name servers that can be used for TCP/IP comms. Include File specifies a file that will be implicitly included at the end of CRBasic programs or a program to be run as the default program.
Added checking of the length of the program file name to make sure it will run in the datalogger.
Added a new setting: PakBus/TCP password. When active (not blank, and up to 31 characters in length), a log in process using this and md5 digest of a random number and this password must take place successfully before PakBus communication can proceed over the socket. The default setting is not active.
Fixed GetPort to correctly load Boolean destination.
Fixed encryption to work with Include files too.
Changed setting clock via the keyboard so that the minimum day and month is 1 instead of 0, and the year is 1990 instead of 0.
Fixed the keyboard/display for display of the dimensionality of an array of string names.
Changed GOES: 1) Fixed TableOpt = 0 to send the most recent record only if it has not yet been sent. 2) Fixed sending records to GOES after &H80000000 (~2 GB) records have been sent.
Improved SubScan..NextSubscan to be used in slow sequences. The interval parameter must be zero. This change was made to make using multiplexers in the slow sequence easier.
Changed AM25T to allow it to be used in pipeline mode slow sequences. If slicing is required it is done on each measurement. This means that if using revdiff the two measurements may be sliced.
Improved so if no card present then set all card table sizes to zero in status table.
Changed data table instructions so that an expression can be used as the source, in which case the default field name is "Anonymous" with an incrementing suffix. For example, Average(1,2+Sin(x),IEEE4,0).
Flagged a compile error if a string declaration is missing the '*' character before the size specification.
Fixed EmailSend() so that when sent to multiple recipients, all recipients show up in the header instead of just the last address in the list.
Fixed using TableName.FieldName as function parameters when the next parameter is a string parameter, as in FormatFloat(Table.Field,FormatString).
Changed so if table requested table allocations change between compiles, as when new program sent with maintain data option, then re-initialize final storage memory.
Improved to allow PortSet in pipeline slow sequences.
Fixed TCPOpen() to work when the Port parameter is changed at run time.
Changed AVW200 to allow Reps, Chan, Mux Chan, Vx, Begin Freq and End Freq to be variable expressions.
Changed AVW200 response in the case of sequential mode and communication is cut off in the middle.
Changed Warning Message to display the line number.
Fixed keyboard / display when attempting to change a numeric value by entering more than 16 characters.
Fixed Maximum and Minimum so that if one of the rep values is NAN on a scan when output occurs, all values are not set to NAN.
Fixed Network Time Protocol client and server to remove a possible +/- 1 second error.
Fixed PulseCount instruction when doing a running average of frequency to return correct values while the running average buffer is being filled.
Changed so if running a Default.cr1 (or Include File if the setting is active), then wait to set Compile Ready until the Default program is loaded.
Changed the DataTable time stamp to be the system time when called from outside a scan and when the table does not have a DataInterval declaration.
Fixed the FindSpa Function to work with Long and String data types.
Fixed adding and concatenating strings, including functions that have string parameters, to allocate enough memory.
Fixed the DHCP Client Fully Qualified Domain Name option.
Fixed HTTP displaying the Newest Record from the Public table when there are more bytes from variables declared as Dim and Public compared to the maximum number of bytes per record in the Data Tables and in the Public Table.
Fixed false alarm Warning message when a Scan appears inside a subroutine before BeginProg.
Limited the maximum size of the usr: drive to 400k - total memory available. When a larger value was entered the system crashed continuously.
Fixed the RealTime Usec when called outside a Scan/NextScan. (It had 100 usec units there instead of usec, i.e., the usec field was 100 times too large.)
Changed VoiceSpeak to handle case when voice.txt does not have a after the last word in the file.
Changed TOB3 files to work with changed field names.
Changed DHCP Client to advise the Server that its domain name is the Station Name.
Improved efficiency of PakBus File Upload and retrieving Table Definitions and the directory, especially when the directory is large.
Changed TableFile to allow Interval and TimeInto/Number of Records to be variable expressions.
Fixed Sort not traversing far enough into the sorting array on initial pass that sets up the heap sort.
Changed TimedControl to buffer the index values up to num_buffs deep and return the index that coincides with the scan that is being processed.
Fixed Move instruction when source is a constant string.
Fixed FieldNames description parsing when an array and description are both used.
Fixed CRBasic accessing Status fields referencing Data Table information, such as Status.DataTableName(2,1).
Changed CRBasic accessing TableName.FieldName(M,N) when the field data type is a time stamp. If M is > than the dimension of the field, and the destination is of type string, then M specifies the format of the time stamp returned as specified by TableName.TimeStamp(M,N).
Modified formatting CF-Cards to always format FAT32. When switching from FAT to FAT32 this required rewriting the partition sector. Since the partition sector does not always exist the format always reads the low level disk geometry information and creates a new partition sector then formats (quick variety) the media.
Flagged an error if a Boolean expression testing equality, such as (X = 1) is used out of context and would have no effect.
Changed Neighbors Allowed setting so that if more than 10 neighbors are in the allowed list and the beacon interval is 0, the beacon interval is changed to 60 seconds and beaconing is used for neighbor discovery instead of directed hello requests that can eat up communications memory.
Fixed GetVariables() and other PakBus communications instructions whose Result parameter is variably indexed so that the results for all iterations do not go into the first one.
Changed EmailSend() to not advertise CRAM-MD5 authorization in the case that both the user name and password are NULL.
Changed SerialIn so that the max number of characters can be a variable expression.
Removed a 40 msec error when setting the run time datalogger clock from the battery backed up clock at reset.
Improved going to low power standby when the system background calibration is waiting for the main scan to complete to slice in measurements.
Don't allow reps on the same channel for bridges unless measurements per excitation equals reps.
Fix Max when first value of a new interval is NAN.
Changed Default datalogger generated web pages so that they pass "validation".
Changed PPPClose to also look for "NO CARRIER" when ppp is closed before "AT" verification command is sent.
Fix Precompiler checking for valid program filename length.
Median fixed for reps>1 using FP2 data type.
Fix Pipeline mode slow sequence slicing for Delay, and PulsePort instructions.
Fix Status variable RunSignature to include the expression memory into the signature. Changing constants in a program was not giving a different signature. This caused LoadFieldCal to erroneously load the calibration data.
FieldCal: include the reps as part of the signature used to determine whether or not to create a new file. Reps was changed and the old file was still used. This confused the FieldCal wizard. Also added checking for the gf_raw parameter to force it to be the same size as the other arrays etc. And fixed gf_raw when indexing into an array with reps set to 1.
FieldCal: 1) added more checking for successful file creation. 2) improved checking to determine whether or not to use existing calibration file. 3) Added checking for reading and writing the file created. Will now give an error if the file cannot be created due to full disk.
Fix sequential mode problem starting main scan causing the slow sequence to hang. This was only encountered in a CR5000 (because it is faster than the others), but was a potential problem for CR1000, and CR3000 too.
Fixed a problem accessing TableName.Fieldname when in a parameter type that expects a pointer to possibly multiple values rather than a single value. The problems will exist in: SerialInBlock(comport,Source,..), the Source parameter CheckSum(Source,...), the Source parameter FileWrite/FileRead(handle,Source,..), the Source parameter FindSpa(SoughtLow, SoughtHigh, Step, Source), the SoughtLow, SoughtHigh, and Source parameters. Also fixed a problem when this type of parameter is an expression involving more than a simple reference to a variable.
Changed Com1..Com4 activation so that if its baud rate setting is set to non-zero by some means other than SerialOpen(), then it will remain active even after switching from a program that uses SerialOpen to a program that does not. Previously, if a program was shut down that used SerialOpen, the comport would also be shut down.
Fixed DNS client time to live to work with roll over timer.
Changed PPP authorizations retry timeout to 15 seconds from 3 seconds.
PPP PAP authentication tries reduced from 10 to 3.
Allow Sequences like DialSequence/EndDialSequence, WebPageBeg/WebPageEnd, and VoiceBeg/EndVoice to be located inside a SlowSequence.
Fixed FindSpa as follows: (1)when assigned to a non-scalar, (2) when the Low, High, and Source are Strings, and (3) when Low, High and Source are of different type, then a compile error is flagged.
Fix Case statements with functions.
Fix Alias problem when declaring an alias array. Very rarely an obscure and incorrect compile error resulted due to un-initialized memory.
'W' command in terminal mode enhanced to include TCP communication.
TCP ModBus Master fixed to advertise number of bytes in packet correctly.
Change main scan to recognize new time set without waiting for the next scan interval. The new time will now be detected as soon as processing for the current scan is completed.
Fix memory problem created by the internal function that checks filename for tables storing to the card. The problem occurred only if the length of the table name (not file name) was greater than 8 characters. The problem was manifest by not being able to download files to the PCCard when the program had a CardOut instruction for the table that had > 8 characters in its name.
Change FFT and FFTSpa options 1..4 to correctly return DC and Nyquist values.
Changed compiler and pre-compiler to flag an error for alias declarations that are clearly illegal.
Fixed x to power of y when x and y are long.
Fixed sub 1 second error when setting the clock via LoggerNet.
Changed GetDataRecord and AcceptDataRecords to work with TableFile.
Changed FTPClient() to optionally do Passive Mode. The option code 2 = Send Passive, 3 = Receive Passive.
Changed HTTP so that wget can be used to retrieve files since it could not handle "Chunk" data transfer protocol.
Changed DialSequence to have its own thread so that it will not hold up various PakBus messages.
Change FieldCal to give a compile error if KnownVar and MeasVar are different sizes.
Fixed Network instruction to flag correctly overlapping networks that are identical.
Allow declaration of public variables and constants to not cause a compile error when declared after variables declared locally to a subroutine with the same name.
Change tob3 header creation to include array dimension info for fields that are created by sampling a single value from within an array.
Card Storage change: When ringing the CPU memory force a flush of the file system to make sure there are no sectors hanging around in case power is lost.
Improved synchronization between dig TS and processing when skipped scans occur or time is changed.
Removed timeout waiting for the DIG_MEAS event. Will now wait forever.
Fix data types reported in Pre-compiler table definition files to match the logger type rather than the endianness of the machine that the code is built for.
Change PulseCount configure option to be a variable. This allows different sensor types to be configured within the same program.
Change field formatting in table list option of precompiler. Added after each element of an array (to avoid lines too long). Also fixed dimension information for single values sampled from within an array.
Changed string operators to all be case sensitive. Fixed String <, > <= >= and - operators to not return the negative value expected.
Changed communications memory allocation so entire PakBus packet for output can be sent at once, else ComME packets could be broken up with pause/ready packets.
Fixed SDC PakBus packets when specified to be broken up by the SerialOpen command to send the correct minimum size packets.
Changed SDC output when special SDC addresses are specified by the SerialOpen (e.g., special communication with GOES) to used the baud rate specified by the SerialOpen command (the baud rate specified for ComME).
Fixed the Network() instruction to (1) return the correct result code if the result code is of type float, and (2) to correctly advise the remotes on the correct time gap between each other's transmissions instead of telling them all to transmit with 0 time gap (on top of each other). This problem was introduced in version 15 when we made it work with Long. The problem was it forced it to Long instead of allowed it to be either Long or Float.
Fixed the Routes instruction when not enough space is allocated for all the routes.
Changed SerialOpen to allocate enough buffer space if PakBus format was specified with a larger buffer size than a previous SerialOpen had allocated.
Fixed Email Send and Receive and TCPOpen to connect to a new server specified by a change in the server address parameter.
Enhanced FileCopy to not return success if the filesize changes between opening the file and writing the bytes out, or if the file size is zero. This was done because of an application that was copying a file that was asynchronously sent to the logger on a periodic interval. Sometimes the copy in the program was occurring at the same time as the communications copy, this was resulting in a zero length file.
Fixed array indices that are expressions that include floats and longs.
Augmented 'W' command to optionally display ASCII and to not timeout if the terminal mode is via BMP5.
Changed the Running Average instruction to zero the running total if the buffer is filled completely with NAN's.
Changed http so that '?' used at the end of a file name will tell the browser not to use the cached file.
Improved synchronization between processing and SDM task when skipped scans occur.
Fixed TOB1 data file type in TableFile when a Boolean data type is present.
Changed TOA5 data file type in TableFile to express 7 significant digits instead of 5 for IEEE4 data.
Changed the filename parameter in CalFile to allow all types of strings.
Fixed ClockSet to work with a Long array and with a string.
Changed Status port configuration to reflect SerialOpen setting.
Fixed DataGram when relatively long files are received.
Changed Network instruction so that if the gap parameter < 0, no response is sent.
Changed file download response to "invalid file name" if the file name is too large, and to a new code 15 (Root directory is full) if the root directory is full.
Fixed communications so in a multi-drop network if a packet is received that is not for us, do not shut down the comport (e.g., drop Modem Enable) if the comport is currently opened.
Fixed the directory update in the case that a file name length is >= 60 characters.
Fixed SerialOut to return the number of characters successfully echoed in the case that not all characters were echoed.
Changed File Upload so that a client can successfully retry getting the last fragment.
Fixed very rare possibility that ModBus or PakBus would get or set a variable in the middle of being used or set by the running program.
Fixed SecsSince1990 for option 1.
Set timeout when retrieving via Terminal Mode the Status table or Public table, timeout after 30 seconds if no key hit for more data.
Changed terminal mode so if entered via BMP, then extend the timeouts. This will allow the user to work with it remotely via interfaces like the RF95A.
Protected the terminal mode when used concurrently by different clients.
Reduced the allowable size of filenames for the file system from 64 to 60. This now matches the size of the run-now and run on power-up name lengths (they include the drive and :, and the file system does not).