Campbell Hausfeld SDM-CAN Manual Do Utilizador

Página de 74
Section 3.  Programming CR10X, CR7 and CR23X 
implicitly by the data type specified, e.g. IEEE4 data is always 32 bits in length. 
For integer values, the longest integer you read or send from one datalogger input 
location is 16 bits as a result of limitations in the datalogger. See section 3.2 above 
for an explanation and work-arounds. 
For data types that read or set status, switches or error codes, only the input 
location parameter, multiplier and offset are used. Other parameters can be set to 
zero. 
As defined by the CAN standard, data is always encoded or decoded on the 
assumption that the least significant bit is transmitted last or  is on the ‘right-hand 
side’ of a data frame. The data frame can be from 0 to 64 bits in length, but is 
normally a multiple of 8-bit bytes. This means there are typically 0-8 bytes in the 
data frame.  
Please refer to Appendix D for examples of typical data frames and how to decode 
data within them. Appendix D also contains diagrams to show the method of 
pointing to the start bit within the data frame. 
For convenience the start bit can be referenced from either end of the frame (see 
parameter 09 below), but this does not change the direction in which data is 
encoded or decoded. Within a byte the MSBit is always first (on the left). 
Where the number-of-values parameter (parameter 11) is greater than one, the 
same function is applied to successive sections of the data frame, moving towards 
the ‘left’ of the frame. Data values are read to, or written from, successive input 
locations in the datalogger.  
The data types can be grouped into different type of functions, as follows: 
Collect and retrieve a data value: 
This function programs the SDM-CAN to capture a particular data packet and pass 
specific data from the data frame within that packet back to the datalogger.  
Parameter 
Value 
Data Type 
Unsigned integer, most significant byte 1st.  
Unsigned integer, least significant byte 1st.  
Signed integer, most significant byte 1st.  
Signed integer, least significant byte 1st.  
4 byte IEEE floating point number, most significant byte 1st. 
4 byte IEEE floating point number, least significant byte 1st.  
 
Build a data frame for transmission: 
The data will be sent to the SDM-CAN where it is written into a working 8-byte 
buffer in memory. The data is written starting at the bit position determined by 
parameter 09 and the number of bits stored by parameter 10. When the data type 
parameter is set in the range of 7..12, the data is written to the buffer directly,    
i.e. it overwrites any previous data in that memory (see also types 13..18).  
3-7