Hello
I'm looking for advice on where to start with an application. I would like to send precisely timed pulse-trains of digital outputs (with each pulse precise to within at least 1ms), with each train lasting 1s and consisting of 20 digital outputs. The timings of the outputs within each train are not consistent as they would be for a PWM output; in other words the intervals between pulses need to be variable within each train as programmed from the software (I'm using Matlab) so that I can produce multiple train types, each with different sequences of intervals between the different pulses with the train. I believe this can be done most elegantly with the stream-out function of a T7 although I've not tried this. However, for a number of reasons it would be better if I could control the timings of these outputs in a different way as follows, and I wonder if this can be done with a U3.
I already have a programme that will produce such trains of stimuli but as audio outputs (changes over a 1s period in the amplitude of the envelope of a 300Hz sin wave) using a soundcard. For reasons of consistency between experiments, I would like to use the same programme but to produce digital outputs to trigger a Digitimer DS8R device instead. I believe I can get the U3 to sample from the soundcard output (which I believe has a range from 0 - 2V) using a AIO channel. I would then like the U3 to monitor this input and send a digital output every time the AIO reaches a certain level (e.g. 1V). It is possible to set the U3 to monitor for analogue inputs and automatically send a digital output like this, without the information needing to go via software on the PC? If so, would this result in precise enough digital output trains?
Alternatively, are there other ways to achieve the above with a U3 or should I learn to use a T7?
Many thanks
Chris
It sounds like T-series (all T7 and T4 variants) would be best. They can run on-board Lua scripts that can read analog inputs and set outputs:
https://labjack.com/news/standalone-operation-one-key-advantages-t-series-lua-scripting
As you mentioned, the T-series Stream Out feature would also certainly work for outputting predetermined waveforms at 1kHz.
The U3 would rely on the host computer software to control logic. Looking at the U3 Command/Response speeds in Table 3.1-2, you might be able to get the U3 to respond within 1 ms on average:
https://labjack.com/support/datasheets/u3/operation/command-response
The occasional worst-case round trip time could be multiple milliseconds, though.
The T4 is closer to the U3 in price:
https://labjack.com/products/comparison-table
For completeness, here's a full list of ways to output waveforms:
https://labjack.com/support/app-notes/waveform-generation