Sensoray 417 Manual do Utilizador Página 16

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 37
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 15
15 Sensoray Model 417
Chapter 4 Programming
Set Filter
This command establishes a software single-pole low-pass filter for the specified channel. The
second command byte specifies unsigned filter factor, F, which may have any value from 0 to 255,
inclusive. The relationship between F and filter percentage, P, is:
All channel filter factors default to zero after a reset. This effectively disables the filters and maxi-
mizes channel response. A non-zero factor in electrically noisy environments may help to reduce
measurement noise.
Rather than computing the theoretical value of filter constants, we recommend that you experi-
ment with different values to find the best response/noise tradeoff. Some applications, however,
require knowledge of the filter time constant. This expression describes the relationship between
time constant t, expressed in seconds, and filter factor F:
COMMAND: (160 + Chan), (FilterFactor)
RESPONSE: NONE
VB Code Example:
‘*********************************************************************
‘ Generic procedure to set filter factor on any channel.
‘*********************************************************************
Sub SetFilter(BasePort%, Channel%, FiltFactor%)
Const SET_FILT = 160 ‘ SET FILTER CONSTANT command opcode
‘ Send command string to coprocessor board
Call SendByte(BasePort, SET_FILT + Channel)
Call SendByte(BasePort, FiltFactor)
End Sub
‘*********************************************************************
‘ Set up channel 4 with a 12.5% low-pass filter. To convert filter
‘ percentage (0 to 100%) to filter factor, multiply by 2.55.
‘*********************************************************************
Call SetFilter(BaseAdrs, 4, 12.5 * 2.55)
FInt2.55
P×()
=
t
NumActiveChannels
45ln
F
256
---------
×
-----------------------------------------------------
Vista de página 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 ... 36 37

Comentários a estes Manuais

Sem comentários