Tablename.BytesPerRecord (Number of Bytes in a Record)
The TableName.BytesPerRecord syntax returns the number of bytes for records in a DataTable. This fieldname is only available in the CR6, CR1000X, and GRANITE Series dataloggers.
Syntax
TableName.TableBytes

This example program uses the TableName.TableBytesPerRecord syntax to return the number of bytes of a data table record:
'Declare Variables
Public PTemp, Batt_volt
Public n_bytes as LONG
'Define Data Tables
DataTable (Test1,1,-1)
Sample (1,Batt_Volt,IEEE4)
Sample (1,PTemp,IEEE4)
EndTable
'Main Program
BeginProg
Scan (1,Sec,0,1)
Battery (Batt_volt)
'In this example, n_bytes should = 8 because the record includes a Batt_volt sample and a PTemp sample that are both 4 bytes (IEEE4)
n_bytes=Test1.BytesPerRecord
CallTable Test1
NextScan
EndProg
Remarks
Programs written for Campbell Scientific data loggers use one or more data tables to store measurements, calculations, and variable states. The rows of a data table are called records, and the columns are called fields.
When using Tablename.BytesPerRecord, enter the name of the DataTable in place of the TableName parameter. The TableName is limited to 20 characters. The function returns the size, in bytes, of a single record in the specified table.
For additional data table access functionality, see Data Table Access.