11-10-2011 11:02 PM
Hello,
I have to re-write an application for a RT PXI controller that manages many SCXI-1160 relays cards. We want to move away from Traditional DAQ towards DAQmx. I don't have the controller with me and I'd like to know the syntax to be used in the list of relays for the "DAQmx Switches Open Relays.vi". I want to use this VI as a "multiple relays" command. I did many search with no success.
I need the syntax that take into account multiple chassis, multiple cards, range of relays and individual relay.
Any helps?
Thanks in advance.
Michel
Solved! Go to Solution.
11-11-2011 03:04 PM
Hi Michel Gauvin,
If you look in the Measurement & Automation Explorer, select your device, then go to Device Routes, you can find the syntax for the resource name. For example, my device 1 card shows up under Sources as "/Dev1/ai0," so I would put "Dev1/ai0." To select multiple channels/devices, you can use commas, and for consecutive channels, you can use colons.
For example, to select channels 0 - 2, I would use "Dev1/ai0:2."
Thanks,
Lisa
11-11-2011 03:57 PM - edited 11-11-2011 03:58 PM
Hi Michel,
I think Lisa might have overlooked that you were using a switch module. Here's an example using multiple relays across two modules:
/SC1Mod1/ch0:3, /SC1Mod2/ch0
You can specify a range of channels using a colon. The example above uses SC1Mod1, channels 0 through 3. You can specify multiple cards (and chassis I believe) as a comma-separated list. You can also use a comma to specify separate channels that are not in a continuous range.
Best Regards,
11-11-2011 04:28 PM
Hello John,
Thanks for the syntax. Do I have to perform any initialization prior calling the "DAQmx Switches Open Relays.vi", or I just need to feed the comma-delimited string containing the relays to be switched?
Also, if a power outage occurs, in which state will be the relays at power on? Are they going to be in "NC" or they will keep there last state?
Thanks in advance,
Michel
11-15-2011 08:25 AM
Good morning Michel,
Sorry for that confusion.
You can find some general examples for programming switches under Help >> Find Examples in LabVIEW. I would navigate to Hardware Input & Output >> DAQmx >> Switches, and check out some of the examples under there to see if any programs already exist to accomplish your goals.
As for your specific question, at the beginning of each program, you need to DAQmx Switch Set Topology and Reset. This allows users to set the switch topology for each individual switch card in a chassis. A good community example shows a simple, complete example of using these two VIs we've discussed can be found here.
Lastly, the SCXI 1160 is an electromechanical latching switch, so in the case of a power outtage, the switch will retain its state. However, at power-up, all the relays will default back to their normally connected states.
Thanks!
Lisa
11-15-2011 08:41 AM
In that last sentence, I meant to write normally closed. Sorry for any confusion.
Lisa
11-15-2011 10:16 AM
Hello,
Thanks for the answers.
Is there a way to configure the switches not to default back to the "NC" position? It would be important for us because we are using the switches to manage a redundant system, but in our architecture the switches is the only single point of failure and we would like the switches to retain its last position at startup (if any type of failure occurs on the switches).
Thanks again,
Michel
11-16-2011 09:24 AM
Hi Michel,
There's currently no way to not reset switches when they first turn on. If you're only concerned about this in the context of power outtages, you may be able to implement some fuse or diode system in order to protect your test equipment.
Thanks,
Lisa