Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between ni switch and SCXI_Set_State

My application involves the SCXI-1160 relay card. I am developing
application in VC++. According to the documentation I can drive the
card using call to NI DAQ function (i.e. SCXI_Set_State..) or making
call to NI Switch library. What is the difference and are there
advantages of one library over the other.
0 Kudos
Message 1 of 3
(6,497 Views)
I would not recommend SCXI_Set_State because it is a function from
Traditional DAQ (older DAQ driver). I would either use DAQmx digital
output calls or NI-SWITCH calls. The difference between these 2 API is
the way the switch is presented.
In DAQmx you can think of the SCXI-1160 as a digital output module
where you can write logic values to 16 lines to turn ON/OFF relays.
NI-SWITCH presents the SCXI-1160 as a switch modules with 16 SPDT
(single pole double throws) relays. To turn ON/OFF relays you would
connect NO/NC channels to the respective COM.
If you are confortable with writing logic values (0 and 1) to digital
lines then you should use DAQmx API. If you are confortable in using
switch modules with relays and want to deal with channels names then
you should
use NI-SWITCH API.
0 Kudos
Message 2 of 3
(6,497 Views)
These two options are available because , there are two different ways
to look at this modules viz., either as an SCXI Digital I/O Module or
as a switch. Thats why, you have these two options.

You have the freedom to choose whatever you want. Here are some
thoughts :

1. Looking from the bigger application perspective, if you have other
switch modules etc. in your system and if you want to tightly
integrate everything, you may want to use the switch functions.
Otherwise, just the SCXI call may just suffice.

2. Try both. You may find out an interesting fact that by using
Set_SCXI_State function, closing and opening may be a little faster as
compared to when using the switch functions. This is because, the
switch functions are made keeping a big switch family in
mind. Hence
some time is taken in making some initializations.

Sincerely,
Sastry V
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(6,497 Views)