Short output on digital I/O

Recommended Posts


This seems pretty straightforward. I need as accurate as I can get, a 250mS pulse from one of the outputs of the U3.

I am using a script via USB to Windows. ;(


  • Set high
  • delay (0.25)
  • Set low

be accurate enough? It seems the delay function is set up mainly for full seconds.

I know Windows and USB add a lot of slop, but how close can I get?

Is there a function to do a "one-shot" pulse output with a specified duration that can remove the dependency on Windows/USB to finish the I/O?

Thanks for any help,


Link to comment
Share on other sites

From a software standpoint, the script you specified is about as good as you can get, though if using the U3, use the eGet functions, or better yet a Channel, to ensure it gets done in one step. As for doing it in hardware, there may be, but you'll have to ask the LabJack guys. I'll email them so they respond to this forum.

Link to comment
Share on other sites

I would think that if your computer is not busy with other things, that could be accurate to within a couple milliseconds.

If you don't want to worry about whether the computer is busy, you could use a couple timers (the first to make the pulse and the second to stop the first after 1 pulse) or the easier solution is to do an add/go/get block that does the toggle in hardware. Set the bit high, then wait 250ms, then set the bit low:

Keep in mind that the U3 clock is RC based rather than crystal based, and thus is only specified with an accuracy of 1.5% (15000ppm). By comparison, the U6 crystal based clock is typically accurate to 30ppm.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.