U6 external trig | LabJack
 

U6 external trig

2 posts / 0 new
Last post
LinusN
LinusN's picture
U6 external trig

I have not yet purchased the U6 because I want to make sure it can do what I want it to do first.

I want to sample two analogue channels. Sampling should be done each time a digital input goes high. The frequency is about 6000 Hz.

I also would like to be able to start the sampling when another digital input goes high.

1. Wait for digital input 0 to go high.
2. Sample analog channel 0 and 1 each time digital input 1 goes high (about 6000 Hz).
3. After a preset number of samples, stop sampling.

I want to do the programming in VB.net. I downloaded the DotNET_LJUD zip file and started looking around but I cannot find good documentation for the API anywhere.

Can anyone summarize shortly how the application above could be implemented (pseudo code).

LabJack Support
labjack support's picture
2.  This is going to require

2.  This is going to require the ability to stream off an external clock.  The U6 can't do that, but the T7 can.  See the registers STREAM_CLOCK_SOURCE and STREAM_EXTERNAL_CLOCK_DIVISOR:

https://labjack.com/support/datasheets/t7/communication/stream-mode

https://labjack.com/forums/t7/externally-clocked-stream

1.  You can poll the DI to wait for it to go high, and then start the stream, or on the T7 you can use the register STREAM_TRIGGER_INDEX to do this in hardware.

3.  This is also supported in hardware on the T7 and we call it stream-burst.  See the register STREAM_NUM_SCANS.

FYI:  The documentation for the UD library for Windows is in Section 4 of the U6 Datasheet:

https://labjack.com/support/datasheets/u6/high-level-driver