LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sub-Millisecond Wait Time

Hello,

Currently I am using Labview to control my shutter system in an experimental set up. The shutter takes a TTL signal to open/close, so currently I have the programming set up to send a 5 V DC voltage to the shutter to open it after certain other routines have finished, then wait a user defined amount of time, then send a 0 V DC voltage to the shutter to close it. The steps involving the shutter are in a Stacked Sequence Structure. I wish to have .1 ms resolution for this wait time, (i.e. how long the shutter is open). I am new to Labview, but from what I have read it would seem that the best resolution possible is 1 ms with my current set up. Is there any way in which to get .1 ms?

Thanks

Jeff
0 Kudos
Message 1 of 8
(3,436 Views)
Unfortunately, it is not possible to define such a short time interval with software only. That's not a limitation of LabVIEW, it's just that Windows is too busy doing I-dunno-what else !
This point has been discussed in detail here

CC
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 8
(3,422 Views)
Thanks. It is as I suspected.

Jeff
0 Kudos
Message 3 of 8
(3,417 Views)
This can be easily dome with a counter/timer card, many cards have this for under $1000 but can not be done in software as of yet with timers.

-Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 8
(3,407 Views)
Won't it take much longer than milliseconds just to perform the mechanical act of opening and closing your shutter?
I do not know the inertial constraints of the shutter, nor the amount of energy per sec the shutter driver can supply, but I presume that having the shutter open for tenths of milliseconds is not feasible (unless maybe it is LCD, but even those are slow).

Regardless, a counter/timer approach is one means, the other is a programmable shutter driver.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 8
(3,394 Views)
If you are "sending" a DC voltage out, then you must have some kind of I/O board, but you don't say what.

A lot of NI boards have spare counter timers available, it would be trivial to set up one to generate a 413-microsecond pulse time and have it accurate.

You cannot get a repeatable accurate sub-mSec time with software (unless you are willing to suspend the OS).
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 6 of 8
(3,378 Views)
I apologize for my lack of details previously and programming experience. I am a self-taught programmer going on 1.5 months.

I am using a NI PCI-6221 card. Coastal, how does one go about generating a 413 microsecond pulse (if this is even possible with my board)? I will read into this on my own, but thought it best to ask as well.

As far as the shutter system is concerned, I am using a combination of a Pockel Cell and a mechanical shutter. It is for the pockel cell especially that I would like a better timing option, as it can be turned on and off quite quickly.


Thanks everyone,

Jeff
0 Kudos
Message 7 of 8
(3,348 Views)
NI PCI-6221:
16 bit Aout (x2)
16 bit Ain (x16)
24 DIO
32 bit CTR (x2)

Looks like it won't work with the "classic" drivers (which is what I know best).

Unfortunately, when they simplified everything for the new MX drivers, it got more complicated.

Look in the FUNCTIONS - NI MEASUREMENTS - DAQmx palette.

You'll have to create a virtual channel and use the DAQmx Timing vi to configure it.

I am not an expert on MX - I'd recommend looking at the examples:
HARDWARE INPUT and OUTPUT - DAQmx - GENERATING DIGITAL PULSES -- GEN DIG PULSE.vi looks promising.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 8 of 8
(3,334 Views)