03-01-2022 08:33 AM
Dear all,
It is my first time experience with NI hardware. I have to slightly change a program from a bench which is roughly 10 years old (it is using LabVIEW 2012).
Basically, the bench uses a PXI-2503 as a "2-Wire 24x1 Mux" typology.
The PXI-2503 is connecting the CAN_High and CAN_Low of 24 DUTs to the CAN channel from PXI-8464.
The LabVIEW SW is using DAQmx VIs (not sure why not NI-SWITCH, maybe it didn't exist at that time).
I only need to add a switchable 120R termination resistor, which I have added between ab0 PINs.
I could just switch ab0 once for all at the end of the initialization but I don't know how to properly do that.
Or i could also close it everytime that I am connecting a DUT.
The LabVIEW code related to PXI-2503 is quite small, and is working fine without this 120R switchable resistor.
1. Initialization:
Initialize the topology and disconnect all switches.
2.Closing the CAN path for DUT0:
This is the "DAQmx Switch Connect (Single).vi"
3. Opening the CAN path for DUT0:
This is the "DAQmx Switch Disconnect (Single).vi"
What I have unsuccessfuly tried:
1. Connect ab0 with com0 at the begining of my program:
I forgot the error message but I was not allowed to connect these two.
2. Try to connect the channel ch0 with ab0:
No LabVIEW error but it didn't work, meaning the CAN communication between PXI-8464 and DUT0 was not working due to the missing termination resistor.
3. Connect Multiple using a connection list:
I tried using "DAQmx Switch Connect (Multiple).vi" and "DAQmx Switch Disconnect (Multiple).vi" with following connection lists:
"/PXI1Slot13/ch0 -> /PXI1Slot13/com0 -> /PXI1Slot13/ab0"
or
"/PXI1Slot13/ch0 -> /PXI1Slot13/ab0"
But I was getting a LabVIEW error, I don't remember which one right now. My strings are probably wrong?
4. Try to first close ch0 with com0, and then ch0 with ab0:
This is the way which seems to be used in one NI-SWITCH example.
No LabVIEW error but my test still failed.
Note: I got following error when trying to disconnect ch0 and ab0: "200182 Switch channels cannot be disconnected because there is no explicit path between them".
I didn't really understand this error message but I have just removed the disconnection from ch0 and ab0 because i didn't care for this small test.
Conclusion:
Could any one advise what should be the correct SW solution?
For information, when I am using a SUB-D 120R dongle on the PXI-8464 port, my test is working fine, but I would prefer to use this switchable resistor.
Best regards,
Ludovic