I use port A of a PCI-6503 card as a bidirectional I/O port to communicate with another device. Hardware hanshake signals are controled on port C by the remote device, as specified in NI documentation. The problem is how to use Digital I/O VIs to manage both inputs and outputs on one bidirectional port ! No NI example do this.
I initialize the port as bidirectional using "Digital Group Config.vi" and specify external handshake signals using "Digital Clock Config.vi". I then create a buffer with "Digital Buffer Config.vi" (1).
Once the port and buffer have been set, it seems that the first next operation will decide wether bidirectional means "input" or "ouput":
* If I immediately "start" the buffer,
the DAQ layer assumes that a read operation is started. As a matter of fact, "Digital Buffer Read.vi" will provide any data received from the "listening" port.
* If I instead use the "Digital Buffer Write.vi" (eg. with void inputs to only report write op.status), the DAQ layer assumes that a write operation is started and expects the buffer to be started, read by the remote device, and stoped, and filled again, started, stoped, etc....
How do I switch to "input buffer" mode to "output buffer" mode using the same bidirectional port ?
oz
(1) Some of the NI ressources about bidirectional mode say buffers are not allowed. In fact, only onboard and DMA buffering are not allowed. Buffering at LabVIEW level (Digital I/O VIs) IS allowed ! NI ressources are quite confusing here.