Hello,
Yes, you can switch them in the VI. For 10 Bidirectional digital channels requirements you would be looking at some models like USB-6001 that includes 13 channels.
The NI USB-6001/6002/6003 has 13 digital lines: P0.<0..7>, P1. <0..3>, and P2.0. D GND is
the ground-reference signal for digital I/O. You can individually program each line as input or
output.
All digital input and digital output updates and samples are software-timed.
You can also review User Manua: https://www.ni.com/pdf/manuals/374259a.pdf page 21 for furthersafety recommendations to avoid damaging devices.