LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DI signals change half clock cycle depending on the number of acquired channels

Hi

 

I am observing strange behavior of the DI input.

 

This is the situation:

Two signals are connected to the line DI2 and DI3 of the NI PCIe6537 with LV9.0f2.

When acquiring only these two channels the DI3 is half a clock cycle late after DI02, but they should be at the same time.

20573i431F1CA2A8055677

 

 

The strange thing is that when I just simply acquire channels DI0:5 I got different picture:

 

20571iBAC187A10125AA63

 

 

Can anybody explain to me why adding additional channels changes the relative timing between two DI2&DI3?

 

There is no change in the processing, just simply adding few more lines to acquire.

 

thanks

0 Kudos
Message 1 of 10
(3,872 Views)

Hi pawel,

 

Can you post an example that exhibits this behavior?  I would like to take a closer look of the setttings an parameters that are being used.

 

Regards,

Dustin D

0 Kudos
Message 2 of 10
(3,855 Views)

What is your sampling rate?  Are you using the onboard clock for timing?  What is the clock frequency?  In your graph, what are the units for the X scale?

This is mighty strange behaviour.

- tbob

Inventor of the WORM Global
0 Kudos
Message 3 of 10
(3,849 Views)

Hi Tbob

 

I am using 20MHz externally supplied clock. But if I use the onboard freqeuency the situation is the same. I verified that.

 

I have substitited the dt with 1 instead of the 1/20MHz to see the samples better, sorry forgot to mention that.

 

thanks

Pawel

 

 

0 Kudos
Message 4 of 10
(3,845 Views)

Hi Dustin

 

Sure, although the code is a bit convoluted as the DIO interfaces to another digital card. So I cut only the DI Rx portion.

 

20647iC79A80B518E5E483

 

The SCLK can be set to on-board and the situation is exactly the same, I verified that. The clock rate is 20MHz and in that example I cannot change it as the card spits out at that clock.

 

The phenomennon is very stable, reproducable and always looks the same.

 

 

thanks for your help.

 

Pawel

 

 

 

If

0 Kudos
Message 5 of 10
(3,843 Views)

Hi Pawel,

 

Just out of curiosity, if you change your "one channel for each line" to "one channel for all lines" does that change the behavior?   To test this you may have to read your data as a port.  I will do some more checking on this behavior, just one little thing that stuck out.

 

Thanks!

 

Dustin D

0 Kudos
Message 6 of 10
(3,837 Views)

I don't see anything wrong with this code.  Sorry I can't be of more help.

Does it make a difference if the physical channel string is "Dev/line2, Dev/line3" or "Dev/line2:3"?, where Dev is the device name (just a difference in using a comma vs using a colon)?

- tbob

Inventor of the WORM Global
0 Kudos
Message 7 of 10
(3,831 Views)

Hi

 

It does not change anything when I use the single line or acquire the whole port and split in LV. The result is always the same.

 

I think I found something, check this out.

 

The waveform control contains the data. IF I display all of them everything is OK,

20661i86A168B2542F6978

 

but if I delete the first two waveforms from the array the data is SHIFTED!!!

20663iCB4338CFE41FC6AF

 

I enclosed the VI for the ones who want to have fun. Run it and change the numeric calue from 0 to 2 to remove two first waveforms.

 

Ugh.... and the morning is all gone.

 

cheers

Pawel

 

 

 

 

 

 

 

0 Kudos
Message 8 of 10
(3,825 Views)

Hi pawel,

 

I wanted to upate you to let you know that when I run your VI I receive the same behavior, however, when I place a new graph from the Controls Palette»Graphs»Digital Waveform Graphs and use that it works as expected.  Try that out and I'll keep looking into what is going on.  Try this VI on your system to see what kind of behavior you see.

 

Regards,

Dustin D

0 Kudos
Message 9 of 10
(3,814 Views)

Hi Dustin

 

Thanks. After I realized that the graph itself was a problem I replaced it and it fixed the problem, so got the same behavior as yours.

 

thanks

Pawel

 

 

0 Kudos
Message 10 of 10
(3,799 Views)