05-08-2013 02:07 PM
I'm having trouble getting relay positions above 23 in the 1-wire 48x1 mode
% nilsdev | grep 2503
NI PXI-2503: "Dev1"
The topology is set to "2503/1-Wire 48x1 Mux" via the following API, using device "Dev1"
DAQmxSwitchSetTopologyAndReset(device,topology)
In theory that means there are 48 inidividual relays than can be read, however, the following fails:
switchname = "/Dev1/ch47"
DAQmxSwitchGetSingleRelayPos(switchName, &pos)
The error returned is:
DAQmx Error: Relay name is invalid.
Relay Name: ch47
Status Code: -200202
which is
#define DAQmxErrorInvalidRelayName (-200202)
I am unable to get the relay position for anything above relay 23 ( /Dev1/ch23 )
Is that the expected behaviour, or is there a driver or hardware issue ?
Solved! Go to Solution.
05-09-2013 04:10 PM
Hello kenstern,
Welcome to the NI forums!
To use your 2503 in 1 wire mode, you can only use relays CH0 through CH23. To determine between the 23+ and 23- pin, you will need to use the 1-wire relay, then the HLSELECT. I've identified the relays in the image below. You can also see it in the 2503 specs.
05-09-2013 04:15 PM
Hmm, then please explain the following:
1. Why is the mode called "2503/1-Wire 48x1 Mux" ? Are 48-wires not really available ?
2. Why does "DAQmxSwitchConnect /Dev1/ch47 /Dev1/com0" succeed ?
05-09-2013 04:37 PM
When using this switch in "1-wire" mode, we are essentially breaking each (+)/(-) pair into their own channels. Since this topology utilizes double pole, single throw switches whose individual terminals cannot be switched independently, another switch is introduced to decide which side of the switch is being accessed as what point in time, (+) or (-).
Instead of having 48 single pole single throw, we can have 24 double pole single throw and one single pole double throw to decide which polarity we're referencing. You can still utilize this topology in a 48x1 1-wire mode.
To manually switch using DAQmx relay commands, you will have to specify the channel switch and the polarity switch as Maggie mentioned. When you call "DAQmxSwitchConnect /Dev1/ch47 /Dev1/com0", the driver knows to close the ch 24 relay in addition to "HLSELECT" AND "1WIRE" to route only the positive terminal (effectively ch.47).
The NI Switches Help document contains a more detailed explanation of the topology if you navigate to Devices >> NI PXI-2501/2503 >>