Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling NI2568 Switches using VB6 and DAQmx

Can the NI-2568 (and similar) switches be controlled using VB6 and DAQmx?
I got the impression from the "NI-DAQmx C API VIsual Basic 6.0" Help, that by using the "Digital Output API ",  it could be done very similarly to opening/closing a discrete , but no samples were included.
 
I just need to close a few relays and don't know if I have to install the "NI-Switch" software or not.
 
If it can be done, what would be the channel string to pass to the DAQmxCreateDOChan dll function
(in place of "Dev<x>/Port<y>/Line<z>").  MAX shows my (simulated-don't have the hardware yet) switch device to be "PXI1Slot3" .
 
Thanks,
Jon 
 
0 Kudos
Message 1 of 3
(6,501 Views)
Hello Jon,
 
You would need NI-SWITCH to control PXI-2568. You can download it from
 
NI-SWITCH installation comes with VB 6 examples. Also, Switch Soft Front Panel can be used to easily control PXI-2568.
 
 
Kalyanramu Vemishetty
Automated Test Systems Engineer
National Instruments
0 Kudos
Message 2 of 3
(6,482 Views)

Hi Jon,

You can also use NI-DAQmx Switch functions to control PXI-2568 rather using NI-SWITCH (NI-SWITCH installs ready-made VB examples)

You can use functions such as

DAQmxSwitchSetTopologyAndReset, DAQmxSwitchCloseRelays, DAQmxSwitchOpenRelays to control individual relays in PXI-2568. ANSI C Examples for DAQmx switches can be found at C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Switches. This can be used to write VB 6 code. Refer to  using "C Examples to create VB 6.0 Applications" in C:\Program Files\National Instruments\NI-DAQ\Docs\cvb60daqmx.chm for help on converting C examples to VB 6.0.

 

Kalyanramu Vemishetty
Automated Test Systems Engineer
National Instruments
Message 3 of 3
(6,467 Views)