Integration
Analysis Data Waveform and Orbit Theory
Header structure is the following:
- First register contains signature
- Second register contains type
- Third register contains data array size
- Fourth register contains data array CRC
- Fifth register contains groove array size
- Sixth register contains groove array CRC
- Seventh register is reserved
- Eight register contains CRC of the header
In your example:
4660 = 0x1234 is the correct signature
6 is type
3600 is the size of the data array
54064 is CRC of the 3600-sample data array
0 is the size of the groove indexes array (this indicates that you did not have any notches)
65535 is CRC of the groove array( which you do not need to calculate in your case because you did not have any notches)
0 is just a reserved member of header, we do not use it for now. We allocated it for later in case if we ever need to place something else in header.
9987 is crc of the header.
Orbit Plots: DataClipSamples.xlsx
Above is a computer-generated signal in excel.
I used it to check whether our ideas with notch functionality would work.
This describes the process of getting from two sinewaves to an orbit signal.
I replaced 1800 Ch A data clip samples with 1800 samples of perfect sin wave.
Likewise, 1800 Ch B data clip samples with 1800 samples of perfect cos wave.
The computer-generated signal created perfect looking orbit, so we could test our notch functionality.
As for combining two data charts into orbit, you simply set MODBUS CHANNEL NUMBER REGISTER 40033 to MODBUS_CHANNELS_AB command.
This will capture data from both channels.
Data array size will be 3600 samples.
First 1800 samples are ch A samples.
Next 1800 samples are ch B samples.
So, it is easy to separate them.
Then you just plot channel A against channel B and you will get your orbit.
Modbus Register Map
About these Registers:
DEVICE_ID / REMOTE_TERMINAL_UNIT (RTU) / SLAVE_ID:
Each sensor on a single multi-drop bus line must have a unique DEVICE_ID / RTU / SLAVE_ID:
By Default the DEVICE_ID / RTU / SLAVE_ID is the LAST 2 DIGITS OF THE SENSORS SERIAL NUMBER
The serial number (and therefore, the RTU number) can be found on the side of the TwinProx on the white label.
INDEXING:
Note that the listed registers below are considered 0-Indexed (the first value starts at 0)
Some Modbus masters will need to shift all the values up by one value if their master recognized the first Modbus value at 1 (known as 1-indexed).
SERIAL COMMUNICATION SETTINGS:
Baudrate: 115200
Parity: None
Handshakes: None
Data Bits: 8
Stop Bits: 1
FUNCTION CODES:
The function codes supported by TwinProx Sensor are:
03 - (0x03) READ MULTIPLE HOLDING REGISTERS
16 - (0x10) WRITE MULTIPLE HOLDING REGISTERS
--- If you want to read or write to just a single register, you can do this by setting the length/offset/number of registers to 1 ---
Endianness:
The TwinProx sensor uses the Big Endian memory allocation paradigm.
In computing, endianness is the order or sequence of bytes of a word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most significant byte of a word at the smallest memory address and the least significant byte at the largest. A little-endian system, in contrast, stores the least-significant byte at the smallest address.
Modbus Register Map
Register Address | Number of Registers | Register Contents Description | Range | Default Value | Scale | Unit | Data Type | Read / Write | Notes |
40176 | 1 | Channel A Gap / Distance | 0 to 105 | n/a | value/100 | mils | 16-bit Unsigned Integer | R | |
40177 | 1 | Channel B Gap / Distance | 0 to 105 | n/a | value/100 | mils | 16-bit Unsigned Integer | R | |
40178 | 1 | Channel A Displacement | 0 to 105 | n/a | value/100 | mils Pk-Pk | 16-bit Unsigned Integer | R | |
40179 | 1 | Channel B Displacement | 0 to 105 | n/a | value/100 | mils Pk-Pk | 16-bit Unsigned Integer | R | |
40049 | 1 | DDC_START_SAMPLE | n/a | n/a | sample index | 16-bit Unsigned Integer |
R/W |
This register will start by reporting a 0 when read (indicating the 0th sample is in register 50, ready to be read). After successfully reading the data clip sample in register 171, this register should read 122 (indicating the 122nd sample is in register 50, ready to be read). |
|
40050-40171 | 122 | DDC_Samples | n/a | n/a | 16-bit Unsigned Integer |
R |
Block reads of registers 49 - 171 repeatedly until SAMPLES collected equal 1800. |
||
40171 | 1 | Auto_Reload_DDC_Chunk | n/a | n/a | 16-bit Unsigned Integer |
R |
Each time register 171 is successfully read by a Modbus Master. Register 49 is updated to reflect the index of the sample in register 50 and the next set of DDC Samples is loaded into registers 50 - 171. |