FlexLogger

cancel
Showing results for 
Search instead for 
Did you mean: 

**Sequence Plug-in: Mathematical Expression Produces Insufficient Sample Points for High-Frequency Waveforms (Analog Output Sequence)**

When using a mathematical expression such as 1.0 * sin(2 * pi * 3.95 * t) in the Analog Channel Values field of a sequence step, the plug-in appears to evaluate the expression at only a very small, fixed number of sample points per step (approximately 10 points), regardless of the step duration.

This is clearly visible in the Channel Values Preview: the output waveform is drawn as a series of straight lines between widely spaced red marker points, producing a jagged, triangular shape instead of a smooth sinusoidal curve. The blue Step # line confirms the steps themselves are being processed correctly.

 

  1. Is there a setting to increase the number of evaluation points per step when using a mathematical expression

  2. Is there a recommended method for generating smooth analog sinusoidal output above 5 Hz in the Sequence plug-in like SignalExpress used to do?

0 Kudos
Message 1 of 2
(1,081 Views)

The Output Sequencer is intended to drive software-timed outputs and runs at a fixed rate of 1 sample every 100ms (so a 10 Hz output signal). This is also in-line with how quickly our software-timed analog DAQ outputs are updated. Although the plug-in has support for generic formulas, it is more suited to slowly changing outputs like ramps, dwells, or slowly-changing time-based signals. The plug-in is not intended to a general high-speed function generator.

 

You could write a dedicated plugin which outputs a faster waveform with the desired sample frequency (I'd say at least 100 Hz, since your sinewave has a period of approximately 0.25 seconds, which would give each period at least 25 samples). However, you would be limited in what you could do with this waveform. You could still log it, use it in formulas, events, etc... However, as I mentioned above, DAQ analog outputs are software-timed, so if you mapped this generator plugin to an analog output it would only get the latest values and you would not see the full waveform represented in your output.

 

You could instead write a plugin that directly writes a signal to your hardware (whether a DAQ card or something else), but then the signal generation and hardware output would be entirely in your plugin, and would not use the native FlexLogger DAQ support.

 

Right now FlexLogger is more focused on logging instead of control. In the future this might improve with better options for hardware-timed outputs, stimulus profiles, and function generators, but for now the built-in hardware output capabilities are limited to slower rates.

0 Kudos
Message 2 of 2
(945 Views)