05-07-2011 12:13 PM
Hi there,
I am currently trying to interface an old mass spectrometer (Balzers QMS-511 controller, if it matters) using a PCI-6509 board and SCB-100 connector box. The protocol calls for TTL signal over a 37 pins connector. Every 'line' consists of a pair of 'High pin' and 'Low pin'. There's 8 pairs (lets call them BD0-7) that are meant to be bidirectionnal and are dedicated to addressing (output) and data transfer (output and input). Other important pairs are the 'Strobe' (output), the 'Done' (input), and the 'Control' (output, two pairs).
Essentially, the protocol specifies that you begins by addressing a register. To do that, you put the 'BD0-7' pins in a certain state, lets say '01110101', then you set the 'Control' pairs to 'addressing state' (10). The next step is to put the 'Strobe' in the 'High' state and the spectrometer should acknowledge by driving the 'Done' pin to 'High', after which the 'Strobe' should be set to 'Low'. Then you can proceed to actually reading or writing data in the register using the 'BD0-7' pairs again through a similar succession of steps ('Set data on BD0-7 pairs if writing data' -> 'Set Control to Reading or Writing Data' -> 'Strobe High' -> 'Wait for Done' -> 'Read the data on the BD0-7 pairs if reading' -> 'Strobe Low').
The problem is that I am unable to switch the pairs BD0-7 (two ports of 8 lines) to input state after output. The pins stay in the same state the output left them. How can I correct this behaviour? Thanks for any help you may provide.
05-09-2011 10:40 AM
hi flapointe,
The programmatic switching between input and output will involve stopping one (input) task and starting a different (output) task. It is usually recommended to switch to a high impedance tristate when changing input/output directionality. A few good resources about disconnecting ports and the DAQmx tristate are Disconnecting Hardware Routes Using the DAQmx Tristate VI and DAQmx Disconnect Terminals VI and Why Can't I Tristate My NI 6509 Digital Lines?
Also check out What is the Difference Between the DAQmx Export Signal VI and the DAQmx Connect/Disconnect Terminals.... Although you are not concerned about switching the terminals that are exporting signals, it talks about some of the caveats of connecting/disconnecting terminals from your signal.