Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize output state of digital output.

Hello,

it's my first post here and I hope you can help me. I have 24 digital controllable switches and I want to capture 2 analog signals for each switch when I turn on it. I have the switches grouped into 2 groups, A and B, that are switched with the same pattern but with an initial delay of 10ms or 50ms.

 

- I have NI PCIe-6351 on Dev1 and NI PCIe-6323 on Dev2.
- Group A is assigned to 16 switches, controlled with /Dev2/port0/line0:15 and captured with analog inputs of Dev2 (32 inputs).
- Group B is assigned to 8 switches, controlled with /Dev2/port0/line16:23 and captured with analog inputs of Dev1 (16 inputs).

 

Just now I've a pattern generator that generates a digital waveform with the patterns A and B. I load this pattern to a DAQmx digital output task in continuous mode as I've to repeat the pattern N times. Digital output is configured in lines /Dev1/port0:1 and connected with wires to /Dev1/PFI0 and /Dev2/PFI0. Then I create 2 analog read task (one for each device) triggered by PFI0, both captures are in finite mode.

 

The problem is that I don't know how to configure the digital output task that switches the lines (/Dev2/port0/line0:23). The lines 0:15 should be in the same output state (high or low) that pattern A (output at /Dev1/port0/line0 and input at /Dev2/PFI0) and the lines 16:23 should be in the same output state that pattern B (output at /Dev1/port0/line0 and input at /Dev1/PFI0).

 

Also, after each capture (I capture a finite number of points) I process them and it could be the case that a switch is maltfunctioning and I've to disconect it, so in the next iteration this switch won't be turned on, and therefor I've to remove this line from this digital output task.

 

Any idea of how to do this? Any better approach of getting the wanted result?

 

Thank you.

0 Kudos
Message 1 of 1
(5,392 Views)