Jump to content

USB 6215 - 10 Hz triggering with 2 TTL signals for 10 ms each.


Peter Herrmann

Recommended Posts

Hello LAVA community,

I use a USB 6215.
With two TTL output signals, two different colored lasers are to be triggered.
TTL 1 activates a blue laser. TTL 2 activates a green laser. 
This external device also outputs 2 analog signals that I can capture with the USB 6215.
While the lasers are active, the analog signals output characteristic values.

The two TTL signals should be output by the USB6215 as follows:
Both TTLs should be active for 10 ms every 100 ms, one after the other with a 2 ms delay.
So TTL1 active for 10 ms, then 2 ms delay then TTL 2 active for 10 ms. The times should be adhered to as precisely as possible.
The two analog signals should be calculated during the time in which both TTL are active (i.e. over the 22ms).
The analog signals are sampled at 1 kHz.
The analog data acquisition via DAQmx is clear. 
I only have problems programming the timing of the digital triggers (TTL) accordingly.
Does anyone have any idea how to start? 
Maybe someone has already programmed something similar?

Thanks in advance
Pete

Link to comment

How much flexibility do you want in your code? 

The simplest would be a single loop with a sequence. Each iteration of the loop is 100mSec

The 2nd simplest approach is a state machine, with a relevant timing node in each state. 

The analog sampling can happen in parallel to the triggering loop.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.