Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Python - 2 * SCB68 A on NI 63 23 - 16 channel differential

Solved!
Go to solution

Hello to all of you,

I have a problem that I don't understand at all;

I have a NI 6323 card with two SCB-68A cards as data connections.

I want to work in differential.

 

When I work in CSR or NRSE mode, I can access 32 channels.

When I put my terminal in DIFFERENTIAL mode, I can only have 8 channels instead of 16.

 

With 32 channel

-----

def cfg_read_task(Saturation):
                  Saturation.ai_channels.add_ai_voltage_chan('/Dev1/ai0:31',min_val=0.5,max_val=1.5,
                  terminal_config = nidaqmx.constants.TerminalConfiguration(-1))
                  Saturation.timing.cfg_samp_clk_timing(rate=sampling_freq_in, sample_mode=constants.AcquisitionType.CONTINUOUS,
                  samps_per_chan=buffer_in_size_cfg)

-----

With 8 channel and differential terminal

-----

def cfg_read_task(Saturation):
                  Saturation.ai_channels.add_ai_voltage_chan('/Dev1/ai0:7',min_val=0.5,max_val=1.5,
                  terminal_config = nidaqmx.constants.TerminalConfiguration(10106))
                  Saturation.timing.cfg_samp_clk_timing(rate=sampling_freq_in, sample_mode=constants.AcquisitionType.CONTINUOUS,
                  samps_per_chan=buffer_in_size_cfg)

-----

This script is working :

 

 

With 16channel and differential terminal

This script is  not working :

-----

def cfg_read_task(Saturation):
                  Saturation.ai_channels.add_ai_voltage_chan('/Dev1/ai0:15',min_val=0.5,max_val=1.5,
                  terminal_config = nidaqmx.constants.TerminalConfiguration(10106))
                  Saturation.timing.cfg_samp_clk_timing(rate=sampling_freq_in, sample_mode=constants.AcquisitionType.CONTINUOUS,
                  samps_per_chan=buffer_in_size_cfg)

-----

 

I attach my MAX image who see my two scb68-A cart.

 

 

Does anyone have any idea what I'm missing?

thanks for reading,

 

0 Kudos
Message 1 of 3
(773 Views)
Solution
Accepted by topic author KramGeo

You're probably missing the way differential pairs are fixed in the hardware and the way the AI channels are split across the 2 connectors.

 

You *can* declare channels ai0:7 as differential, but that just defines the + inputs.  The device itself will then use (and expect you to physically wire) ai8:15 as the - inputs.

 

Similar stuff holds true for ai16:23 (+) and ai24:31 (-) on the other connector.

 

So your task config should designate 'Dev1/ai0:7, Dev1/ai16:23' to give you 16 total differential channels.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 3
(767 Views)

Hoooo Yeah, i'm dumb sometimes;

 

Thanks Kevin P! As usual, you have the right answer !

 

Version who work :

 

def cfg_read_task(Saturation):
Saturation.ai_channels.add_ai_voltage_chan('/Dev1/ai0:7',min_val=0.5,max_val=1.5,
terminal_config = nidaqmx.constants.TerminalConfiguration(10106),
units=nidaqmx.constants.VoltageUnits(10348))
Saturation.ai_channels.add_ai_voltage_chan('/Dev1/ai16:23',min_val=0.5,max_val=1.5,
terminal_config = nidaqmx.constants.TerminalConfiguration(10106),
units=nidaqmx.constants.VoltageUnits(10348))

0 Kudos
Message 3 of 3
(723 Views)