SCPTlogRecord

Overview:

Log record..  Documents the format of a data log record. Not used as a CP. Data logs have variable sized records--unused fields are not present. 

Details:

Resource Set: Standard 00:00:00:00:00:00:00:00-0
Index: 337
Obsolete: no
Size: 16
Programmatic Name: SCPTlogRecord
Default: 0 0 0 0 0 0 0 0,00 SINGLE_INPUT NO_FANIN 0 NO_POINT_STATUS
Neuron C Type:
Structure
timestamp_typeTimestamp type..  Specifies whether or not a timestamp is included, and if it is incljuded, specifies the format of the timestamp. Contents defined by timestamp_t. 
 
bitfield
Signed: no
Width: 2
Offset: 0
Minimum: 0
Maximum: 3
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
record_typeLog record type..  Specifies the format of a data log record. Contents defined by log_record_t. 
 
bitfield
Signed: no
Width: 3
Offset: 2
Minimum: 0
Maximum: 3
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
multiple_inputMultiple tnput NV flag..  Set to 1 if the functional block has multiple input NVs. 
 
bitfield
Signed: no
Width: 1
Offset: 5
Minimum: 0
Maximum: 1
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
fan_inData log fan-in flag..  Set to one if this input NV receives data from multiple data sources. 
 
bitfield
Signed: no
Width: 1
Offset: 6
Minimum: 0
Maximum: 1
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
point_statusData log point status flag..  Set to one if this data log record includes point status information. 
 
bitfield
Signed: no
Width: 1
Offset: 7
Minimum: 0
Maximum: 1
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
data_lengthData log record length.  (bytes) .  Number of bytes in the data portion of a data log record. Set to 0 if the record does not contain a data value. 
 
unsigned short
Minimum: 0
Maximum: 255
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
timeTimestamp..   
 
Union
timestampTimestamp  (seconds) .  Full timestamp. Only present if timestamp_type is TS_FULL. 
 
SNVT_time_stamp_p
offset_stampOffset timestamp.  (seconds) .  Offset since last full timestamp. Only present if timestamp_type is TS_OFFSET. 
 
unsigned long
Minimum: 0
Maximum: 65534
Invalid: 65535
Scaling (A,B,C): 1,  -2,  0
Scaled value: 1 *10 -2 *(Raw+0)
Resolution: 0.01
member_indexData log member index..  Functional block member number for the network variable input that received this update. Only present if mulitple_input is 1. 
 
unsigned short
Minimum: 1
Maximum: 255
Invalid: 0
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
data_source_indexData log data source index..  Index into the cpSourceAddress array. Only present if fan_in is 1. 
 
signed long
Minimum: 0
Maximum: 32767
Invalid: -1
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
dataData log record data..  Data field for a data log record. Contents depend on record_type value. Unused bytes are not included. 
 
Union
log_statusData log status..  Changed value for data log status. Only present if record_type is LR_LOG_STATUS. 
 
log_status_t
valueData log data value..  Data log value. Size depends on size logged value and is defined by data_length. Only present if record_type is LR_DATA. 
 
s32_type
Minimum: -2147483648
Maximum: 2147483647
Invalid: 0
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
old_timeData log old time.  (seconds) .  Previous time after a time change. Only present if record_type is LR_TIME_CHANGE. 
 
SNVT_time_stamp_p
point_status_valueData log point status..  Optional status for a data point value. Only present if point_status is 1. 
 
point_status_t
Formats:

SCPTlogRecord:  text(("%d %d %d %d %d %d ", timestamp_type, record_type, multiple_input, fan_in, point_status, data_length),((timestamp_type == 0) ? ("%d %f ", time.timestamp.second, time.timestamp.hundredths) :((timestamp_type == 1) ? ("%f ", time.offset_stamp) :((timestamp_type == 2) ? ("NO_TIMESTAMP ") : ("UNKNOWN ")))), ((multiple_input == 1) ? ("%d ", member_index) :("SINGLE_INPUT ")),((fan_in == 1) ? ("%d ", data_source_index) :("NO_FANIN ")),((record_type == 0) ? ("%d ", data.value) : ((record_type == 1) ? ("%m ", data.log_status) :((record_type == 2) ? ("%d %f ", data.old_time.second, data.old_time.hundredths) :("UNKNOWN ")))), ((point_status == 1) ? ("%m ", point_status_value) :("NO_POINT_STATUS")))