This example code was written to simultaneously read from the 4 ports on a single NI 9870 in slot one of a cRIO chassis. However, it can be easily modified to read fewer or more ports on one or more modules.
Another part of the original code is to write to one, user-selectable port at a time when the write button is pressed. This portion of the code can also be modified to allow programmatic sending of strings or streaming in both directions.
This code can also run loopback tests, as is, with the appropriate wiring in place.
Figure 1. Front Panel of Host VI.