Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Can a Didital output task be used to read a line

I have a digital output task, but I would like to be able to read the value of the line as well (to save me having to store the last value I wrote to it). I have tried, and it appears to work fine, but I can't find any hint that it is supported in the documentation. Intuitively I might expect that it would work.
 
Is it a legal operation (will it ever stop working in a future release!)?
Am I reading the actual value on the physical line, or some internally buffered version of the value I wrote?
 
My DO task is using programmed IO, on demand modes - and I am using DAQmxWriteDigitalScalarU32 to write values, and DAQmxReadDigitalScalarU32 to read them. These are some of the DO properties
 
**Task: Write Laser On
  Task - Name: LASER
  Task - Channels: Vestibular/port0/line31
  Timing - Sample Mode: 10123 DAQmx_Val_ContSamps
  Timing - Sample Timing Type: 10390 DAQmx_Val_OnDemand
  Write - Wait Mode: 12547 DAQmx_Val_Sleep
  Write - Sleep Time: 0.0010
  Buffer - Output Buffer Size: 0
  Channel - Output Data Transfer Mechanism: 10264 DAQmx_Val_ProgrammedIO
 
Thanks,
 
Paul
0 Kudos
Message 1 of 2
(6,314 Views)
Hi Paul,
 
This is a legal operation on the NI-DAQMX, you can read the digital port lines current state and as far as I'm aware it's not expected to change in future releases. You are reading the actual current state of the line, I hope this answers your question.
 
Thanks,
 
Rob W
National Instruments
Application Engineer


Message Edited by rsw on 11-16-2007 03:48 AM

Message Edited by rsw on 11-16-2007 03:48 AM
Applications Engineer
0 Kudos
Message 2 of 2
(6,303 Views)