LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ

I use DAQmx to write a number 1 signal then write to level 0. I use Osiloscope to measure this signal and see it delay 1ms. How do I fix it? Thanks everyone. My DAQ is NI ELVIS II.

 

0 Kudos
Message 1 of 13
(2,635 Views)

Hi hung,

 

How do I fix it?

Short answer: Write a better VI.

 

Long answer: What kind of answer do you expect with such a question? You don't provide informations about your problem, and you forgot to attach your VI.

I use DAQmx to write a number 1 signal then write to level 0.

It would be much easier to understand that sentence when you would have attached your VI: what is a "number 1 signal" and where is "level 0"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 13
(2,613 Views)

 My problem is to write a digital signal to NI ELVIS II device. First I will write HIGH and then write LOW. I found my code to run for ~ 1E-6 ms, but when I use the oscilloscope to measure the digital signal, I write that I see the HIGH level exists for 1ms and then return to LOW. I want to reduce this time right away because ~ 1ms is too big. Thanks you.

 

 

0 Kudos
Message 3 of 13
(2,607 Views)

Hi hung,

 

First I will write HIGH and then write LOW.

From the specs it seems the Elvis only supports static DIO, so you will not get much faster using them.

 

But you could use counters/timers to generate short pulses. you could also generate a pulse using an AO channel…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 13
(2,603 Views)

Hi GerdW,

I understand your idea, but I don't know how to do it. If using the Digital Output of NI ELVIS II device like I did before, the delay time is quite large, I need time from high to low is immediately (approximate ns). If you know how to do it, you can create a VI to help me. Thank you very much.

 

0 Kudos
Message 5 of 13
(2,597 Views)

Hi hung,

 

the AO channels allow for upto 2.8MS/s (for single channel), so the minimum time between two samples can be 357ns.

The counter/timer use 20MHz clock, so the minimum time between two samples of a pulse can be 50ns.

 

In the example finder you will find example VIs, which show how to output waveforms on AO channels or how to output pulses using a counter/timer!

 

I need time from high to low is immediately (approximate ns)

"immediately" is impossible - you need to obey physics.

(Maybe you should first write down your requirements before choosing some DAQ hardware?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 13
(2,587 Views)

hi GerdW!

Thaks you.

 

0 Kudos
Message 7 of 13
(2,580 Views)

Hi GerdW,

I used Analog Output instead of Digital Output. But the results are still not satisfactory, I cannot explain this. whether there is another option or I have to use another DAQ.

Ảnh1.pngẢnh2.jpg

 

0 Kudos
Message 8 of 13
(2,571 Views)

Hi hung,

 

the slow part in your VI are those "1 chan 1 sample" DAQmxWrite functions: doing DAQmx with just one sample is slow.

 

Please try to adapt those DAQmx examples with triggers…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 13
(2,566 Views)

Because you are still using software timing!

 

I'm not familiar with the Elvis.  But if it behaves like other NI DAQ devices, you need to set up a sample clock,  create an analog waveform, and output it using 1 channel N samples.

0 Kudos
Message 10 of 13
(2,564 Views)