LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Record and Playback

I have a PCI-6534 DAQ card in a PC and I am trying to record and then playback some motor encoder signals. I used DAQAssistant to create the code and then I have tried to modularize it a bit. I'm guessing I broke something, but I am not sure what.

My problem is that the playback refuses to work and gives me various errors depending on which "lines" parameter I pass in. The lines parameter I use is the same on the recording functions and the playback.

I started by first trying to record on Dev1/port0/lines0:2. Recording worked fine and it produced the required datafile. When I go to play back the file, I get the message

  Partial use of physical lines within a physical port is not supported by this device, given the requested Sample Timing Type.
  Consider specifying the entire port and tristating the lines you do not want driven.
  Property: SampTimingType
  Requested Value: Sample Clock

So then I go back and record on Dev1/port0. Again it records fine, but on playback with the same device, I get...

  Requested creation of a separate channel for each line is not possible when a digital port is specified as the physical channel.
  Specify a range of digital lines, such as "Dev1/port0/line0:7", as the physical channel.
  Physical Channel Name: Dev1/port0

HoKay, so I go back again and record on "Dev1/port0/line0:7". Again it records fine and on playback I get...

  When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.
  Number of Channels in Task: 8
  Number of Channels in Data: 1

I am at a loss as to why I can record so easily, but playbacks are a b***h. Help!

Attached are my VI's that I am using.




--

Brian Rose
0 Kudos
Message 1 of 2
(2,497 Views)
I think I figured it out.

When I created the DAQ VIs using DAQAssistant, I did so by selecting individual lines. When I changed things around to get playback to work, I simply changed the text field going into the lines to be "Dev1/port0". I could never get this to work.

I went back and regenerated the playback VIs using DAQAssistant, this time specifying a port output (instead of lines). This time it read and played the data fine.

The moral is that if you use DAQAssistant to generate VIs, be very careful when you change the parameters on those VIs.

Attached is my new test program which works well.


--

Brian Rose
0 Kudos
Message 2 of 2
(2,488 Views)