Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Keep switch channel selected for multiple steps in a scan list

Hi,
 
I have 3 switches (PXI-2575), one to apply a source to a given line, one to apply a sink, a one to apply a DMM.  I have all three switches triggering off each other as well as a DMM (PXI-4070). I apply a source to any given line with the source switch and then cycle through other lines using the DMM switch. Problem is i want to keep the wear on the relays of the source switch to a minimum (for each cycle through the DMM lines I'm selecting same source pin multiple times!). Is there a command for scan lists or some way of setting up the switches so that this can be done?
 
I thought it might be possible to use the debounce command ';' on its own to signify that i don't want to change the channel selection but this does not appear to work, the DMM times out whilst waiting for a trigger on the second reading. Simplified example scan list that i currently have:
 
Break Mode: No Action
Source Switch: ch0->com;;;;~ch0->com & ch1->com...
DMM Switch: ch100->com;~ch100->com & ch101->com;~ch101->com & ch102->com;~ch102->com & ch103->com;~ch103->com & ch100->com...
 
I've also tried selecting the same channel in subsquent scan list entries which flags up error saying explicit connection already exists between the channels.
 
So is the only possibility just to needlessly wear out the relays?!
0 Kudos
Message 1 of 6
(7,823 Views)
Hi leon007,
 
I can understand your desire to keep the wear on the relays of the Source switch to a minimum.  I have a few questions, but we should be able to get the application working without needlessly wearing out the relays.
 
1.  Can I assume you are using NI-SWITCH to program this application?  If you are using the NI-DAQmx Switch API, please let me know.
2.  When you state "I have all three switches triggering off each other as well as a DMM", can I assume (leaving out the Sink switch for now) the scan advanced output of the Source switch (TTL0) is sent to the trigger input of the DMM switch (TTL0), the scan advanced output of the DMM switch (TTL1) is sent to the trigger source of the DMM (TTL1), and the measurement complete destination of the DMM (TTL2) is sent to the trigger input of the Source switch (TTL2)?
3.  If you are still having troubles after this post, I would like to know the following so I can assist in testing the issue:  What versions of NI-DAQmx and NI-SWITCH do you have installed?
 
OK, that's it for my questions.  Now for yours.  Unfortunately, the debounce command ';' didn't work because it is simply a dummy entry - without creating a connection no scan advanced signal will be sent.  I've noticed this is not documented well in our help file, and I apologize for that.  However, attempting to create a connection where one already exists should be an error.  Either the user is attempting to redundantly connect channels (which shouldn't happen if niSwitch Get Relay Position is used), or there is a driver issue.
 
To keep the relay wear to a minimum, I want to suggest a couple of ideas. 
1.  Use only one trigger line for the DMM's measurement complete and one trigger line for all the switches scan advanced outputs.  To use this option, it cannot matter in your application which switch operates first, and which operates last.  The switch that always makes a connection (the DMM switch) will send a scan advanced output trigger with a set scan delay (configured in niSwitch Configure Scan Trigger) that should accommodate for all the switches.  This option may add delay in your application, but you will save relay life.
2.  Use the DAQmx Switch API and the '&&' command between seperate switch connections.  In the DAQmx Switch API, you use just one scan list for all switch modules.  For example, we would perform the example scan list entries you provided with the following scan list:
 
/Source/ch0->com && /DMM Switch/ch100->com; ~/DMM Switch/ch100->com & /DMM Switch/ch101->com; ~/DMM Switch/ch101->com & /DMM Switch/ch102->com; ~/DMM Switch/ch102->com & /DMM Switch/ch103->com; ~/Source/ch0->com & /Source/ch1->com && ~/DMM Switch/ch103->com & /DMM Switch/ch100->com...
 
The above connects the Source switch CH0 to COM, waits for the relays to settle, connects the DMM switch CH100 to COM, sends the scan advanced output signal, and waits for the trigger input before executing the next scan list entry.  This method will keep an order to the madness, as you will have the power to decide which switch operates first, and which operates last.
 
Let me know if I assumed anything incorrectly or if neither option works for you!
 
Chad Erickson
Switch Product Support Engineer
NI - USA
 
Message 2 of 6
(7,813 Views)

Chad,

Answers to your questions:

1. In my original query i was using NI-SWITCH but have also tried out the NI-DAQmx Switch API to try and get around my problem.

2. Trigger line set-up is as you stated (plus sink switch in there as well but i simplified things in the query).

3. NI-DAQmx 8.1 and NI-SWITCH 3.1

Suggested Solutions:

1. I don't see how this solution saves relay life on the source switch, surely this still requires a channel change from every switch before the trigger is sent to the DMM? Might have completely mis-understood this solution...

2. I think this solution will probably do what i want, will crack on and test it out and let you know. I didn't relise from the documentation that it was possible to have multiple switches in the same scan list.

Cheers for your help,

Leon

 

 

0 Kudos
Message 3 of 6
(7,801 Views)

Hi Leon,

I do hope the second solution works for you! 

The first solution would only require a channel change on just one switch (DMM switch - the switch that changes each measurement) before the trigger is sent to the DMM.  In this scenario, you could think of it as handshaking between the DMM and one switch.  The other two switches would synchronous scan, moving to the next scan list entry whenever the DMM's measurement complete is sent, but these two switches (because they may or may not change each measurement) do not send a scan advanced output.  The handshaking switch is the only one with the power to tell the DMM to make a measurement. 

Good Luck!

Chad Erickson
Switch Product Support Engineer
NI - USA

Message 4 of 6
(7,792 Views)

Chad,

The second solution works exactly as i needed. And think i prefer the greater control over which switch acts first.

Think i understand your first solution now. For this would the scan list for the source be as i put in my original post, with the lone debounce ';' commands signifying no channel change?

Thanks for all your help,

Leon

 

0 Kudos
Message 5 of 6
(7,788 Views)

Hi Leon,

Good to hear you application is working!

In response to the first suggestion, you would be correct to place dummy entries ';' in the scan list.  Exactly.

Chad Erickson
Switch Product Support Engineer
NI - USA

Message 6 of 6
(7,779 Views)