LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Daqmx USB-6225 Digital output timed

Hi guys:)

 

I have a small problem. I need to turn on a relay, then wait 5 ms, and then turn off the relay. It is crusual that it's always 5ms.

 

Software: LV2010 SP1

Hardware: DAQmx USB-6225.

 

Until now I've just been using the DAQ asistant. But for this task it's way to slow and unstable.

timing prob.png

 

The fastes time between rising and falling edge is 7,5ms. And it's not stable, since I sometimes get 8,9 and 10 ms.

 

I've tried using the DAQmx palette:

Timing help.png

 

With this I can get a pulse of 1ms (task and error lines are connected ofcourse and I use port0, line0.).

 

But still it's sometimes 1,5ms. To get 5ms i tried putting in the openG wait timer which has error in and out to control the dataflow. But I get a random length of my pulse, like 4-6 ms.

 

My question is:

 

How can I get this to be excactly (or as close as possible) 5ms? I have llok at the Timing and Triggering functions on the DAQmx palette, but I can't figure this out. With the timing I set the rate to 1000 and number of samples to 5, which sould have given med a 5ms wait, but it waits forever. I want to use software timing and triggering og with the onboardclock on my USB-6225.

 

I've tried looking at the examples regarding digital out, but I can't find anything useful.

 

Anyone with som tips for my timing problem?

 

PS! I measure with an oscilloscope before the relay, in other words; right on the digial port on my device.

 

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 1 of 3
(2,788 Views)

I managed to get the pulse, using CLK out on my USB-6225. So problem is kinda solved. But anyways, it would be nice if you maybe had some tips regarding timing.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 2 of 3
(2,782 Views)

One way to solve this with the 6225 will be to create a pulse train that you connect to the relay. Just specify the the frequency and dutycycle.

See the "Gen Dig Pulse Train-Continious.vi" in LabVIEW examples.

0 Kudos
Message 3 of 3
(2,768 Views)