PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx and SCXI-1160 with "DAQmx Switch Open Relays.vi"

Solved!
Go to solution

Hello,

 

I'm using DAQmx to switch relays on a SCXI-1160 16 SPDT card. When I execute the "DAQmx Switch Open Relays.vi" with the input "/SC1Mod1/ch0" I would expect the relay to be in the "NO" normaly open position. But this is not the case, the relay is in the NC position. Here are the steps I doing in a simple VI.

 

1. Set the topology of the "SC1Mod1" to "1160/16-SPDT".

2. Call the "DAQmx Switch Open Relays.vi" with the string "/SC1Mod1/ch0".

3. Then I take a physical measurement, with a multimeter, on the terminal block SCXI-1324 and the relay is in the postion "NC".

4. If I execute the "DAQmx Switch Get Relay Position" it is returning "Open" !!!

 

Is this the right behavior, and if yes can someone explain the logic behind it.

 

Thanks in advance,

 

Michel

0 Kudos
Message 1 of 7
(4,953 Views)

Hey Michel,

 

Just to clarify your issue, you trying to open the relay on channel 0 using "DAQmx Switch Open Relays.vi"; however, the relay remains in the closed position when you check it with a DMM, even though the "DAQmx Switch Get Relay Position" says it is open, is this basically your issue? 

 

Instead of using DAQmx to control your switch, try downloading the NI-SWITCH driver found here: http://joule.ni.com/nidu/cds/view/p/id/2633/lang/en

Once you install this driver, open up LabVIEW and go to Example Finder (Help»Find Examples...), and search for "1160". In the search results, there should be an example called "niSwitch Controlling an Individual Relay.vi". Try using this example and see if you can get proper functionality from your relay. 

 

-Nathan H

 

Software Developer
National Instruments
0 Kudos
Message 2 of 7
(4,941 Views)

Hello,

 

Yes and when I execute the "DAQmx Switch Close Relays" it puts the relay in the "NO" position and "DAQmx Switch Get Relay Position" returns "Close", so the relay is working, but that was not the anticipated logic. Can you confirm this behavior?

 

Thanks,

 

Michel

0 Kudos
Message 3 of 7
(4,938 Views)
Solution
Accepted by topic author Michel_Gauvin

Hey Michel, 

 

Sorry, I didn't realize that you were actually able to control the relay, and you were just getting reverse logic. To answer your question, on the SCXI-1160, there are three connections for each channel: COM, NO pin, and NC pin. On reset, COM is connected to the NC pin. When you issue a command to OPEN channel 0, COM will stay connected to the NC pin, even though software now says the pin is open. When you issue a command to CLOSE channel 0, COM will now be connected to the NO pin, and not to the NC pin. 

 

A better way to think about it, is to just focus on the connection between COM and the NO pin. When you send an OPEN command, this connection from COM to NO will be open. When you send a CLOSE command, the connection from COM to NO will be closed. Refer to this manual for a visualization of how this switch is setup: http://www.ni.com/pdf/manuals/320513b.pdf. Refer to page 2-9 and 2-14 of that manual for pinouts.

 

-Nathan H

Software Developer
National Instruments
0 Kudos
Message 4 of 7
(4,933 Views)

Hello Nathan,

 

Thanks for this explicit definition. I think this exact definition sould appear in the help of the "DAQmx Switch Open Relays.vi" and the close relays, because it is not intuitive to focus on the NO pin when it is the NC that is the default one on reset.

 

Thansk again,

 

Michel

0 Kudos
Message 5 of 7
(4,922 Views)

Hi ,

I am facing one issue with using pxi-2567 . In our project there is 20 relays based DI and I am using DAQmx for drive the relay . I fined one relay switch example i.e.. Switch_Controlling_Individual_Relay for drive the external relay. But there is flickering in relays or LED.

 

Also I want to use Switch_Controlling_Individual_Relay vi as a subVI to my main VI to operate multiple relay, but its not working i.e..  i'mnot getting making contact o/p  from subVI. 

So,please help me here to resolve this issue ASAP.

 

Regards,

Srikant

0 Kudos
Message 6 of 7
(4,776 Views)

Hello Srikant,

 

For future reference, please start a new discussion when you are asking a different question from what the original discussion is about. I'm not exactly sure what you are asking, are you just having problems getting the example "niSwitch Controlling an Individual Relay.vi" to work correctly? What do you mean by "i'mnot getting making contact o/p  from subVI"? Also, what do you mean by "But there is flickering in relays or LED"?

 

It sounds like you are just having problems getting "niSwitch Controlling an Individual Relay.vi" to run correctly. On the front panel, what parameters are you setting for the topology name and relay name? Topology name should be "2567/Independent", and your relay names should be k0 to k63. Are you getting an error message when you run this, or is the device just not behaving correctly? Also make sure you are specifying the correct resource name. 

 

If you want to turn this VI into a subVI, you will need to add the appropriate terminals to it. Follow these instructions for how to correctly create a subVI.

 

-Nathan H

Software Developer
National Instruments
0 Kudos
Message 7 of 7
(4,765 Views)