Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

6501 write out square waveform and read it back simultaneously

Highlighted

Hey there,

 

Im having trouble with my little USB6501, I have a bigger project in mind but for now all i want to see it do is write out a waveform from one line and read it back on another line. So whats happening at the moment is im writing out a toggle digital pattern with about 30,000 samples. I start reading at the same time i start writing, but every so often the read back will skip a vector (instead of reading 10101010 it reads 101001010). 

Could this be a buffering problem? 

Where is the buffer stored on the device or the PC?

Does the timing.vi work with the 6501? (i keep getting errors when i try to use it) 

I need the read back to be spot on for this to work properly. 

 

Kind regards

R

0 Kudos
Message 1 of 5
(3,135 Views)
Highlighted

The 6501 only uses software timing for the DIO.  In other words, they only change when you specifically tell them to in software.  So no timing is available.

 

So what does your code look like?  You might just need to add a small delay between your writing and reading to allow the signal to get out there.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 2 of 5
(3,127 Views)
Highlighted

Hey thanks for the reply,

 

That make much more sense now, the timing vi threw up an error even in example code for DAQ. My code is attached.

 

regards

R

0 Kudos
Message 3 of 5
(3,117 Views)
Highlighted

From what I understand with the static DIO, that code shouldn't work at all.  You will want a FOR loop to write each data point and read it back.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 4 of 5
(3,114 Views)
Highlighted

The code works alright, the waveform is written out correctly but reading it back is the issue. How do i set the buffer manually? I cant use the DAQ timing vi so it cant set the buffer automaticaly. 

0 Kudos
Message 5 of 5
(3,077 Views)