Buffer 上传过程 - Buffer upload procedure

<< 点击显示目录 >>

主页  振动监测 > X20(c)CM4810使用手册 > 寄存器说明 - Register description  > Flat 流 - Flatstream  > 通过 Flatstream 上传 Buffer - Uploading buffers via Flatstream >

Buffer 上传过程 - Buffer upload procedure

 

Before a buffer can be uploaded from the module, the buffers on the module must first be locked by setting RequestBufferLock01 = 1. The upload can only begin once the buffers have been locked by setting BufferLockValid01 = 1.

If a velocity buffer is uploaded, it only contains values if bit EnableVelocityCalculation of the corresponding channel is set; otherwise, 0 is output. Bit EnableVelocityCalculation can be configured in register SensorConfig.

 

在从模块上传缓存区之前,必须先通过设置 RequestBufferLock01 = 1 来锁定模块上的缓存区。只有在通过设置 BufferLockValid01 = 1 锁定缓存区后,才能开始上传。

如果上传了速度缓存区,则仅当设置了相应通道的位启用速度计算时,它才包含值;否则,输出 0。EnableVelocityCalculation 位在 SensorConfig 寄存器中配置。

 

A buffer first needs to be requested from the module via the buffer Flatstream (Tx direction). Meaning:

首先需要通过 buffer Flatstream(Tx 方向)从模块请求缓存区(buffer)。含义:

BufferTxByte01: Value 0x83 (frame end and 3 bytes are valid)

BufferTxByte01: 值 0x83 (结束帧和3个字节有效)

BufferTxByte02: The requested buffer from the module

BufferTxByte02: 从模块请求的缓存区

BufferTxByte03: High byte of the number of the values to be read (per 4-byte value)

BufferTxByte03: 要读取的值数的高字节(每 4 字节的值)

BufferTxByte04: Low byte of the number of the values to be read (per 4-byte value)

BufferTxByte04: 要读取的值数的低字节(每 4 字节的值)

 

The sequence is subsequently increased by 1. As soon as the sequence has been confirmed by the module, it is important to set the number of valid bytes in BufferTxByte to 0; otherwise, the module interprets this as a new request. The module can temporarily store up to 2 consecutive requests.

As soon as the module receives the request, it begins streaming the requested number of values from the specified buffer via the buffer Flatstream (Rx direction). Values are always transferred in 16.16 fixed data point format (1/65536) with the high byte first. A scaling factor is transferred first. All other values are then multiplied by this factor. With time signal buffers, the first value according to the scaling factor is always the oldest. With FFT buffers, the first value according to the scaling factor is always 0 Hz. FFT buffers are only valid from the configured MinFrequency to the configured MaxFrequency of the respective signal (raw or envelope) and the respective channel.

For the time and frequency intervals of individual values, see register MinFrequencyRaw or MinFrequencyEnvelope.

RequestBufferLock01 must be set to 1 throughout the entire uploading process. Once the requested buffers have been uploaded from the module, the lock can be reset. In the module, the buffers are then once again filled with new values. After some time has passed, they can be locked and uploaded again (see register Control).

 

该序列随后增加1。一旦该序列被模块确认,必须将BufferTxByte中的有效字节数设为0;否则,模块会将其解释为一个新的请求。模块可以临时存储最多两个连续的请求。

一旦模块收到请求,它就开始通过缓存区Flatstream(Rx方向)从指定的缓存区流转所请求的数值数量。数值总是以16.16固定数据点格式(1/65536)传输,高字节在前。首先传输的是一个比例系数。所有其他的值然后乘以这个系数。对于时间信号缓冲器,应用比例因子后的第一个值总是早的。对于FFT缓存区,应用比例因子后的第一个值总是 0 Hz。FFT缓冲器仅在配置的最小频率到相应信号(原始或包络)和相应通道的配置最大频率范围内有效。

对于单个值的时间和频率间隔,见寄存器 MinFrequencyRawMinFrequencyEnvelope

在整个上传过程中,RequestBufferLock01 必须设置为 1。从模块上传请求的缓存区后,可以重置锁定。在模块中,缓存区再次填充新值。一段时间后,可以锁定它们并再次上传(请参阅寄存器 Control)。

 

Buffer number (dec.)

Buffer 编号 (十进制)

Buffer

缓存区

Maximum number of values

(1 values = 4 bytes)

值最大数量

(1 个值 = 4 bytes)

Channel 1

通道 1

Channel 2

通道 2

Channel 3

通道 3

Channel 4

通道 4

9

11

13

15

Raw signal

(filter value: MaxFrequencyRaw)

原始信号

(滤波器的值: MaxFrequencyRaw)

8193 or 65535 1)

25

27

29

31

Envelope signal

(filter value: MinFrequencyEnvelope)

包络信号

(滤波器的值: MinFrequencyEnvelope)

8193 or 65535 1)

66

70

74

78

FFT amplitude spectrum raw velocity signal

(filter value: MaxFrequencyRaw)

原始速度信号的FFT 幅度谱

(滤波器的值: MaxFrequencyRaw)

4097 1)

67

71

75

79

FFT amplitude spectrum raw acceleration signal

(filter value: MaxFrequencyRaw)

原始加速度信号的FFT 幅度谱

(滤波器的值: MaxFrequencyRaw)

4097 1)

82

86

90

94

FFT amplitude spectrum envelope signal velocity

(filter value: MinFrequencyEnvelope)

速度包络信号的FFT 幅度谱

(滤波器的值: MinFrequencyEnvelope)

4097 1)

83

87

91

95

FFT amplitude spectrum envelope signal acceleration

(filter value: MinFrequencyEnvelope)

加速度包络信号的FFT 幅度谱

(滤波器的值: MinFrequencyEnvelope)

4097 1)

1)

The first value in the buffer is the scaling factor.

buffer 中的第一个值是比例系数。

 

In special applications it may be necessary to upload larger buffers.

Im register SensorConfig, a buffer length of 8193 or 65535 values can be configured using bit 14. This makes it possible to read the raw signal and envelope signal (buffer number 9, 11, 13, 15, 25, 27, 29 and 31) using 65535 values, including the scaling factor, from the module. However, the FFT buffers still contain 4097 values including scaling factor and refer to the last 8193 values of the 65535 values of the raw or envelope signal.

After locking the buffer for the upload (RequestBufferLock01) until the next locking, it is necessary to wait until the longest buffer is filled again. If the buffer tries to lock again before this time elapses, it is prevented by the module until after the buffer is filled.

 

在特殊应用程序中,可能需要上传更大的缓存区。

SensorConfig 寄存器中, 可以使用位14配置8193或65535值的缓存区长度。这使得可以使用65535个值(包括缩放因子)从模块读取原始信号和包络信号(缓冲器编号9、11、13、15、25、27、29和31)。然而,FFT缓冲器仍然包含4097个值,包括比例系数,并且参考原始或包络信号的65535个值中的最后8193个值。

锁定上传缓存区 ( RequestBufferLock01 ) 直到下一次锁定后,必须等到最长的缓存区再次被填满。如果缓存区在这段时间之前试图再次锁定,则模块会阻止它,直到缓存区被填满为止。